Sorry, I left out part of what I intended to ask...

I am aware of the possibility of forking off with a different javac [1].
I am actually wondering if this is the best way to handle this
situation, or if there is a way to use the same JDK that Maven is
running with but still be certain the artifact will run with an older
JVM.

[1]
http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-u
sing-different-jdk.html 

~Daniel

-----Original Message-----
From: Siegmann Daniel, NY 
Sent: Wednesday, November 28, 2007 10:30 AM
To: Maven Users List
Subject: Compiling for older JVM with newer JDK

I have a project where the code is Java 1.4 (source and target).
However, I want to be able to run Maven with a newer JDK and still be
certain the produced artifact (jar) will run on a 1.4 JVM.

I am under the impression that configuring maven-compiler-plugin with
source and target 1.4 is not sufficient because the code could still be
using stuff from the Java libraries which is only available in a later
version of Java.

What is the best way to accomplish this in Maven? I'm looking for a
solution that will be completely portable, so the actual JDK being used
to run Maven will be irrelevant.

--
Daniel Siegmann
FJA-US, Inc.
512 7th Ave. 15th Flr. New York, NY 10018
(212) 840-2618 x139 

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


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

Reply via email to