Allow antrun to fork ant process in a different jvm
---------------------------------------------------

                 Key: MANTRUN-90
                 URL: http://jira.codehaus.org/browse/MANTRUN-90
             Project: Maven 2.x Antrun Plugin
          Issue Type: Improvement
    Affects Versions: 1.1
         Environment: Windows, Maven 2.0.9
            Reporter: Clement Denis
         Attachments: antrun-conf.xml

I'm using an ant task (provided by Weblogic) that generates classes and 
compiles them with the tools.jar from the JDK. 
This task doesn't allow to specify neither source or target version for the 
compiler.

So, the generated classes are compiled against the currently running JVM, 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 (1.5 is needed for some modules in my 
project), these classes are compiled in 1.5.
The server where I want to deploy them is running on a 1.4 JVM, so the 
generated classes can't run in this server.

I couldn't find a way to tell antrun to compile my classes using a different 
java version.

I tried the following workarounds :
- change the tools.jar dependency to point to a 1.4 version => as the compiler 
uses the rt.jar from the currently running 1.5 JVM, the class file version 
doesn't match (version 49.0, expecting 48.0)
- add a dependency to a 1.4 rt.jar => it doesn't change anything, as the rt.jar 
should be specified in the boot classpath.

The possible solutions would be :
- allow antrun to fork ant process to a different jvm
- allow antrun to override the boot classpath


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to