Maven ZIP Artifact

From NovaOrdis Knowledge Base
Revision as of 04:52, 5 November 2016 by Ovidiu (talk | contribs) (Created page with "=Internal= * Maven assembly Plugin !!!The simplest way to create a ZIP artifact The following will create a test site co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal


!!!The simplest way to create a ZIP artifact

The following will create a test site content zip. The assembly plug in is the only "active" plug-in for a sub-module whose whole reason to exist is to create the content zip.

!!pom.xml

{{{ <plugins>

           ...
           <plugin>
               <artifactId>maven-assembly-plugin</artifactId>
               <configuration>
                   <descriptors>
                       <descriptor>assembly.xml</descriptor>
                   </descriptors>
               </configuration>
               <executions>
                   <execution>
                       <id>make-assembly</id>
                       <phase>package</phase>
                       <goals>
                           <goal>single</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>
           ...

}}}

!!assembly.xml

{{{ <assembly>

   <formats>
       <format>zip</format>
   </formats>
   <baseDirectory>.</baseDirectory>
   <includeBaseDirectory>false</includeBaseDirectory>
   <fileSets>
       <fileSet>
           <directory>archimedes-test-site</directory>
       </fileSet>
   </fileSets>

</assembly> }}}