No, you should not use moduleSet but dependencySet (or similar, I'm not at
my computer and cannot check syntax).

/Anders (mobile)
Den 28 apr 2011 17.14 skrev "Dmitriy Neretin" <
[email protected]>:
> Well I just removed the assembly declaration from the parent POM. I just
> left there the new distribution module. When I change to the distribution
> folder and execute mvn assembly:single or mvn clean package I get this:
>
> [INFO] Reading assembly descriptor: config/assembly.xml
> [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.
>
> Well the descriptor war reas only once, but we still see the double
warning
> about failed trigger :(
>
> But the assembly configuration is right:
>
> <moduleSets>
> <moduleSet>
> <useAllReactorProjects>true</useAllReactorProjects>
> <includes>
> <include>A</include>
> </includes>
> <binaries>
> <outputDirectory>tools/caseviewer</outputDirectory>
> <unpack>false</unpack>
> </binaries>
> </moduleSet>
> </moduleSets>
>
>
> 2011/4/28 Anders Hammar <[email protected]>
>
>> Ok, the log output indicates that the assembly is executed twice (there
is
>> a
>> warning about the same id used twice).
>> Start by removing any assembly configuration from your parent, to keep
>> things simple. Just add it yo your module. When you get that to work you
>> could start by doing advanced stuff.
>>
>> /Anders
>>
>> On Thu, Apr 28, 2011 at 15:37, Dmitriy Neretin <
>> [email protected]> wrote:
>>
>> > Thanks for the reply!
>> >
>> > 2011/4/28 Anders Hammar <[email protected]>
>> >
>> > > The "declaration" in your parent, is that a binding? Or is it in
>> > > pluginManagement?
>> > >
>> >
>> > Well I don't really understand what do you mean with binding :) The
>> > assembly
>> > plugin is declared between the <plugins/> tags:
>> >
>> > <plugins>
>> > <plugin>
>> > Assembly declaration
>> > </plugin>
>> > </plugins>
>> >
>> >
>> > >
>> > > Why are configuring the descriptor in the parent? Are you trying to
>> make
>> > an
>> > > assembly in the parent as well as in the child?
>> > >
>> >
>> > I configure the descriptor in the parent because I have read this under
>> the
>> > link below (maven documentation). And I am not really shure it is
>> right...
>> > I
>> > am trying now to make an assembly from the child project but the main
>> > target
>> > is preety simple: After compiling (mvn install) of the whole project
>> (from
>> > the parent level) I want to find in the distribution directory some
>> > artifacts like binaries, some skripts, zips etc. I have already used
this
>> > plugin for a child project to build a zip file and it worked :(
>> >
>> > >
>> > > /Anders
>> > > On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin <
>> > > [email protected]> wrote:
>> > >
>> > > > 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?
>> > > >
>> > >
>> >
>>

Reply via email to