I’m finally making the move up to Java 5 (yes, it is difficult to leave 1.4.2 behind, but considering Java 6 is out it is high time). In doing so I had a problem with Maven2 that I had not encountered before i.e. getting it to use the correct compiler compliance settings. This post from Ahti Kitsik sorted me out.
21
Mar
07
This post has been up for a while, but here’s the answer. Add the following lines to your POM file.
…
org.apache.maven.plugins
maven-compiler-plugin
1.5
1.5
…
ugh, this site doesn’t add the necessary entities.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
many thanks, just in time to move up to 1.6