You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Manos Batsis <ma...@geekologue.com> on 2007/04/04 21:23:10 UTC

Create zip from site with mvn package?

Hello,

Essentially i need to make my POM's generated artifact to be a zip file 
with a folder containing the generated website:

zip
+ ${project.name}-${project.version} (directory)
   + Contents of ${project.reporting.outputDirectory}, i.e. target/site


My understanding is i need to use the assembly plugin? Does anyone have 
anything close to what i am after?

Many thanks,

Manos



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


Re: Create zip from site with mvn package?

Posted by Manos Batsis <ma...@geekologue.com>.
Done, also set my project packaging to pom (to avoid the jar artifact), 
for future reference of another newbie:



pom.xml:
------------------------------
<plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
           <descriptors>
             <descriptor>src/assembly/static-content.xml</descriptor>
           </descriptors>
         </configuration>
         <executions>
           <execution>
             <id>make-assembly</id>
             <phase>package</phase>
             <goals>
               <goal>attached</goal>
             </goals>
           </execution>
         </executions>
       </plugin>



assembly (static-content.xml):
----------------------------------
<assembly>
     <id></id>
     <formats>
         <format>zip</format>
     </formats>
     <fileSets>
         <fileSet>
             <directory>target/site</directory>
             <outputDirectory></outputDirectory>
         </fileSet>
     </fileSets>
</assembly>




Manos Batsis wrote:
> 
> Hello,
> 
> Essentially i need to make my POM's generated artifact to be a zip file 
> with a folder containing the generated website:
> 
> zip
> + ${project.name}-${project.version} (directory)
>   + Contents of ${project.reporting.outputDirectory}, i.e. target/site
> 
> 
> My understanding is i need to use the assembly plugin? Does anyone have 
> anything close to what i am after?
> 
> Many thanks,
> 
> Manos
> 
> 
> 
> ---------------------------------------------------------------------
> 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