When using the dependencySet, can you exclude individual class files or are you limited to excluding specific artifacts. ----- Original Message ----- From: Barrie Treloar Sent: Tue, 8/22/2006 7:03pm To: Maven Users List Subject: Re: Assembly plugin issues On 8/22/06, Owen Jacobson <[EMAIL PROTECTED]> wrote: > > However I have one last thing to try: > > I notice that you have two moduleSet declarations. > > Can you not collapse them into one? which contains both the source and > > the binary sections? > > > > I suspect that might be the problem. > > Just for grins I tried this anyways. It still duplicated the > foo-1.3-SNAPSHOT part of the assembly-relative path.
As I mentioned I don't use moduleSets. I use dependencySets and I have a module whose sole job is to pull all the dependencies I want together to form a super-archive. You might want to look into that instead. Also look at the source plugin http://maven.apache.org/plugins/maven-source-plugin/ which will build a source archive and attach it as part of your build process. Then in your assembly you pull in the dependency with the source classifier. See http://www.nabble.com/forum/ViewPost.jtp?post=5496323&framed=y I can't find any more appropriate posts, so I'll include some more details: My project layout is: ROOT/ - pom.xml - module1 - moduleN - <project>-build - pom.xml In <project>-build/pom.xml I have: <dependencies> <dependency> <groupId>my.group</groupId> <artifactId>module1Artifact</artifactId> <version>1.0-SNAPSHOT</version> <type>zip</type> </dependency> <dependency> <groupId>my.group</groupId> <artifactId>module2Artifact</artifactId> <version>1.0-SNAPSHOT</version> <classifier>bin</classifier> <type>zip</type> </dependency> <dependency> <groupId>my.group</groupId> <artifactId>module3Artifact</artifactId> <version>1.0-SNAPSHOT</version> <classifier>bin</classifier> <type>zip</type> </dependency> <dependency> <groupId>my.group</groupId> <artifactId>module4Artifact</artifactId> <version>1.0-SNAPSHOT</version> <type>ear</type> </dependency> </dependencies> So my main build collects 4 artifacts: - a client side eclipse RCP (artifact1) as a zip - 2 standalone applications (artifact2, artifact3) as binary builds (these are the attached binary assemblies created when you install artifact2 and artifact3) - an ear file (artifact4) My assembly in <project>-build/src/main/assembly/bin.xml: <assembly> <id>bin</id> <formats> <!-- There is a defect http://jira.codehaus.org/browse/MASSEMBLY-119 that means dir format will attempt to attach this format into the repository and will cause the build to fail. <format>dir</format> --> <format>zip</format> </formats> <includeBaseDirectory>true</includeBaseDirectory> <dependencySets> <dependencySet> <unpack>false</unpack> <outputFileNameMapping> ${artifactId}-${baseVersion}.${extension}</outputFileNameMapping> <excludes> <!-- There is little documentation on this format. It is of the form of DefaultArtifact.getDependencyConflictId() which is <groupId>:<artifactId>:<type>:<classifier> or you can use the short form (hard coded into assembly) of <groupId>:<artifactId> This is a String equality match not a pattern match. See Project Transitive Dependencies in site/dependencies.html for easy cut and paste values to put in here --> <exclude>commons-beanutils:commons-beanutils</exclude> <exclude> commons-beanutils:commons-beanutils-bean-collections</exclude> <exclude>commons-beanutils:commons-beanutils-core</exclude> <exclude>commons-collections:commons-collections</exclude> <exclude>commons-configuration:commons-configuration</exclude> <exclude>commons-digester:commons-digester</exclude> <exclude>commons-lang:commons-lang</exclude> <exclude>commons-logging:commons-logging</exclude> <exclude>easyconf:easyconf</exclude> <exclude>log4j:log4j</exclude> <exclude>weblogic:weblogic</exclude> <exclude>xstream:xstream</exclude> </excludes> </dependencySet> </dependencySets> </assembly> You need all those excludes because you dependency on the binary artifact also depends upon the jars which get included even though those same jars have already been included in the binary assembly. So, by using the source jar which will install an artifact with classified "sources" you should be able to use the above information to craft your own assemblies to pull in the source version of your artifact you want. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]