As far as I know, this will not compile Maven against Java 1.5 libraries. This will only tell the compiler to accept the 1.5-level source code and produce the 1.5-level class files.
Perhaps your code might reference Java 6 classes if your Maven task is running with the Java 6 JVM.
IF you are doing:
mvn -v
As a result, you will see which version of Java is used. For example:
Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)
Java version: 1.6.0_13
Java home: C:\Program Files\Java\jdk1.6.0_13\jre
Default locale: en_IE, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
source
share