zaterdag 14 juli 2007

maven and tiger

By default the maven compiler plugin assumes you're working with 1.3 compatible sources. So tiger (java 1.5) sources will throw an UnsupportedClassVersionError.

The solution is to configure the maven-compiler plugin in your pom file to generate 1.5 sources like this:

<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>be.cappelleh.test</groupId>
<artifactId>test</artifactId>
<name>test</name>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- dependencies here -->
</dependencies>
</project>


source
o http://maven.apache.org/plugins/maven-compiler-plugin/

Geen opmerkingen:

Een reactie plaatsen