You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by stephanos <ex...@gmx.net> on 2008/12/09 17:22:25 UTC

[MASSEMBLY-285] duplicates in JAR

Hi everyone,

I tried to use this plugin (2.2-beta2 I believe, also tried
2.2-beta3-SNAPSHOT, wouldn't resolve all depenencies :-( ) recently and ran
into the same problems as mentioned in the referenced JIRA issue (some
artifacts end up twice in JAR). This is not only a minor bug to me, because
after the assembly goal I try to sign the resulting JAR, which momentarily
always fails. It doesn't allow duplicate files at all.

So, I'm stuck. Any suggestions? Please!

Thanks
Stephan
-- 
View this message in context: http://www.nabble.com/-MASSEMBLY-285--duplicates-in-JAR-tp20917947p20917947.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


Re: [MASSEMBLY-285] duplicates in JAR

Posted by stephanos <ex...@gmx.net>.
Awesome, helped me a lot, thx!
-- 
View this message in context: http://www.nabble.com/-MASSEMBLY-285--duplicates-in-JAR-tp20917947p20933149.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


Re: [MASSEMBLY-285] duplicates in JAR

Posted by Adam <pu...@gmail.com>.
We have run into the same problems (duplicates causing failed attempts
at a signed JAR) and we ended up using excludes in an assembly.xml
descriptor file.  It seemed as if the duplicates were from the .class
files and the created JAR of the current project both being included.
So we had something like this:

<assembly>
  <id>jar-with-dependencies</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
	  <unpack>true</unpack>
      <scope>runtime</scope>
      <excludes>
        <exclude>com.mobilvox.upl:${project.artifactId}</exclude>
      </excludes>
    </dependencySet>
  </dependencySets>
  <fileSets>
    <fileSet>
      <directory>target/classes</directory>
	  <outputDirectory>/</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>

Hope this helps,

Adam

On Tue, Dec 9, 2008 at 11:22 AM, stephanos <ex...@gmx.net> wrote:
>
> Hi everyone,
>
> I tried to use this plugin (2.2-beta2 I believe, also tried
> 2.2-beta3-SNAPSHOT, wouldn't resolve all depenencies :-( ) recently and ran
> into the same problems as mentioned in the referenced JIRA issue (some
> artifacts end up twice in JAR). This is not only a minor bug to me, because
> after the assembly goal I try to sign the resulting JAR, which momentarily
> always fails. It doesn't allow duplicate files at all.
>
> So, I'm stuck. Any suggestions? Please!
>
> Thanks
> Stephan
> --
> View this message in context: http://www.nabble.com/-MASSEMBLY-285--duplicates-in-JAR-tp20917947p20917947.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
>
>

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