21
Mar
07

Maven2, Java5 et al.

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.


3 Responses to “Maven2, Java5 et al.”


  1. 1 John
    May 15, 2008 at 7:19 am

    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

  2. 2 John
    May 15, 2008 at 7:22 am

    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>

  3. May 15, 2008 at 5:07 pm

    many thanks, just in time to move up to 1.6


Leave a Reply