You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Clement Denis (JIRA)" <ji...@codehaus.org> on 2008/04/19 20:00:55 UTC

[jira] Created: (MANTRUN-90) Allow antrun to fork ant process in a different jvm

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

        

[jira] Commented: (MANTRUN-90) Allow antrun to fork ant process in a different jvm

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=131463#action_131463 ] 

Benjamin Bentmann commented on MANTRUN-90:
------------------------------------------

bq. The possible solutions would be :
- Alternatively, ask Weblogic to extend their Ant task with parameters for source/target. IMHO the cleanest solution since it would allow to compile your classes without the need for a separate JDK-1.4 installation.


> 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