You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kallin Nagelberg <ka...@gmail.com> on 2008/07/08 23:58:15 UTC

assembly plugin includes duplicates

I have an assembly descriptor that looks like the following code.
There are duplicate libraries in 'target/dependencies' and
'target/core-bl-template/unpack/lib'.

This results in duplicate JARs being zipped up at xxx.zip/lib .
Is there a way to prevent this?


<assembly>
    <id>bin</id>
    <formats>
        <format>zip</format>
    </formats>
    <fileSets>
        <fileSet>
            <directory>target/dependencies</directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>*.jar</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>target/core-bl-template-unpack</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
    </fileSets>
</assembly>

Re: assembly plugin includes duplicates

Posted by Kallin Nagelberg <ka...@gmail.com>.
I noticed that archive file resolution is mentioned here:
http://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html


It says that in case file/filesets have conflicting sources only one will be
copied. It seems this isn't true for dependencies though. Is there a way to
make the same rules apply to dependencies?

On Tue, Jul 8, 2008 at 5:58 PM, Kallin Nagelberg <ka...@gmail.com>
wrote:

> I have an assembly descriptor that looks like the following code.
> There are duplicate libraries in 'target/dependencies' and
> 'target/core-bl-template/unpack/lib'.
>
> This results in duplicate JARs being zipped up at xxx.zip/lib .
> Is there a way to prevent this?
>
>
> <assembly>
>     <id>bin</id>
>     <formats>
>         <format>zip</format>
>     </formats>
>     <fileSets>
>         <fileSet>
>             <directory>target/dependencies</directory>
>             <outputDirectory>lib</outputDirectory>
>             <includes>
>                 <include>*.jar</include>
>             </includes>
>         </fileSet>
>         <fileSet>
>             <directory>target/core-bl-template-unpack</directory>
>             <outputDirectory>/</outputDirectory>
>         </fileSet>
>     </fileSets>
> </assembly>
>