maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric THOMAS <webdoubl...@hotmail.com>
Subject maven-assembly-plugin binaries usage
Date Wed, 23 Oct 2013 12:03:32 GMT
Hi,

I was trying to use the moduleSets/binaries to get all my Flex Modules and
their runtime locales packed.
It works fine launch from the parent module but not from the parent's parent
module:

Failed to execute goal
org.apache.maven.plugins:maven-assembly-plugin:2.4:single (make-assembly) on
project Distribution: Failed to create assembly: Error creating assembly
archive modules: You must set at least one file.

+parent module
    |
    + parent FlexModules
        |
        +Module1
        +DistributionModule

Module1 generates artifacts with classifiers for the locales, so, I've got
module1.swf, module1_en_US.swf and so on.

The DistributionModule is where I use the assembly plugin to pack my
modules:

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                               
<descriptor>src/assembly/distro.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

And my assembly:

<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>modules</id>

    <formats>
        <format>zip</format>
    </formats>

    <moduleSets>
        <moduleSet>
            
            <useAllReactorProjects>true</useAllReactorProjects>

            
            <includes>
                <include>com.cpa.global.memotech.modules:*:swf:*</include>
            </includes>
            <excludes>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:link-report</exclude>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:config</exclude>
            </excludes>
            <binaries>
               
<outputDirectory>modules/${module.artifactId}</outputDirectory>
               
<outputFileNameMapping>${module.artifactId}.${module.extension}</outputFileNameMapping>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>

        <moduleSet>
            
            <useAllReactorProjects>true</useAllReactorProjects>

            
            <includes>
                <include>com.cpa.global.memotech.modules:*:swf:*</include>
            </includes>
            <excludes>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:link-report</exclude>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:config</exclude>
            </excludes>
            <binaries>
               
<outputDirectory>modules/${module.artifactId}</outputDirectory>
                <attachmentClassifier>de_DE</attachmentClassifier>
               
<outputFileNameMapping>${module.artifactId}_${module.classifier}.${module.extension}</outputFileNameMapping>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>

        <moduleSet>
            
            <useAllReactorProjects>true</useAllReactorProjects>

            
            <includes>
                <include>com.cpa.global.memotech.modules:*:swf:*</include>
            </includes>
            <excludes>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:link-report</exclude>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:config</exclude>
            </excludes>
            <binaries>
               
<outputDirectory>modules/${module.artifactId}</outputDirectory>
                <attachmentClassifier>en_US</attachmentClassifier>
               
<outputFileNameMapping>${module.artifactId}_${module.classifier}.${module.extension}</outputFileNameMapping>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>

        <moduleSet>
            
            <useAllReactorProjects>true</useAllReactorProjects>

            
            <includes>
                <include>com.cpa.global.memotech.modules:*:swf:*</include>
            </includes>
            <excludes>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:link-report</exclude>
               
<exclude>com.cpa.global.memotech.modules:*:swf:*:config</exclude>
            </excludes>
            <binaries>
               
<outputDirectory>modules/${module.artifactId}</outputDirectory>
                <attachmentClassifier>fr_FR</attachmentClassifier>
               
<outputFileNameMapping>${module.artifactId}_${module.classifier}.${module.extension}</outputFileNameMapping>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>
    </moduleSets>
</assembly>

Is there a way to make it work from the parent's parent module and
eventually make it simpler ?

Thanks,
-Fred



--
View this message in context: http://maven.40175.n5.nabble.com/maven-assembly-plugin-binaries-usage-tp5773623.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Mime
View raw message