On 10 February 2011 07:27, Ralph Goers <ralph.go...@dslextreme.com> wrote: > > On Feb 9, 2011, at 11:04 PM, Oliver Heger wrote: > >> Am 10.02.2011 00:48, schrieb Ralph Goers: >>> >>> On Feb 9, 2011, at 2:54 PM, Jörg Schaible wrote: >>> >>>> Hi Ralph, >>>> >>>> Ralph Goers wrote: >>>> >>>>> The latest versions of Maven require JDK 1.5. The pom (or the Commons >>>>> Parent) should be specifying that the target for Commons Configuration is >>>>> 1.4. I've run this build many times successfully (I use 1.6). I don't >>>>> see any problem requiring the build to use Maven 2.2.x or Maven 3 and/or >>>>> have a minimum JDK version for that. I would have a problem if this >>>>> prevented the result from running in a JDK 1.4 VM. >>>> >>>> but this is what Oliver told: vfs snapshot was compiled with target 1.5, so >>>> you cannot compile and run with a target 1.4. >>> >>> I just did an svn up on both vfs and configuration and then did a mvn clean >>> install on each. Both build and run their unit tests with no problems. >>> >>> I believe this problem only exists when you build using JDK 1.4, which is >>> also the way I read Oliver's message. >>> >>> Ralph >>> >> Yes, building on a JDK 1.4 is no more possible (builds on JDK 1.5+ work >> without problems). This is a bit strange as we still target this version. I >> prefer building on the target JDK because otherwise it is easy to introduce >> incompatibilities, e.g. by using library classes or methods available only >> on higher JDKs. >> >> So in any case to ensure compatibility, it would be necessary to run at >> least the tests on a 1.4 runtime. How can we do this with the least effort? >> Can this be done with maven or do we need an ant script? >> >> The generated configuration jar should still be compatible with 1.4, but if >> you use classes depending on vfs, you will of course need a 1.5 runtime. > > It should be possible to create a profile that excludes the unit tests that > use VFS if the jdk is 1.4. If the code has already been compiled then > running mvn test with maven 2.0.x and jdk 1.4 should work since it won't try > to compile anything.
FYI: Note that the Commons Parent POM was changed some while ago to add profiles java-1.4, java-1.3 etc. which change the Java version used for compile and test without needing to change the JVM used to run Maven itself. See http://commons.apache.org/commons-parent-pom.html#Testing_with_different_Java_versions > Ralph > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org