On Thu, Aug 11, 2011 at 9:01 AM, Daivish Shah <[email protected]> wrote:
> I'm using an ant build.xml that generates classes and compiles them with the
> tools.jar from the JDK.
>
> I am using MAVEN 2.2.1 version. JDK 1.5 to execute MAVEN. As maven 2.2.1
> version supports higher then JDK 1.5 only so I have to use it.

You can downgrade to Maven 2.0.11
(http://maven.apache.org/docs/2.0.11/release-notes.html) which will
support 1.4.

> This maven-antrun-plugin doesn't allow to specify neither source or target
> version for the compiler.
> So, the generated classes are compiled against the currently running JVM
> which is JDK , using its rt.jar and the tools.jar provided in plugin
> dependencies (or placed in the lib/ext directory of the jvm).
>
> As Maven is executed in a 1.5 JVM (jdk1.5.0_22) is needed for my project to
> compile these classes with JDK 1.4.2 version because the server where I want
> to deploy them is running on a 1.4 JVM, so I am getting exception while I am
> compiling with MAVEN plugin from my eclipse or command line.
>
> I couldn't find a way to tell antrun to compile my classes using a different
> java version.
> I tried the following workarounds :

You can upgrade WPS to use java 1.5.

Or you can tell Ant to use a different version of java.
http://ant.apache.org/manual/Tasks/javac.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to