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:[email protected]] 
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 <[email protected]>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 <[email protected]>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: [email protected] [mailto:[email protected]] 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: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.fmr.itamdiscovery</groupId>
	<artifactId>uCMDB-PatternDev</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>uCMDBPatternDEV</name>
	<description>Build of uCMDB Packages. (ZIP files of folders).</description>
	<distributionManagement>

		<repository>
			<id>nexuspro-prod-release</id>
			<url></url>
		</repository>
		<snapshotRepository>
			<id>nexuspro-prod-snapshot</id>
			<url></url>
		</snapshotRepository>
	</distributionManagement>

	<build>

		<pluginManagement>

			<plugins>


				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.4</version>
					
					 
					<executions>
						<execution>

							
							<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-cli</id>
							<phase>prepare-package</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>


</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to