jvanzyl     2002/07/09 08:12:16

  Modified:    src/plugins/java plugin.jelly plugin.properties
  Log:
  o Adding a snapshot JAR deployment goal.
  
  Revision  Changes    Path
  1.7       +64 -2     jakarta-turbine-maven/src/plugins/java/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins/java/plugin.jelly,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- plugin.jelly      9 Jul 2002 14:57:37 -0000       1.6
  +++ plugin.jelly      9 Jul 2002 15:12:16 -0000       1.7
  @@ -151,16 +151,78 @@
     <!-- S N A P S H O T                                                    -->
     <!-- ================================================================== -->
   
  +  <maven:snapshot project="${pom}"/>    
  +
     <goal
       name="java:snapshot"
  -    description="Create a snapshot jar, ie 'id-YYYYMMDD.buildnumber.jar'">
  +    description="Create a snapshot jar, ie 'id-YYYYMMDD.hhmmss.jar'">
   
  -    <maven:snapshot project="${pom}"/>    
       <j:set var="maven.final.name" value="${snapshotSignature}"/>
       <echo>Building snapshot: ${maven.final.name}</echo>
       
       <attainGoal name="java:jar"/>
       
  +  </goal>
  +
  +  <!-- ================================================================== -->
  +  <!-- D E P L O Y  S N A P S H O T                                       -->
  +  <!-- ================================================================== -->
  +
  +  <goal
  +    name="java:deploy-snapshot"
  +    description="Create a snapshot jar, ie 'id-YYYYMMDD.buildnumber.jar'">
  +
  +    <attainGoal name="java:snapshot"/>
  +
  +    <property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
  +
  +
  +    <j:set var="tmp" value="${maven.username}"/>
  +
  +    <j:if test="${tmp.equals('USERNAME_NOT_SET')}">
  +      
  +      <fail message="">
  ++------------------------------------------------------------------
  +| ERROR!
  +|
  +| You must specify a maven username in order to deploy the site!
  +| You can either set this property in your ~/build.properties
  +| or specify one on the command line:
  +|
  +| maven -Dmaven.username=${user.name} deploy-site
  ++------------------------------------------------------------------
  +      </fail>
  +
  +    </j:if>
  +
  +    <!--
  +    
  +    Generate the site documentation if it has not already been generated.
  +    We need some markers or timestamps for this so we don't repeat work
  +    if it's not necessary.
  +    
  +    -->
  +
  +    <attainGoal name="java:snapshot"/>
  +
  +    <echo>
  +      siteAddress = ${pom.siteAddress}
  +    </echo>
  +
  +    <property 
  +      name="maven.remote.jars.dir"
  +      value="/www/jakarta.apache.org/turbine/jars2/${pom.id}/jars"
  +    />
  +
  +    <tar tarfile="distributions.tar" basedir="${maven.dist.dir}"/>
  +    <gzip zipfile="distributions.tar.gz" src="distributions.tar"/>
  +    <delete file="distributions.tar"/>
  +
  +    <exec dir="." executable="${maven.scp.executable}">
  +      <arg value="${maven.jar.to.deploy}"/>
  +      <arg value="${maven.username}@${pom.siteAddress}:${maven.remote.jars.dir}"/>
  +    </exec>
  +
     </goal>
   
   </project>
  
  
  
  1.6       +1 -0      jakarta-turbine-maven/src/plugins/java/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins/java/plugin.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- plugin.properties 9 Jul 2002 13:27:43 -0000       1.5
  +++ plugin.properties 9 Jul 2002 15:12:16 -0000       1.6
  @@ -53,3 +53,4 @@
   maven.defaults.loaded = true
   
   maven.build = MAVEN_BUILD_NOT_SET
  +maven.username=USERNAME_NOT_SET
  
  
  

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

Reply via email to