May help :
<!--
make sure our code doesn't have 1.6 dependencies except where
we know it
see
* http://mojo.codehaus.org/animal-sniffer/index.html
*
http://weblogs.java.net/blog/kohsuke/archive/2008/11/compiling_with.html
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java15</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
On Fri, Jul 23, 2010 at 05:28, Michael O'Cleirigh
<[email protected]> wrote:
> Hello,
>
> The hudson server I had running used Java 6 for some internal projects and
> I was relying on the maven compiler plugin to ensure that the
> wicketstuff-core projects were built in a way compatible with Java 5.
>
> With the switch to the wicketstuff.org based hudson a 1.5 JDK is being used
> for building and it has revealed issues in a few of the modules that use
> Java 6 features that break the build.
>
> According to this question the java 6 JDK is buggy in this regard and is
> probably not generating valid java 5 class files:
> http://stackoverflow.com/questions/1193184/does-maven-really-honor-the-source-tag-in-the-compiler-plugin
>
> I think its likely that the wicketstuff-core releases and snapshots that
> I've been building are not 100% java 5 compatible.
>
> What I am thinking is that a separate maven project tree needs to be created
> that can be build the java 6 projects using the java 6 JDK.
>
> This is the structure I am envisaging:
>
> /trunk/
>
> wicketstuff-core/ this is the existing project tree (or maybe it should
> be refactored to wicketstuff-core-java5 for consistency)
>
> wicketstuff-core-java6/ this is the project tree for java6 projects
>
> The wicketstuff-core-java6/pom.xml would declare a parent of
> wicketstuff-core/pom.xml but would override the maven compiler plugin for
> 1.6 instead of 1.5.
>
> Hudson would have a separate builder for the java6 projects that would use
> the java 6 JDK.
>
> I think the groupID and artifactID's can remain the same with this approach
> and it would decouple from any version change with wicket 1.5 as projects
> could migrate to the java6 tree as required.
>
> Some of the project problems are:
> 1. @Override annotation on interface implementing method (invalid in java 5
> default in java 6)
> 2. Inclusion of Java 6 compiled dependencies (class file has wrong version
> 50.0, should be 49.0)
> 3. Use of Java 6 API like "string".isEmpty() method.
>
> Once we figure out how to handle java5 vs java6 I will create a 1.4.9.3
> release to make things 100% compatible.
>
> Regards,
>
> Mike
>
>