Dear all,
 
I am using Maven 2.0.9.  I am trying to create a multi-module assembly 
by having assembly descriptor in my multi-module project.
 
<assembly>
  <id>buildsvr</id>
  <formats>
    <format>dir</format>
  </formats>
  <moduleSets>
    <moduleSet>
      <includes>
        <include>foo:foo-app-ear</include>
        <include>foo:foo-bar-web</include>
        <incldue>foo:foo-another-jar</incldue>
      </includes>
      <binaries>
        <outputDirectory>modules/${artifactId}</outputDirectory>
        <includeDependencies>false</includeDependencies>
        <unpack>false</unpack>
      </binaries>
    </moduleSet>
  </moduleSets>
</assembly>
 
In my POM:
    <profiles>
        <profile>
            <id>mss.buildSvrOutput</id>
            <activation>
                <property>
                    <name>buildSvrOutputDir</name>
                </property>
            </activation>
 
            <build>
                <plugins>
                  <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <configuration>
 
<outputDirectory>${buildSvrOutputDir}</outputDirectory>
                      <descriptors>
 
<descriptor>src/main/assembly/buildSvrOutputAssembly.xml</descriptor>
                      </descriptors>
                    </configuration>
                    <executions>
                      <execution>
                        <id>make-assembly</id> <!-- this is used for
inheritance merges -->
                        <phase>package</phase> <!-- append to the
packaging phase. -->
                        <goals>
                          <goal>assembly</goal> <!-- goals == mojos -->
                        </goals>
                      </execution>
                    </executions>
                    
                  </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
 
What I am trying to do is I want to put artifiacts to be deployed to our
app server
in a dedicate directory.
 
However, when I try to build my project by mvn clean install, mvn clean
package, 
mvn clean install package or even mvn clean install assembly:assembly,
it is found
that modules in my project is built twice.  It seems that one is
triggered by normal
build lifecycle, another one is triggered by the assembly plugin. Is
that a normal 
behavior of assembly?  Or did I do something wrong?
 
Thanks
 
Adrian
 
 


This email is confidential. If you are not the intended recipient, please 
delete it from your system and notify the sender immediately. Any unauthorized 
use, disclosure, dissemination or copying of this email is prohibited. Taifook 
Securities Group, its group companies and their content providers ("Parties") 
shall not be responsible for the accuracy or completeness of this email or its 
attachment, if any, which could contain virus, be corrupted, destroyed, 
incomplete, intercepted, lost or arrive late.   The Parties do not accept 
liability for any damage caused by this email.


Reply via email to