Stephen, That solved my problem. I also had to make sure that id for both plug-in matched. Also I tried to change id from 'default-cli' to something else and it didn't work. After below changes this command worked. It created zip file and deployed to Nexus without having to use deploy:deploy-file...
mvn antrun:run assembly:single deploy Here's the POM that worked. <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>default-cli</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>distribution.xml</descriptor> </descriptors> <appendAssemblyId>false</appendAssemblyId> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>default-ci</id> <phase>compile</phase> <configuration> <target> <ant antfile="${project.build.directory}/../maven-build.xml"> <target name="zip-all-packages" /> </ant> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId> <version>1.0b3</version> <exclusions> <exclusion> <groupId>ant</groupId> <artifactId>ant</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-nodeps</artifactId> <version>1.8.1</version> </dependency> </dependencies> </plugin> </plugins> </pluginManagement> </build> Thanks, -----Original Message----- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: Thursday, March 21, 2013 11:04 AM To: Maven Users List Subject: Re: FW: Nexus deployment of a ZIP file... yeah you probably want to bind antrun:run to the lifecycle before the package phase then On 21 March 2013 14:45, Zanzerkia, Robert <robert.zanzer...@fmr.com> wrote: > Stephen, > Thank you for answering the question and sending below information. > I changed my POM.xml (See attached). > When I use the command: > mvn antrun:run assembly:single deploy > (I have external ant command to do other things before creating > the zip file). > > I get below error. > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-assembly-plugin:2. > 4:assembly (default-cli) on project uCMDB-PatternDev: Error reading > assemblies: > No assembly descriptors found. -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the > -e swit > ch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, > please rea > d the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionEXception > > However if I do mvn deploy it deploys the jar file... > > Thanks, > Robert > PS: I read the classifiers faq and added following to assembly execution > configuration. > <appendAssemblyId>false</appendAssemblyId> > > -----Original Message----- > From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] > Sent: Thursday, March 21, 2013 10:10 AM > To: Maven Users List > Subject: Re: FW: Nexus deployment of a ZIP file... > > Oh and if you want the assembly to be the primary artifact without a > classifier, you need to read > > http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers > > > On 21 March 2013 14:05, Stephen Connolly <stephen.alan.conno...@gmail.com > >wrote: > > > well a simpler way would be to bind an execution of the assembply plugin > > to the lifecycle (probably at the package phase) and then you would just > go > > "mvn deploy" which will invoke all the plugins bound to phases on or > before > > the "deploy" phase. > > > > IIRC assembly:single the the preferred goal when binding to the > lifecycle, > > so you would just add > > > > <executions> > > <execution> > > <id>some-id</id> > > <phase>package</phase> > > <goals><goal>single</goal></goals> > > </execution> > > </executions> > > to the <plugin> section for the assembly plugin > > > > > > On 21 March 2013 14:00, Zanzerkia, Robert <robert.zanzer...@fmr.com > >wrote: > > > >> Hi, > >> I have one plug-in that creates the zip file. > >> How do I change it to do deploy stage? > >> Normally I do mvn assembly:assembly deploy:deploy-file > >> > >> <plugin> > >> > >> <artifactId>maven-assembly-plugin</artifactId> > >> <version>2.4</version> > >> <configuration> > >> <descriptors> > >> > >> <descriptor>distribution.xml</descriptor> > >> </descriptors> > >> </configuration> > >> </plugin> > >> > >> Here is the distribution.xml > >> <assembly > >> xmlns=" > >> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" > >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> xsi:schemaLocation=" > >> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 > >> http://maven.apache.org/xsd/assembly-1.1.2.xsd"> > >> <id>packages</id> > >> <formats> > >> <format>zip</format> > >> </formats> > >> > >> > >> <fileSets> > >> <fileSet> > >> <directory>./dist</directory> > >> <includes> > >> <include>**</include> > >> </includes> > >> <excludes> > >> <exclude>./target</exclude> > >> <exclude>./repository</exclude> > >> </excludes> > >> </fileSet> > >> </fileSets> > >> > >> </assembly> > >> > >> Thanks, > >> Robert > >> > >> > >> -----Original Message----- > >> From: bmat...@gmail.com [mailto:bmat...@gmail.com] On Behalf Of > Baptiste > >> MATHUS > >> Sent: Thursday, March 21, 2013 9:40 AM > >> To: Maven Users List > >> Subject: Re: FW: Nexus deployment of a ZIP file... > >> > >> One simple way to go is to have a module dedicated to that assembly. > >> Then just mvn deploy it (or even simpler inside the whole multimodule > >> build). > >> > >> Cheers > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org