Maven Assembly Help

2008-08-26 Thread Adam
Greetings:

Earlier I had posted about getting duplicate .class files in a
Jar-with-dependencies.  The fix I found was to exclude the
${project.groupId}:${project.artifactId} from the current project.
However, I am getting duplicates it seems from transitively dependent
JARs and am finding it difficult (ie, not yet possible from what I've
done) to exclude them.  Can someone please help with not getting the
duplicate .class files in a jar-with dependencies?  The reasoning for
this is I need to obfuscate the JAR (I am using a the antrun plugin
with YGuard for this).

My setup:
Windows XP 32bit
Maven 2.0.8
Java 1.6.0_07

Here is my assembly descriptor
assembly
  idjar-with-dependencies/id
  formats
formatjar/format
  /formats
  includeBaseDirectoryfalse/includeBaseDirectory
  dependencySets
dependencySet
  unpacktrue/unpack
  scoperuntime/scope
  excludes
excludecom.mobilvox.endGroupId:${project.artifactId}/exclude
  /excludes
/dependencySet
  /dependencySets
  fileSets
fileSet
  directorytarget/classes/directory
  outputDirectory//outputDirectory
/fileSet
  /fileSets
/assembly

I have tried adding this to maybe remove a duplicate:
excludenu.xom:javax/exclude

It did not work, and my duplicates are still coming from javax.xml and
javax.transaction.

Thanks in advance,

-- 
Adam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven Assembly Help

2008-08-26 Thread Brett Porter
You should be able to remove entire artifacts, but not individual
classes. If the latter is what you are trying to do, a better solution
might be to use the dependency plugin to unpack them artifacts into a
temporary location in target, then use the assembly descriptor with
filesets to pick up the classes that you want to include.

Cheers,
Brett

2008/8/27 Adam [EMAIL PROTECTED]:
 Greetings:

 Earlier I had posted about getting duplicate .class files in a
 Jar-with-dependencies.  The fix I found was to exclude the
 ${project.groupId}:${project.artifactId} from the current project.
 However, I am getting duplicates it seems from transitively dependent
 JARs and am finding it difficult (ie, not yet possible from what I've
 done) to exclude them.  Can someone please help with not getting the
 duplicate .class files in a jar-with dependencies?  The reasoning for
 this is I need to obfuscate the JAR (I am using a the antrun plugin
 with YGuard for this).

 My setup:
 Windows XP 32bit
 Maven 2.0.8
 Java 1.6.0_07

 Here is my assembly descriptor
 assembly
  idjar-with-dependencies/id
  formats
formatjar/format
  /formats
  includeBaseDirectoryfalse/includeBaseDirectory
  dependencySets
dependencySet
  unpacktrue/unpack
  scoperuntime/scope
  excludes
excludecom.mobilvox.endGroupId:${project.artifactId}/exclude
  /excludes
/dependencySet
  /dependencySets
  fileSets
fileSet
  directorytarget/classes/directory
  outputDirectory//outputDirectory
/fileSet
  /fileSets
 /assembly

 I have tried adding this to maybe remove a duplicate:
 excludenu.xom:javax/exclude

 It did not work, and my duplicates are still coming from javax.xml and
 javax.transaction.

 Thanks in advance,

 --
 Adam

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]