I have a distributed application, one part of it is legacy thus running under Java 7.
Another part is running (and of course compiled) under Java 8.
So calling service of the second VM from first part of App ends with:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Unsupported major.minor version 52.0
I decided to compile needed service with Java 7 source/target using Maven compiler plugin.
So, imagine we have a package with two classes:
com/example/A.java
com/example/B.java
How to configure Maven compiler plugin, or is there another way? To compile A.java with Java 7 and other (B.java) with Java 8.