Brilliant. This does most of what we need so lets go with that approach. Looks like you've already done the code so would you like to commit that and I can update the zip archetype to use the new module?
...ant On Wed, Apr 29, 2009 at 4:44 PM, Raymond Feng <enjoyj...@gmail.com> wrote: > The predefined jar-with-dependencies descriptor has a few issues: > > 1) It produces a jar > 2) It unpacks dependencies (instead of lib/???.jar) > > The shared descriptor approach seems to be satisfying the need without > packaging the descriptor in the generated project: > > <plugin> > <artifactId>maven-assembly-plugin</artifactId> > <version>2.2-beta-3</version> > <dependencies> > <dependency> > <groupId>org.apache.tuscany.sca</groupId> > <artifactId>zip-contribution-descriptor</artifactId> > <version>2.0-SNAPSHOT</version> > </dependency> > </dependencies> > <executions> > <execution> > <id>make-assembly</id> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > <configuration> > <!-- This is where we use our shared assembly descriptor --> > <descriptors> > <descriptor>zip-contribution.xml</descriptor> > </descriptors> > </configuration> > </execution> > </executions> > </plugin> > > [1] > http://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html > > Thanks, > Raymond > > -------------------------------------------------- > From: "ant elder" <antel...@apache.org> > Sent: Tuesday, April 28, 2009 11:56 PM > To: <dev@tuscany.apache.org> > Subject: Re: [VOTE] Release Tuscany Zip Plugin alpha1 > >> On Tue, Apr 28, 2009 at 6:57 PM, Raymond Feng <enjoyj...@gmail.com> wrote: >>> >>> Hi, >>> >>> Here is what I did to get the same zip using the maven-assembly-plugin: >>> >>> 1) Configure the tuscany-zip-plugin in the pom.xml for the archetype >>> >>> (https://svn.apache.org/repos/asf/tuscany/java/sca/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml) >>> >>> <plugin> >>> <artifactId>maven-assembly-plugin</artifactId> >>> <configuration> >>> <descriptors> >>> <descriptor>src/main/assembly/zip.xml</descriptor> >>> </descriptors> >>> </configuration> >>> </plugin> >>> >>> 2) Add the assembly descriptor (src/main/assembly/zip.xml) to the >>> archetype: >>> <assembly> >>> <id>zip-contribution</id> >>> <formats> >>> <format>zip</format> >>> </formats> >>> <includeBaseDirectory>false</includeBaseDirectory> >>> <dependencySets> >>> <dependencySet> >>> <unpack>false</unpack> >>> <scope>runtime</scope> >>> <outputDirectory>lib</outputDirectory> >>> <useProjectArtifact>false</useProjectArtifact> >>> </dependencySet> >>> </dependencySets> >>> <fileSets> >>> <fileSet> >>> <directory>${project.build.outputDirectory}</directory> >>> <outputDirectory>/</outputDirectory> >>> </fileSet> >>> </fileSets> >>> </assembly> >>> >> >> But Raymond, requiring the user project include extra files that >> aren't related to their sca contribution was exactly what i was trying >> to avoid. This is in effect doing the same as the zip plugin but >> instead of having it hidden away in some Tuscany plugin code now every >> user project would need to include it. >> >> The pre-defined descriptors approach you mentioned first seemed good, >> if we could get that to work it would solve this. Do you know if there >> is any way to include a predefined descriptor that does what we need >> in some Tuscany module that a user build script can refer to with a >> descriptorRef element? >> >> ...ant > >