You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hauschild, Klaus (EXT)" <kl...@siemens.com> on 2010/02/04 09:13:19 UTC

Prevent duplicates in assembly

Hi,

I'm using the assembly-plugin to create a jar-with-dependencies by the build-in assembly descriptor. In the resulting .jar appears some entries twice. Is there a way to prevent those duplicates.
My current workarround is: unzip and zip the jar by hand after packing.

Thanks


Re: Prevent duplicates in assembly

Posted by Anders Hammar <an...@hammar.net>.
Could this be due to the fact that you have more than one dependency that
includes the same class?

/Anders

On Thu, Feb 4, 2010 at 09:13, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> Hi,
>
> I'm using the assembly-plugin to create a jar-with-dependencies by the
> build-in assembly descriptor. In the resulting .jar appears some entries
> twice. Is there a way to prevent those duplicates.
> My current workarround is: unzip and zip the jar by hand after packing.
>
> Thanks
>
>

Re: AW: Prevent duplicates in assembly

Posted by Aleksey Didik <di...@magenta-technology.ru>.
In this case may be better to use maven-shade-plugin
<http://maven.apache.org/plugins/maven-shade-plugin/index.html> to make
jar-with-dependencies artifact.
As I know, it has some merge mechanizm for compose jars with equal
entries names.

HTH,
Aleksey.

04.02.2010 13:10, Hauschild, Klaus (EXT) пишет:
> Yes, there are more than one dependency. Currently the problematic entry is "META-INF/NOTICE.TXT".
>
> After packing the .jar I use this with JNLP and its Jar-Loader doesn't support duplicate entries in jar files.
>
> -----Ursprüngliche Nachricht-----
> Von: Aleksey Didik [mailto:didik@magenta-technology.ru] 
> Gesendet: Donnerstag, 4. Februar 2010 09:36
> An: Maven Users List
> Betreff: Re: Prevent duplicates in assembly
>
> Hello.
> Is twice entries from different jar dependencies?
> Is this jar dependencies the same artifacts but with different versions?
> Or it's just classes with equals names from different artifacts?
>
> Aleksey.
>
> 04.02.2010 12:13, Hauschild, Klaus (EXT) пишет:
>   
>> Hi,
>>
>> I'm using the assembly-plugin to create a jar-with-dependencies by the build-in assembly descriptor. In the resulting .jar appears some entries twice. Is there a way to prevent those duplicates.
>> My current workarround is: unzip and zip the jar by hand after packing.
>>
>> Thanks
>>
>>
>>    
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>   


AW: Prevent duplicates in assembly

Posted by "Hauschild, Klaus (EXT)" <kl...@siemens.com>.
Yes, there are more than one dependency. Currently the problematic entry is "META-INF/NOTICE.TXT".

After packing the .jar I use this with JNLP and its Jar-Loader doesn't support duplicate entries in jar files.

-----Ursprüngliche Nachricht-----
Von: Aleksey Didik [mailto:didik@magenta-technology.ru] 
Gesendet: Donnerstag, 4. Februar 2010 09:36
An: Maven Users List
Betreff: Re: Prevent duplicates in assembly

Hello.
Is twice entries from different jar dependencies?
Is this jar dependencies the same artifacts but with different versions?
Or it's just classes with equals names from different artifacts?

Aleksey.

04.02.2010 12:13, Hauschild, Klaus (EXT) пишет:
> Hi,
>
> I'm using the assembly-plugin to create a jar-with-dependencies by the build-in assembly descriptor. In the resulting .jar appears some entries twice. Is there a way to prevent those duplicates.
> My current workarround is: unzip and zip the jar by hand after packing.
>
> Thanks
>
>
>    


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


Re: Prevent duplicates in assembly

Posted by Aleksey Didik <di...@magenta-technology.ru>.
Hello.
Is twice entries from different jar dependencies?
Is this jar dependencies the same artifacts but with different versions?
Or it's just classes with equals names from different artifacts?

Aleksey.

04.02.2010 12:13, Hauschild, Klaus (EXT) пишет:
> Hi,
>
> I'm using the assembly-plugin to create a jar-with-dependencies by the build-in assembly descriptor. In the resulting .jar appears some entries twice. Is there a way to prevent those duplicates.
> My current workarround is: unzip and zip the jar by hand after packing.
>
> Thanks
>
>
>    


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