How can I use source 5? I tried
mvn -source 5 test
but it didn't work :-)
When I compile the file by javac, everything works.
How can I use source 5? I tried
mvn -source 5 test
but it didn't work :-)
When I compile the file by javac, everything works.
You need to configure the maven-compiler-plugin
:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
...
</plugins>
...
</build>
</project>