Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.6
-
Fix Version/s: None
-
Labels:None
-
Environment:maven-3.0.3
-
Number of attachments :
Description
I am referencing an ant-file in the configuration of antrun-plugin.
<configuration>
<target>
<ant antfile="subscripts/build.xml">
<target name="mytarget"/>
</ant>
</target>
</configuration>
The file "subscripts/build.xml" is included in the "src/main/resources" folder of a dependency of the antrun-plugin.
<dependency> <groupId>my.ant</groupId> <artifactId>subscripts</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency>
Layout of "my.ant.subscripts" is
src
\main
\resources
\subscripts
\build.xml
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 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.
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. It's kinda annoying 'cos your pom will grow much bigger but it works.
hth,
jordi