jvanzyl     2002/07/21 16:40:27

  Added:       src/plugins-build/deploy maven.xml plugin.jelly project.xml
  Log:
  o start of a general deployment plugin that should work with any artifact
    type and eventually any transport type.
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-maven/src/plugins-build/deploy/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="plugin"
    xmlns:j="jelly:core"
    xmlns:m="maven">
  
    <goal
      name="plugin">
      
      <j:if test="${sourcesPresent == 'true'}">
        <attainGoal name="java:jar"/>
      </j:if>
      
      <property name="assemblyDir" value="target/assemblyDir"/>
      
      <mkdir dir="${assemblyDir}"/>
      
      <copy todir="${assemblyDir}">
        <fileset dir=".">
          <exclude name="target/**"/>
          <exclude name="src/**"/>
          <exclude name="maven.xml"/>
          <exclude name="maven.log"/>
        </fileset>
      </copy>
  
      <j:if test="${sourcesPresent == 'true'}">
        <copy todir="${assemblyDir}">
          <fileset dir="target/classes"/>
        </copy>
      </j:if>
  
      <jar
        jarfile="${maven.build.dir}/${maven.final.name}.jar">
        <fileset dir="${assemblyDir}"/>
      </jar>
  
    </goal>
  
  </project>
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/deploy/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  <?xml version="1.0"?>
  
  <project 
    xmlns:j="jelly:core"
    xmlns:maven="jelly:maven"
    xmlns:define="jelly:define"
    xmlns:m="maven">
  
    <!-- ================================================================== -->
    <!-- D E P L O Y  A R T I F A C T  T A G                                -->
    <!-- ================================================================== -->
    <!-- The deploy-artifact tag is a dynamic tag that allows the           -->
    <!-- consistent deployment of artifacts generated by Maven.             -->
    <!--                                                                    -->
    <!-- The following parameters can be used with the deploy-artifact      -->
    <!-- tag by setting the appropriate attribute when invoking the tag:    -->
    <!--                                                                    -->
    <!-- @param username                                                    -->
    <!-- @param projectId                                                   -->
    <!-- @param artifact                                                    -->
    <!-- @param type                                                        -->
    <!-- @param siteAddress                                                 -->
    <!-- @param siteDirectory                                               -->
    <!-- @param siteCommand                                                 -->
    <!-- ================================================================== -->
  
    <define:tag name="deploy-artifact">
  
      <!--
        ||
        || If the ${maven.username} value isn't set then the deployment
        || process fails.
        ||
      -->
  
      <m:user-check user="${username}"/>
      
      <echo>
      
        Moving ${artifact} to the ${siteDirectory} on ${siteAddress}
      
      </echo>
      
      <exec dir="." executable="${maven.scp.executable}">
        <arg value="${artifact}"/>
        <arg value="${username}@${siteAddress}:${siteDirectory}"/>
      </exec>
      
      <!--
        ||
        || Execute a command on the server if one is specified.
        ||
      -->
      
      <j:if test="${siteCommand}">
  
        <echo>
      
          Executing ${siteCommand} with the username ${username} on ${siteAddress}
      
        </echo>
  
        <exec dir="." executable="${maven.ssh.executable}">
          <arg line="${siteAddress} -l ${username} '${siteCommand}'"/>
        </exec>
  
        <!--
        <exec dir="." executable="${maven.ssh.executable}">
          <arg line="${siteAddress} -l ${username} 'mkdir -p ${siteDirectory};cd 
${siteDirectory};gunzip ${artifact} ; tar xUvf ${artifact};chmod -R g+u *;rm 
${artifact}'"/>
        </exec>
        -->
  
      </j:if>
      
      <!--
        ||
        || Delete the artifact so we don't have cruft lying around
        ||
      -->
      
      <delete file="${artifact}"/>
          
    </define:tag>
  
    <goal name="deploy:test">
    
      <deploy-artifact
        username="${maven.username}"
        projectId="${pom.id}"
        artifact="project.xml"
        type="project"
        siteAddress="${maven.repo.root}"
        siteDirectory="${maven.repo.root.directory}"
      />
      
    </goal>
  
  </project>
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/deploy/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
  
    <pomVersion>3</pomVersion>
    <id>maven-deploy-plugin</id>
    <name>Maven Deploy Plugin</name>
    <currentVersion>1.0</currentVersion>
    <organization>
      <name>Apache Software Foundation</name>
      <url>http://jakarta.apache.org/</url>
      <logo>/images/jakarta-logo-blue.gif</logo>
    </organization>
    <inceptionYear>2001</inceptionYear>
    <package>org.apache.maven</package>
    <logo>/images/maven.jpg</logo>
  
    <!-- Gump integration -->
    <gumpRepositoryId>jakarta</gumpRepositoryId>
  
    <description>
    </description>
  
    <shortDescription>Java Project Management Tools</shortDescription>
  
    <url>http://jakarta.apache.org/turbine/maven/</url>
    
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
    <siteAddress>jakarta.apache.org</siteAddress>
    <siteDirectory>/www/jakarta.apache.org/turbine/maven/</siteDirectory>
    
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
  
    <repository>
      
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-maven</connection>
      <url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/</url>
    </repository>
  
    <versions>
    </versions>
  
    <branches>
    </branches>
  
    <mailingLists/>
  
    <developers/>
  
    <dependencies>
    </dependencies>
  
    <build>
  
      <nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
  
      <sourceDirectory>src/java</sourceDirectory>
  
      <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
      <integrationUnitTestSourceDirectory/>
  
      <aspectSourceDirectory></aspectSourceDirectory>
  
      <!-- Unit test classes -->
      <unitTest>
        <includes>
          <include>**/*Test.java</include>
        </includes>
      </unitTest>
      
      <!-- J A R  R E S O U R C E S -->
      <!-- Resources that are packaged up inside the JAR file -->
  
      <resources>
      </resources>
  
      <jars>
      </jars>
    </build>
  </project>
  
  
  
  

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

Reply via email to