Additionally, you can use the "attach" option to make it part of the regular build rather than having an extra step...
-----Original Message----- From: matthew sporleder [mailto:[EMAIL PROTECTED] Sent: Friday, May 16, 2008 4:02 PM To: Maven Users List Subject: Re: second zip artifact from the same pom? On Fri, May 16, 2008 at 3:16 PM, ziprman <[EMAIL PROTECTED]> wrote: > Hi, > > I have a typical war webapp which I deploy to tomcat. At the same time I > have the typical static content (images, js, css) that needs to go to my > webservers. It is easy enough to exclude the static content from my war, but > I would like to zip up the static content and also deploy it to my repos as > a separate artifact. Both attached to a phase and as an independent command, > would be optimal, because we often update static content without needing to > deploy the app. > > I have read some older postings about using assemblies (I have not used this > plugin before) and the maven-zip-plugin, as both a standalone archetype and > a build-plugin. Unfortunately, I am unsure which applies to my use case. I > suppose I could also just use an ant task, as well. > > I was just wondering if anyone has done this and what is the best approach. > You can do this with assemblies using sources/fileSets without too much trouble. (this assumes you want all of your resources/ put into the zip in a module called something-front) into your pom: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>src/assembly/assembly.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build> assembly.xml: <assembly> <id>front-assembly</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <moduleSets> <moduleSet> <includes> <include>*-front</include> </includes> <sources> <includeModuleDirectory>false</includeModuleDirectory> <fileSets> <fileSet> <directory>src/main/resources/</directory> <outputDirectory>/</outputDirectory> </fileSet> </fileSets> </sources> </moduleSet> </moduleSets> </assembly> --------------------------------------------------------------------- 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]