Martijn Dashorst wrote:
I have been thinking about forcing the JVM in the plugin section of the 1.4 projects. This is possible, but it is highly installation dependent, and therefore not implemented (yet). I was hoping for a <java>1.4</java> section in the pom, which would then load the corresponding platform or machine dependend settings from either the settings.xml (local configuration) or the defaults from some obscure maven config file.
Hmmm. I could be wrong (there's a lot to know about Maven 2), but I don't think this is yet possible. I'm pretty sure Maven compiles against the rt.jar that's beneath your the directory specified by your JAVA_HOME environment variable, and there's no way to override that.
I guess we could fork an Ant task that required -Djava.home.14 and -Djava.home.15 properties, then forked two different Maven 2 builds, but that all seems deeply ugly and inelegant.
Note that provided your dependencies don't use JDK5 classes, javac -target 1.4 won't somehow statically link against JDK5 code. It's the nature of Java that all the linking is done at runtime. Provided all your code compiles using -target 1.4 and you didn't use the 1.5 rt.jar it'll all be fine. (Obviously you can check the rt.jar issue when you do a release by compiling/testing the tagged version against a 1.4 JDK, if that's the way you want to do it. I'd hope Eclipse and/or Bamboo would tell you this much sooner provided you'd set them up properly.)
So a full release complete with JDK1.4 compatibility check would be something like:
Quick check in bamboo/eclipse to make sure it all compiles against rt.jar from 1.4.
mvn release:prepare <enter a tag name, probably use the suggested one so just push enter> svn checkout http://.../tags/foo foo cd foo/wicket-parent mvn test cd ../.. rm -rf foo mvn release:perform Sorted. If mvn test goes wrong, delete the tag, fix, and start again. It's up to you at the end of the day, though, I guess. :) Al
