You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jordi Gerona (JIRA)" <ji...@codehaus.org> on 2011/12/30 16:19:02 UTC

[jira] (MANTRUN-161) antrun does not resolve build.xml from classpath

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

Jordi Gerona commented on MANTRUN-161:
--------------------------------------

This is happening to me too with maven 3.0.3 and antrun 1.7

I'm trying to achieve the same behavior as [Checkstyle plugin multimodule configuration|http://goo.gl/jmykx]. 

As a workaround, you can use {{dependency:unpack}} plugin to unpack the project resources and then use {{$\{project.build.directory\}/dependencies/subscripts/build.xml}} in your ant definition. Example [here|http://goo.gl/xfzzx]. It's kinda annoying 'cos your pom will grow much bigger but it works.

hth,
jordi


                
> antrun does not resolve build.xml from classpath
> ------------------------------------------------
>
>                 Key: MANTRUN-161
>                 URL: https://jira.codehaus.org/browse/MANTRUN-161
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: maven-3.0.3
>            Reporter: Frank Jakop
>
> I am referencing an ant-file in the configuration of antrun-plugin. 
> {noformat} 
> <configuration>
>   <target>
>     <ant antfile="subscripts/build.xml">
>       <target name="mytarget"/>
>     </ant>
>   </target>
> </configuration>
> {noformat} 
> The file "subscripts/build.xml" is included in the "src/main/resources" folder of a dependency of the antrun-plugin.
> {noformat} 
> <dependency>
>   <groupId>my.ant</groupId>
>   <artifactId>subscripts</artifactId>
>   <version>0.0.1-SNAPSHOT</version>
> </dependency>
> {noformat} 
> Layout of "my.ant.subscripts" is
> {noformat} 
> src
>  \main
>    \resources
>      \subscripts
>        \build.xml
> {noformat} 
> which is correctly packaged.
> Given the basedir name "basedir", the antrun tells me on execution that the file "basedir/subscripts/build.xml" is not found.
> My use-case includes about 30 projects, which execute the same ant target in their build lifecycle. I could solve the problem by putting a copy of "subscripts/build.xml" in every project's directory, but that is a very bad way.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira