[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Re: Assembly of a multi-module project
From:       Stefano Fornari <stefano.fornari () gmail ! com>
Date:       2013-08-18 8:56:49
Message-ID: CAJ_7fdJ7KcXqWaLCyC9PrYxj4YmuHzpUbE-1KzfY8WPgXwKJGQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,
thanks for the reply. I figured out I was misinterpreting how to use
moduleSets. I am attaching the fixed one for anyone interested.

Cheers,
Ste


On Fri, Aug 16, 2013 at 6:06 PM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

> You might want to break this up into pieces and see what part fails.
> This is too big and complicated at the moment for most people in the forum
> to dig through.
> Find out which piece is failing.
>
> Ron
>
>
> On 16/08/2013 2:22 AM, Stefano Fornari wrote:
>
>> Hi All,
>> I searched the list and read the assembly plugin documentation, but I
>> cannot understand what I am doing wrong. I have a master pom that contains
>> a number of modules (See attached). I want to use the assembly plugin to
>> package a final distribution containing what's generated by the modules. I
>> understand I should use ModuleSets in the assembly (also attached).
>> But when I run it, get the following output and the assembly plugin
>> complains about no files included (that is consistent with the message that
>> says no modules are processed). What am I doing wrong?
>>
>> Thanks in advance
>>
>> --
>> ------------------------------**------------------------------**
>> ------------
>> The requested profile "personal" could not be activated because it does
>> not exist.
>> Failed to execute goal org.apache.maven.plugins:**
>> maven-assembly-plugin:2.4:**assembly (default-cli) on project One:
>> Failed to create assembly: Error creating assembly archive all: You must
>> set at least one file. -> [Help 1]
>> org.apache.maven.lifecycle.**LifecycleExecutionException: Failed to
>> execute goal org.apache.maven.plugins:**maven-assembly-plugin:2.4:**assembly
>> (default-cli) on project One: Failed to create assembly: Error creating
>> assembly archive all: You must set at least one file.
>>     at org.apache.maven.lifecycle.**internal.MojoExecutor.execute(**
>> MojoExecutor.java:217)
>>     at org.apache.maven.lifecycle.**internal.MojoExecutor.execute(**
>> MojoExecutor.java:153)
>>     at org.apache.maven.lifecycle.**internal.MojoExecutor.execute(**
>> MojoExecutor.java:145)
>>     at org.apache.maven.lifecycle.**internal.**LifecycleModuleBuilder.**
>> buildProject(**LifecycleModuleBuilder.java:**84)
>>     at org.apache.maven.lifecycle.**internal.**LifecycleModuleBuilder.**
>> buildProject(**LifecycleModuleBuilder.java:**59)
>>     at org.apache.maven.lifecycle.**internal.LifecycleStarter.**
>> singleThreadedBuild(**LifecycleStarter.java:183)
>>     at org.apache.maven.lifecycle.**internal.LifecycleStarter.**
>> execute(LifecycleStarter.java:**161)
>>     at org.apache.maven.DefaultMaven.**doExecute(DefaultMaven.java:**320)
>>     at org.apache.maven.DefaultMaven.**execute(DefaultMaven.java:156)
>>     at org.apache.maven.cli.MavenCli.**execute(MavenCli.java:537)
>>     at org.apache.maven.cli.MavenCli.**doMain(MavenCli.java:196)
>>     at org.apache.maven.cli.MavenCli.**main(MavenCli.java:141)
>>     at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
>>     at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
>> NativeMethodAccessorImpl.java:**57)
>>     at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
>> DelegatingMethodAccessorImpl.**java:43)
>>     at java.lang.reflect.Method.**invoke(Method.java:606)
>>     at org.codehaus.plexus.**classworlds.launcher.Launcher.**
>> launchEnhanced(Launcher.java:**290)
>>     at org.codehaus.plexus.**classworlds.launcher.Launcher.**
>> launch(Launcher.java:230)
>>     at org.codehaus.plexus.**classworlds.launcher.Launcher.**
>> mainWithExitCode(Launcher.**java:409)
>>     at org.codehaus.plexus.**classworlds.launcher.Launcher.**
>> main(Launcher.java:352)
>> Caused by: org.apache.maven.plugin.**MojoExecutionException: Failed to
>> create assembly: Error creating assembly archive all: You must set at least
>> one file.
>>     at org.apache.maven.plugin.**assembly.mojos.**
>> AbstractAssemblyMojo.execute(**AbstractAssemblyMojo.java:495)
>>     at org.apache.maven.plugin.**DefaultBuildPluginManager.**executeMojo(
>> **DefaultBuildPluginManager.**java:101)
>>     at org.apache.maven.lifecycle.**internal.MojoExecutor.execute(**
>> MojoExecutor.java:209)
>>     ... 19 more
>> Caused by: org.apache.maven.plugin.**assembly.archive.**ArchiveCreationException:
>> Error creating assembly archive all: You must set at least one file.
>>     at org.apache.maven.plugin.**assembly.archive.**
>> DefaultAssemblyArchiver.**createArchive(**DefaultAssemblyArchiver.java:**
>> 190)
>>     at org.apache.maven.plugin.**assembly.mojos.**
>> AbstractAssemblyMojo.execute(**AbstractAssemblyMojo.java:436)
>>     ... 21 more
>> Caused by: org.codehaus.plexus.archiver.**ArchiverException: You must
>> set at least one file.
>>     at org.codehaus.plexus.archiver.**tar.TarArchiver.execute(**
>> TarArchiver.java:159)
>>     at org.codehaus.plexus.archiver.**AbstractArchiver.**createArchive(**
>> AbstractArchiver.java:910)
>>     at org.apache.maven.plugin.**assembly.archive.archiver.**
>> AssemblyProxyArchiver.**createArchive(**AssemblyProxyArchiver.java:**512)
>>     at org.apache.maven.plugin.**assembly.archive.**
>> DefaultAssemblyArchiver.**createArchive(**DefaultAssemblyArchiver.java:**
>> 186)
>>     ... 22 more
>>
>>
>> For more information about the errors and possible solutions, please read
>> the following articles:
>> [Help 1] http://cwiki.apache.org/**confluence/display/MAVEN/**
>> MojoExecutionException<http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException>
>>
>> After correcting the problems, you can resume the build with the command
>>   mvn <goals> -rf :One
>>
>>
>>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email:rwheeler@artifact-**software.com<email%3Arwheeler@artifact-software.com>
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ste

