In pom.xml you can:
<build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build>
How does Maven know where I have 1.5 version?
As far as I know, this will not make Maven compile against the Java 1.5 libraries. This will only tell the compiler to accept 1.5-level source code and produce 1.5-level class files.
Your code could still possibly refer to Java 6 classes, as long as your Maven task is run with a Java 6 JVM.
IF you execute:
The output will show you what version of Java is being used. For example: