I have decided that I may not be able to get this working until Maven 2.1 is released. I think the problem may be that I cannot attach the assembly to the life-cycle for a parent project that has no artifacts or a parent that has children with no assembly.

Instead I have worked around the problem by creating two profiles each containing separate configuration for the deploy:deploy-file goal.

And so our build-package-assemble-deploy process now looks like:

   $ mvn package assembly:assembly
    :
    :

   $ mvn -Pdeploy-zip deploy:deploy-file
    :
    :

   $ mvn -Pdeploy-tar deploy:deploy-file
    :
    :

And to achieve this our pom.xml now looks like:

<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/maven-v4_0_0.xsd";>

   <modelVersion>4.0.0</modelVersion>
   <groupId>com.emagineinternational</groupId>
   <artifactId>sms-transceiver</artifactId>
   <packaging>pom</packaging>
   <version>6.5.1-SNAPSHOT</version>
   <name>sms-transceiver</name>
   <url>http://maven.apache.org</url>

    <dependencies>
       <dependency>
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
           <version>1.1</version>
       </dependency>
       <dependency>
           <groupId>log4j</groupId>
           <artifactId>log4j</artifactId>
           <version>1.2.14</version>
       </dependency>
       <dependency>
           <groupId>junit</groupId>
           <artifactId>junit</artifactId>
           <version>4.4</version>
           <scope>test</scope>
       </dependency>
    </dependencies>

   <modules>
       <module>./sms-transceiver-config-jaxb</module>
       <module>./sms-transceiver-common</module>
       <module>./sms-transceiver-config</module>
       <module>./sms-transceiver-mq</module>
       <module>./sms-transceiver-db-receiver</module>
       <module>./sms-transceiver-db-transmitter</module>
       <module>./sms-transceiver-smpp-receiver</module>
       <module>./sms-transceiver-smpp-transmitter</module>
   </modules>

   <build>
       <plugins>
<plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <configuration>
                   <source>1.6</source>
                   <target>1.6</target>
               </configuration>
           </plugin>
<plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-release-plugin</artifactId>
               <version>2.0-beta-5</version>
               <configuration>
<tagBase>svn://svn.emagineinternational.com/tags/sms-transceiver</tagBase>
                   <goals>deploy-file</goals>
               </configuration>
           </plugin>
<plugin>
               <inherited>false</inherited>
               <artifactId>maven-assembly-plugin</artifactId>
               <configuration>
                   <descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
                   </descriptors>
               </configuration>
           </plugin>
</plugins>
   </build>


   <profiles>
       <profile>
           <id>deploy-tar</id>
           <build>
               <plugins>
                   <plugin>
                       <inherited>false</inherited>
                       <artifactId>maven-deploy-plugin</artifactId>
                       <configuration>
<file>target/${artifactId}-${version}.tar.gz</file>
                           <artifactId>${artifactId}</artifactId>
                           <groupId>${groupId}</groupId>
                           <packaging>tar.gz</packaging>
                           <version>${version}</version>
                           <generatePom>true</generatePom>
                           <url>scp://angie/opt/evan-junk-repository</url>
                           <repositoryId>emagine-repository</repositoryId>
                       </configuration>
                   </plugin>
               </plugins>
           </build>
       </profile>

       <profile>
           <id>deploy-zip</id>
           <build>
               <plugins>
                   <plugin>
                       <inherited>false</inherited>
                       <artifactId>maven-deploy-plugin</artifactId>
                       <configuration>
                           <file>target/${artifactId}-${version}.zip</file>
                           <artifactId>${artifactId}</artifactId>
                           <groupId>${groupId}</groupId>
                           <packaging>zip</packaging>
                           <version>${version}</version>
                           <generatePom>true</generatePom>
                           <url>scp://angie/opt/evan-junk-repository</url>
                           <repositoryId>emagine-repository</repositoryId>
                       </configuration>
                   </plugin>
               </plugins>
           </build>
       </profile>
   </profiles>

   <repositories>
       <repository>
           <id>EmagineMavenRepository</id>
           <url>http://angie/maven-repository</url>
       </repository>
   </repositories>

   <distributionManagement>
       <repository>
           <id>emagine-repository</id>
           <name>Emagine Repository</name>
           <url>scp://angie/opt/emagine-repository/release</url>
       </repository>
       <snapshotRepository>
           <id>emagine-repository</id>
           <name>Emagine Repository</name>
           <url>scp://angie/opt/emagine-repository/snapshot</url>
       </snapshotRepository>
   </distributionManagement>


   <scm>
<connection>scm:svn:svn://svn.emagineinternational.com/trunk/sms-transceiver</connection> <developerConnection>scm:svn:svn://svn.emagineinternational.com/trunk/sms-transceiver</developerConnection>
       <url>svn://svn.emagineinternational.com/trunk/sms-transceiver</url>
   </scm>
</project>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to