> 1. enforce all users/devs build Aries with 1.5 JDK
-1 on this. The project should be completely buildable from a straight svn
checkout without the user having to put custom junk in there .m2/settings.xml.
(and it should be buildable WITHOUT a settings.xml) Besides, isn't Java5 EOL
soon? I expect more and more people will be using java6 more often so
requiring people to download and install an older JDK just to work on Aries
can cause a tendency shrink your potential pool of contributors.
>2. only enforce build with 1.5 JDK in the release profile & configure
>Hudson to build with JDK 1.5
+1 to this. That works fairly well for CXF. Issues do pop up, but they
get caught and fixed pretty quick. The common issue is @Override annotations
that eclipse like to stick on the implementation methods of an interface.
Not allowed on Java5, but OK on Java6.
Likewise, I'd also have a Hudson build configured for Java6 to catch issues
going the other way. (we've had a couple due to parser/xsl changes, socket
behavior changes, etc...)
Dan
On Friday 23 April 2010 6:55:06 am Jeremy Hughes wrote:
> We're using Java 1.6 JRE library additions in Aries. We've tried to
> make sure Aries builds with 1.5 libraries. While we have the necessary
> configuration on the maven-compiler-plugin to ensure the bytecode is
> 1.5 compatible, the compile fail if there's a 1.6 JRE library
> dependency. What's required is for the compiler plugin to ensure it is
> really using a 1.5 JDK. This can be done by adding this to the
> compiler plugin config in parent/default-parent/java5-parent/pom.xml:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> + <fork>true</fork>
> + <executable>${JAVA_1_5_HOME}/bin/javac</executable>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
>
> and setting the JAVA_1_5_HOME variable in .m2/settings.xml like this:
>
> <settings>
> <profiles>
> <profile>
> <id>aries-compiler</id>
> <properties>
> <JAVA_1_5_HOME>...java home dir of v1.5 jdk...</JAVA_1_5_HOME>
> </properties>
> </profile>
> </profiles>
>
> <activeProfiles>
> <activeProfile>aries-compiler</activeProfile>
> </activeProfiles>
> ...
> </settings>
>
> Personally I'd like to make sure everyone building Aries is configured
> like this but there are pros/cons:
>
> pro: anyone building Aries does so with a v1.5 JDK ensuring there are
> failures if a java 6 library dependency has crept in
> con: settings.xml has to be configured (that's a v. small con IMO)
> con: users downloading sources.zip will also need to configure
> settings.xml (also small but might put some people off slightly).
>
> Another option would be to only enforce building with a v1.5 JDK in
> the release profile - but this effective defers all checking for java
> 6 dependencies to release time. A compromise would be to configure
> Hudson to build with a 1.5 JDK, allow devs and users (using sources
> zip) to build with their default JDK.
>
> I'd just like to get opinion on these options:
>
> 1. enforce all users/devs build Aries with 1.5 JDK
> 2. only enforce build with 1.5 JDK in the release profile & configure
> Hudson to build with JDK 1.5
>
> Any more options?
>
> Thanks,
> Jeremy
--
Daniel Kulp
[email protected]
http://dankulp.com/blog