--- Simon Kitching <[EMAIL PROTECTED]> wrote:
> An option is to put something like this in the
> project.properties:
> 
> maven.junit.fork=true
> maven.junit.jvm=/path/to/jvm12/bin/java
> 
> The code then gets compiled with the very best javac
> implementation
> available (eg 1.5), but unit-tested using the lowest
> JVM supported. As
> long as the unit tests have good coverage this
> should detect any
> problems with code calling methods not available on
> the target JVM.

This works if maven runs its tests using the jar.
Often, the tests are run from a directory of class
files just compiled for the test.

Of course, I should point out that this doesn't really
gain you anything. Since you must have the lower JDK
on your box to run the tests, why not compile using
the lower JDK too. That way, you get the correct
manifest in the jar - something that I often look at.

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to