commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <>
Subject Re: [configuration] Compilation under Java 1.4
Date Tue, 15 Feb 2011 20:23:41 GMT
Am 10.02.2011 13:09, schrieb sebb:
> On 10 February 2011 07:27, Ralph Goers<>  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
>>>>>> 1.4.  I've run this build many times successfully (I use 1.6).  I
>>>>>> see any problem requiring the build to use Maven 2.2.x or Maven 3
>>>>>> 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,
>>>>> 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

Thanks for the pointer. I will try to exclude the affected classes if 
the profile for Java 1.4 is active.


>> Ralph
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message