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>

Reply via email to