Thursday, August 03, 2006

Maven2, compiling with jdk 1.5

Struggled for time with some 1.5 stuff: actually google search with the error message from the compiler (obviously ;-) )would have fixed it .... and eventually google search did the trick.

Found this which says

Although if you want to tinker with the source and target settings
just do this:
<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>

link is at http://maven.apache.org/maven2/plugins/maven-compiler-
plugin/howto.html


So why am posting this?

Because that misses the "build" tag outside of the plugin. Without taht the project xml (pom.xml) is invalid.

Make it look like

<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>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home