[Attachment #5 (text/html)]

<div dir="ltr"><div><div>Hi,<br></div>thanks for the reply. I figured out I was \
misinterpreting how to use moduleSets. I am attaching the fixed one for anyone \
interested.<br><br></div>Cheers,<br>Ste<br></div><div class="gmail_extra"> \
<br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 6:06 PM, Ron Wheeler <span \
dir="ltr">&lt;<a href="mailto:rwheeler@artifact-software.com" \
target="_blank">rwheeler@artifact-software.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> You might want to break this up into pieces and see what \
part fails.<br> This is too big and complicated at the moment for most people in the \
forum to dig through.<br> Find out which piece is failing.<br>
<br>
Ron<div class="im"><br>
<br>
On 16/08/2013 2:22 AM, Stefano Fornari wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im"> Hi All,<br>
I searched the list and read the assembly plugin documentation, but I cannot \
understand what I am doing wrong. I have a master pom that contains a number of \
modules (See attached). I want to use the assembly plugin to package a final \
distribution containing what&#39;s generated by the modules. I understand I should \
use ModuleSets in the assembly (also attached).<br>

But when I run it, get the following output and the assembly plugin complains about \
no files included (that is consistent with the message that says no modules are \
processed). What am I doing wrong?<br> <br>
Thanks in advance<br>
<br>
-- <br></div>
------------------------------<u></u>------------------------------<u></u>------------<br>
 The requested profile &quot;personal&quot; could not be activated because it does \
not exist.<br> Failed to execute goal \
org.apache.maven.plugins:<u></u>maven-assembly-plugin:2.4:<u></u>assembly \
(default-cli) on project One: Failed to create assembly: Error creating assembly \
archive all: You must set at least one file. -&gt; [Help 1]<br>

org.apache.maven.lifecycle.<u></u>LifecycleExecutionException: Failed to execute goal \
org.apache.maven.plugins:<u></u>maven-assembly-plugin:2.4:<u></u>assembly \
(default-cli) on project One: Failed to create assembly: Error creating assembly \
archive all: You must set at least one file.<br>

    at org.apache.maven.lifecycle.<u></u>internal.MojoExecutor.execute(<u></u>MojoExecutor.java:217)<br>
  at org.apache.maven.lifecycle.<u></u>internal.MojoExecutor.execute(<u></u>MojoExecutor.java:153)<br>
  at org.apache.maven.lifecycle.<u></u>internal.MojoExecutor.execute(<u></u>MojoExecutor.java:145)<br>
  at org.apache.maven.lifecycle.<u></u>internal.<u></u>LifecycleModuleBuilder.<u></u>buildProject(<u></u>LifecycleModuleBuilder.java:<u></u>84)<br>
  at org.apache.maven.lifecycle.<u></u>internal.<u></u>LifecycleModuleBuilder.<u></u>buildProject(<u></u>LifecycleModuleBuilder.java:<u></u>59)<br>
  at org.apache.maven.lifecycle.<u></u>internal.LifecycleStarter.<u></u>singleThreadedBuild(<u></u>LifecycleStarter.java:183)<br>
  at org.apache.maven.lifecycle.<u></u>internal.LifecycleStarter.<u></u>execute(LifecycleStarter.java:<u></u>161)<br>
  at org.apache.maven.DefaultMaven.<u></u>doExecute(DefaultMaven.java:<u></u>320)<br>
    at org.apache.maven.DefaultMaven.<u></u>execute(DefaultMaven.java:156)<br>
    at org.apache.maven.cli.MavenCli.<u></u>execute(MavenCli.java:537)<br>
    at org.apache.maven.cli.MavenCli.<u></u>doMain(MavenCli.java:196)<br>
    at org.apache.maven.cli.MavenCli.<u></u>main(MavenCli.java:141)<br>
    at sun.reflect.<u></u>NativeMethodAccessorImpl.<u></u>invoke0(Native Method)<br>
    at sun.reflect.<u></u>NativeMethodAccessorImpl.<u></u>invoke(<u></u>NativeMethodAccessorImpl.java:<u></u>57)<br>
  at sun.reflect.<u></u>DelegatingMethodAccessorImpl.<u></u>invoke(<u></u>DelegatingMethodAccessorImpl.<u></u>java:43)<br>
  at java.lang.reflect.Method.<u></u>invoke(Method.java:606)<br>
    at org.codehaus.plexus.<u></u>classworlds.launcher.Launcher.<u></u>launchEnhanced(Launcher.java:<u></u>290)<br>
  at org.codehaus.plexus.<u></u>classworlds.launcher.Launcher.<u></u>launch(Launcher.java:230)<br>
  at org.codehaus.plexus.<u></u>classworlds.launcher.Launcher.<u></u>mainWithExitCode(Launcher.<u></u>java:409)<br>
  at org.codehaus.plexus.<u></u>classworlds.launcher.Launcher.<u></u>main(Launcher.java:352)<br>
 Caused by: org.apache.maven.plugin.<u></u>MojoExecutionException: Failed to create \
assembly: Error creating assembly archive all: You must set at least one file.<br>  \
at org.apache.maven.plugin.<u></u>assembly.mojos.<u></u>AbstractAssemblyMojo.execute(<u></u>AbstractAssemblyMojo.java:495)<br>
  at org.apache.maven.plugin.<u></u>DefaultBuildPluginManager.<u></u>executeMojo(<u></u>DefaultBuildPluginManager.<u></u>java:101)<br>
  at org.apache.maven.lifecycle.<u></u>internal.MojoExecutor.execute(<u></u>MojoExecutor.java:209)<br>
                
    ... 19 more<br>
Caused by: org.apache.maven.plugin.<u></u>assembly.archive.<u></u>ArchiveCreationException: \
Error creating assembly archive all: You must set at least one file.<br>  at \
org.apache.maven.plugin.<u></u>assembly.archive.<u></u>DefaultAssemblyArchiver.<u></u>createArchive(<u></u>DefaultAssemblyArchiver.java:<u></u>190)<br>
  at org.apache.maven.plugin.<u></u>assembly.mojos.<u></u>AbstractAssemblyMojo.execute(<u></u>AbstractAssemblyMojo.java:436)<br>
                
    ... 21 more<br>
Caused by: org.codehaus.plexus.archiver.<u></u>ArchiverException: You must set at \
least one file.<br>  at \
org.codehaus.plexus.archiver.<u></u>tar.TarArchiver.execute(<u></u>TarArchiver.java:159)<br>
  at org.codehaus.plexus.archiver.<u></u>AbstractArchiver.<u></u>createArchive(<u></u>AbstractArchiver.java:910)<br>
  at org.apache.maven.plugin.<u></u>assembly.archive.archiver.<u></u>AssemblyProxyArchiver.<u></u>createArchive(<u></u>AssemblyProxyArchiver.java:<u></u>512)<br>
  at org.apache.maven.plugin.<u></u>assembly.archive.<u></u>DefaultAssemblyArchiver.<u></u>createArchive(<u></u>DefaultAssemblyArchiver.java:<u></u>186)<br>
                
    ... 22 more<br>
<br>
<br>
For more information about the errors and possible solutions, please read the \
following articles:<br> [Help 1] <a \
href="http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException" \
target="_blank">http://cwiki.apache.org/<u></u>confluence/display/MAVEN/<u></u>MojoExecutionException</a><br>
 <br>
After correcting the problems, you can resume the build with the command<br>
  mvn &lt;goals&gt; -rf :One<br>
<br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Ron Wheeler<br>
President<br>
Artifact Software Inc<br>
<a href="mailto:email%3Arwheeler@artifact-software.com" \
                target="_blank">email:rwheeler@artifact-<u></u>software.com</a><br>
skype: ronaldmwheeler<br>
phone: <a href="tel:866-970-2435%2C%20ext%20102" value="+18669702435" \
target="_blank">866-970-2435, ext 102</a><br> <br>
<br>
------------------------------<u></u>------------------------------<u></u>---------<br>
 To unsubscribe, e-mail: <a href="mailto:users-unsubscribe@maven.apache.org" \
target="_blank">users-unsubscribe@maven.<u></u>apache.org</a><br> For additional \
commands, e-mail: <a href="mailto:users-help@maven.apache.org" \
target="_blank">users-help@maven.apache.org</a><br> <br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Ste
</div>

--047d7b6d7ada1eab1404e4350120--


["bin.xml" (text/xml)]

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 \
http://maven.apache.org/xsd/assembly-1.1.2.xsd">  <id>dist</id>
    <formats>
        <format>tar.gz</format>
        <!-- uncomment to create the archive directory -->
        <format>dir</format>
        <!-- -->
    </formats>

    <includeBaseDirectory>false</includeBaseDirectory>

    <moduleSets>
        <!--
          DiskOne
        -->
        <moduleSet>
            <includes>
                <include>ste.one:disk</include>
            </includes>
            <sources>
                <includeModuleDirectory>false</includeModuleDirectory>
                <fileSets>
                    <fileSet>
                        <outputDirectory>webapps/home</outputDirectory>
                        <directory>src/main/webapp</directory>
                    </fileSet>
                </fileSets>
            </sources>
        </moduleSet>

        <!--
          CaOne
        -->
        <moduleSet>
            <includes>
                <include>ste.one:ca</include>
            </includes>
            <sources>
                <includeModuleDirectory>false</includeModuleDirectory>
                <fileSets>
                    <fileSet>
                        <outputDirectory>webapps/ca</outputDirectory>
                        <directory>src/main/webapp</directory>
                    </fileSet>
                </fileSets>
            </sources>
        </moduleSet>

        <!--
          DevOne
        -->
        <moduleSet>
            <includes>
                <include>ste.one:dev</include>
            </includes>
            <sources>
                <includeModuleDirectory>false</includeModuleDirectory>
                <fileSets>
                    <fileSet>
                        <outputDirectory>webapps/console</outputDirectory>
                        <directory>src/main/webapp/console</directory>
                    </fileSet>
                </fileSets>
            </sources>
        </moduleSet>

        <!--
          ServerOne
        -->
        <moduleSet>
            <includes>
                <include>ste.one:server</include>
            </includes>
            <sources>
                <includeModuleDirectory>false</includeModuleDirectory>
                <fileSets>
                    <fileSet>
                        <directory>src/main/resources/bin</directory>
                        <outputDirectory>bin</outputDirectory>
                        <lineEnding>unix</lineEnding>
                        <fileMode>0775</fileMode>
                        <filtered>true</filtered>
                        <includes>
                            <include>*</include>
                        </includes>
                        <excludes>
                            <exclude>*.formatted</exclude>
                        </excludes>
                    </fileSet>
                    <fileSet>
                        <directory>src/main/resources/etc</directory>
                        <outputDirectory>etc</outputDirectory>
                        <filtered>true</filtered>
                        <includes>
                            <include>*.properties</include>
                        </includes>
                        <excludes>
                            <exclude>*.formatted</exclude>
                        </excludes>
                    </fileSet>
                    <fileSet>
                        <directory>src/main/resources/etc</directory>
                        <outputDirectory>etc</outputDirectory>
                        <filtered>false</filtered>
                        <includes>
                            <include>*</include>
                        </includes>
                        <excludes>
                            <exclude>*.properties</exclude>
                        </excludes>
                    </fileSet>
                    <fileSet>
                        <directory>src/main/resources/diskone</directory>
                        <outputDirectory>diskone</outputDirectory>
                        <filtered>false</filtered>
                        <includes>
                            <include>*</include>
                        </includes>
                    </fileSet>
                    <fileSet>
                        <directory>src/main/webapp</directory>
                        <outputDirectory>webapps</outputDirectory>
                        <filtered>true</filtered>
                        <includes>
                            <include>**/*</include>
                        </includes>
                        <excludes>
                            <exclude>*.formatted</exclude>
                        </excludes>
                    </fileSet>
                </fileSets>

            </sources>
        </moduleSet>

        <!--
          All binaries
        -->
        <moduleSet>
            <excludes>
                <exclude>*:war:*</exclude>
                <exclude>ste.one:ca</exclude>
                <exclude>ste.one:dev</exclude>
                <exclude>ste.one:disk</exclude>
            </excludes>
            <binaries>
                <outputDirectory>lib</outputDirectory>
                <!--
                    We want One jar names with layout \
ste.one.{artifact}-{version}.jar  so that it is easy to find them in the lib \
                directory
                -->
                <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}.${artifact.type}</outputFileNameMapping>
  <unpack>false</unpack>
                <excludes>
                    <exclude>*:tests:*</exclude>
                </excludes>
                <includeDependencies>true</includeDependencies>
                <dependencySets>
                    <dependencySet>
                        <scope>runtime</scope>
                        <outputDirectory>lib</outputDirectory>
                    </dependencySet>
                </dependencySets>
            </binaries>
        </moduleSet>
    </moduleSets>

<!--

        <fileSets>
            <fileSet>
                <directory>src/main/resources/bin</directory>
                <outputDirectory>bin</outputDirectory>
                <lineEnding>unix</lineEnding>
                <fileMode>0775</fileMode>
                <filtered>true</filtered>
                <includes>
                    <include>*</include>
                </includes>
                <excludes>
                    <exclude>*.formatted</exclude>
                </excludes>
            </fileSet>
            <fileSet>
                <directory>src/main/resources/etc</directory>
                <outputDirectory>etc</outputDirectory>
                <filtered>true</filtered>
                <includes>
                    <include>*.properties</include>
                </includes>
                <excludes>
                    <exclude>*.formatted</exclude>
                </excludes>
            </fileSet>
            <fileSet>
                <directory>src/main/resources/etc</directory>
                <outputDirectory>etc</outputDirectory>
                <filtered>false</filtered>
                <includes>
                    <include>*</include>
                </includes>
                <excludes>
                    <exclude>*.properties</exclude>
                </excludes>
            </fileSet>
            <fileSet>
                <directory>src/main/resources/diskone</directory>
                <outputDirectory>diskone</outputDirectory>
                <filtered>false</filtered>
                <includes>
                    <include>*</include>
                </includes>
            </fileSet>
            <fileSet>
                <directory>src/main/webapp</directory>
                <outputDirectory>webapps</outputDirectory>
                <filtered>true</filtered>
                <includes>
                    <include>**/*</include>
                </includes>
                <excludes>
                    <exclude>*.formatted</exclude>
                </excludes>
            </fileSet>
        </fileSets>
    -->
</assembly>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic