maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@codehaus.org>
Subject [jira] (MANTRUN-90) Allow antrun to fork ant process in a different jvm
Date Sun, 02 Mar 2014 10:42:59 GMT

    [ https://jira.codehaus.org/browse/MANTRUN-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=342277#comment-342277
] 

Andreas Veithen commented on MANTRUN-90:
----------------------------------------

There is another interesting use case for this feature. Assume that you have a Maven project
that builds some Ant tasks. You may then want to use maven-antrun-plugin to execute some integration
tests for these tasks. If antrun allowed to fork the ant process (and to pass command line
arguments to the forked process), you could then easily instrument the VM to measure the code
coverage of these tests (e.g. with Jacoco).

> Allow antrun to fork ant process in a different jvm
> ---------------------------------------------------
>
>                 Key: MANTRUN-90
>                 URL: https://jira.codehaus.org/browse/MANTRUN-90
>             Project: Maven 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 was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message