Hi there,
I've noticed a weird behaviour with the mave-assembly-plugin (2.1-SNAPSHOT) and still not sure whether it's a bug. Suppose you have a multiproject M with three jar modules (A, B, C) where B uses the maven-assembly-plugin by attaching 'assembly' goal to the 'package' phase.

+ M
   + A
   + B (depends on A and uses assembly plugin)
   + C (depends on B)

pom.xml snippet of module B:
   ...
/    <build>
       <plugins>
           <plugin>
               <artifactId>maven-assembly-plugin</artifactId>
               <executions>
                   <execution>
                       <phase>package</phase>
                       <goals>
                          <goal>assembly</goal>
                       </goals>
                      <configuration>
                          <descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
                          </descriptors>
                      </configuration>
                   </execution>
               </executions>
           </plugin>
       </plugins>
   </build>
   ...
/
When running 'mvn package' in the parent project (M), the following happens:
1) A.jar is built
2) B.jar is built and a message is printed saying that 'assembly:assembly' was being prepared
3) A.jar is built again
4) B.jar is built again and a warning message is printed out: "Removing: assembly from forked lifecycle, to prevent recursive invocation"
5) C.jar is built for the first time
6) B-bin.tar.gz an B-bin.zip are generated
7) C.jar is built again

It seems like B triggers the 'jar:jar' goal again for each module before assemblying.
Not sure whether it's a bug or something I am doing wrong.
Any help will be appreciated.

Thanks,
Dário


Reply via email to