You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pete <pe...@gmail.com> on 2006/03/21 12:49:40 UTC
M2 assembly plugin works from wrong directory if run via Reactor
1) I am using assembly:assembly during the normal lifecycle 'package'
phase, on a Maven2 submodule's pom
with a descriptor as follows :-
<assembly>
<id>dep</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>target</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.ear</include>
<include>*.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/assembly/resources</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.xml</include>
</includes>
</fileSet>
</fileSets>
</assembly>
All works fine if this is executed from the submodule's pom.xml directory,
but if it is run via the reactor from parent project, then the
value for <directory>target</directory>
becomes the location relative to the parent pom (which obviously doesn't
have a target directory)
How can I make the target relative to the child project always ?
Here's the child's pom.xml part :-
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/main/assembly/descriptor.xml</descriptor>
</descriptors>
<finalName>${project.build.finalName}</finalName>
</configuration>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
Re: M2 assembly plugin works from wrong directory if run via Reactor
Posted by jerome lacoste <je...@gmail.com>.
On 3/21/06, Pete <pe...@gmail.com> wrote:
> 1) I am using assembly:assembly during the normal lifecycle 'package'
> phase, on a Maven2 submodule's pom
>
> with a descriptor as follows :-
>
>
> <assembly>
> <id>dep</id>
> <formats>
> <format>zip</format>
> </formats>
> <includeBaseDirectory>false</includeBaseDirectory>
>
> <fileSets>
> <fileSet>
> <directory>target</directory>
> <outputDirectory></outputDirectory>
> <includes>
> <include>*.ear</include>
> <include>*.jar</include>
> </includes>
> </fileSet>
>
> <fileSet>
> <directory>src/main/assembly/resources</directory>
> <outputDirectory></outputDirectory>
> <includes>
> <include>*.xml</include>
> </includes>
>
> </fileSet>
> </fileSets>
> </assembly>
>
> All works fine if this is executed from the submodule's pom.xml directory,
> but if it is run via the reactor from parent project, then the
>
> value for <directory>target</directory>
> becomes the location relative to the parent pom (which obviously doesn't
> have a target directory)
>
> How can I make the target relative to the child project always ?
>
> Here's the child's pom.xml part :-
>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <executions>
> <execution>
> <phase>package</phase>
> <configuration>
> <descriptors>
> <descriptor>src/main/assembly/descriptor.xml</descriptor>
> </descriptors>
> <finalName>${project.build.finalName}</finalName>
> </configuration>
> <goals>
> <goal>assembly</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
I believe this bug was fixed on the trunk 5 months ago. Unfortunately
the fix didn't make it into the 2.0.x branch. Try using the
2.1-SNAPSHOT version from the snapshots repository.
Jerome
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org