Hi,
I have three poms.xml, 1 parent and 2 childs. The 2 childs pom contains only a
list of dependencies, there is no source code in this project.
Basically I want to create a tar file containing all dependencies listed in
both child 1 and child2.
When I try the mvn package assembly:assembly , I have an error : Failed to
create assembly: Error creating assembly archive distrib: You must set at least
one file.
The weird thing is that if my child packaging is jar, it's works, I obtain a
tar with child.jar(empty of course) and all dependencies. But I do not want
this empty jar, so I specified pachaging pom in the child, but then I got the
error. I also tried without modules: listing all dependencies in a pom and then
I can create a tar of all dependencies, from a pom . Does anyone know how to
resolve this ?
For info this are an example of the different xml file.
So parent looks like:
<groupId>parent</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>parent</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly-dependencies.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>child1</module>
<modulechild2</module>
</modules>
And each child looks like this:
<parent>
<groupId>parent</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<artifactId>child1</artifactId>
<packaging>pom</packaging>
<dependencies>
.... List of jar files
</dependencies>
My assembly-dependencies.xml contains:
<id>distrib</id>
<formats>
<format>tar.gz</format>
</formats>
<moduleSets>
<moduleSet>
<includes>
<include>parent:child1</include>
<include>parent:child2</include>
</includes>
<binaries>
<unpack>false</unpack>
</binaries>
</moduleSet>
</moduleSets>
Mélanie
(c) 2007 Credit Agricole Group. This message is information only and is not an
offer
or solicitation to buy / sell any instruments or services. It may not be
accurate or
complete and is subject to change. Any opinion contained in this message are
those of the
author and are not given or endorsed by Credit Agricole Group unless otherwise
stated
in this message and the authority of the author to so bind Credit Agricole
Group is duly
verified. We may use the information before it is sent. We may have a
position in, make
or offer to make a sale/ purchase in, make a market in or have underwritten
advised on
any of the instruments mentioned, or their underlyings. You should take your own
professional advice on issues relating to its content. This message is
confidential, may be
legally privileged and is intended only for the person or entity to which it is
addressed. If
you are not the intended recipient, you should not read, disseminate,
distribute or copy
this message.
If you are not the intended recipient, please destroy it. No liability is
accepted for this message.