Maven 3.0.3 package is not working -


hi have mvn sub module sole purpose collect jar's various other module , create zip file dependencies , configurations.

<parent>     <artifactid>foo</artifactid>     <groupid>com.foo</groupid>     <version>0.1</version> </parent> <modelversion>4.0.0</modelversion>  <artifactid>dist</artifactid> <packaging>pom</packaging>  <name>dist</name> <url>http://maven.apache.org</url>  <properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties>  <build>     <pluginmanagement>         <plugins>             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-assembly-plugin</artifactid>                 <configuration>                     <descriptors>                         <descriptor>assembly.xml</descriptor>                     </descriptors>                 </configuration>                 <executions>                     <execution>                         <id>generate zip</id>                         <phase>package</phase>                         <goals>                             <goal>single</goal>                         </goals>                     </execution>                 </executions>             </plugin>         </plugins>     </pluginmanagement> </build> 

now if use mvn assembly:assembly creates desired zip file. if use mvn package doesn't thing i.e. not creating zip file. gives below output , finishes.

[info] scanning projects... [info] [info] ------------------------------------------------------------------------ [info] building dist 0.1 [info] ------------------------------------------------------------------------ [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 0.120s [info] finished at: mon jul 15 16:34:09 ist 2013 [info] final memory: 5m/92m [info] ------------------------------------------------------------------------ 

any idea on why not working. missing here. in advance.

as robert mentioned have move out plugin plugin-management. try this

<build>    <plugins>       <plugin>           <groupid>org.apache.maven.plugins</groupid>           <artifactid>maven-assembly-plugin</artifactid>           <configuration>               <descriptors>                   <descriptor>assembly.xml</descriptor>               </descriptors>           </configuration>           <executions>                <execution>                   <id>generate zip</id>                   <phase>package</phase>                   <goals>                      <goal>single</goal>                   </goals>                 </execution>            </executions>         </plugin>     </plugins> </build> 

hope helps


Comments