Hello everybody,
I have a problem with the assembly plugin. I used the following
documentation:
http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
I created the additional module to keep my assembly in the parent POM:
...
<modules>
<module>A</module>
<module>B</module>
<module>C</module>
<module>distribution</module>
</modules>
...
and declared the assembly plugin in the parent POM:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptor>config/assembly.xml</descriptor>
</configuration>
</plugin>
after that I declared the new POM in the distribution directory where I also
referenced the parent POM:
<parent>
<groupId>GROUPNAME</groupId>
<artifactId>NAME</artifactId>
<version>VERSION</version>
<relativePath>../pom.xml</relativePath>
</parent>
and also declared the assembly plugin:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>config/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
The assembly.xml is placed in the distribution/config directory and looks
like this:
<id>test</id>
<formats>
<format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>A</include>
</includes>
<binaries>
<outputDirectory>TOOLS</outputDirectory>
<unpack>false</unpack>
</binaries>
</moduleSet>
</moduleSets>
If I execute mvn clean package I get following error message:
[INFO] Reading assembly descriptor: config/assembly.xml
[WARNING] The assembly id test is used more than once.
[WARNING] The following patterns were never triggered in this artifact
inclusion filter:
o 'A'
[WARNING] The following patterns were never triggered in this artifact
inclusion filter:
o 'A'
[WARNING] NOTE: Currently, inclusion of module dependencies may produce
unpredictable results if a version conflict occu
rs.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to create assembly: Error creating assembly archive test: You
must set at least one file.
[INFO]
------------------------------------------------------------------------
If I execute mvn assembly:single then the message that assembly id used more
than once disappears.
I use Maven 2.2.1 on WinXp Pro
Can somebody help me?