You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2003/10/27 17:31:08 UTC

cvs commit: maven/src/plugins-build/site plugin.jelly

dion        2003/10/27 08:31:08

  Modified:    src/plugins-build/site plugin.jelly
  Log:
  Apply MAVEN-703.
  
  Allows deployment of the site via FTP
  
  Revision  Changes    Path
  1.20      +43 -0     maven/src/plugins-build/site/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/site/plugin.jelly,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- plugin.jelly	17 Oct 2003 01:23:51 -0000	1.19
  +++ plugin.jelly	27 Oct 2003 16:31:08 -0000	1.20
  @@ -64,6 +64,49 @@
   
       <attainGoal name="site:${maven.site.deploy.method}deploy"/>
     </goal>
  +  
  +  <!-- ================================================================== -->
  +  <!-- S I T E  F T P  D E P L O Y                                        -->
  +  <!-- Deploys the site using FTP                                         -->
  +  <!-- ================================================================== -->
  +
  +  <goal name="site:ftpdeploy"
  +    prereqs="site:init"
  +    description="Deploy the generated site docs using ftp">
  +
  +    <maven:user-check user="${maven.username}"/>
  +
  +    <echo>
  +      siteAddress = ${pom.siteAddress}
  +      siteDirectory = ${pom.siteDirectory}
  +      siteUser = ${maven.username}
  +    </echo>
  +
  +    <!-- This needs to taken from the project properties -->
  +    <property name="maven.homepage" value="${pom.siteDirectory}"/>
  +
  +    <tar tarfile="${maven.build.dir}/${maven.final.name}-site.tar" basedir="${docsDest}"/>
  +    <gzip zipfile="${maven.build.dir}/${maven.final.name}-site.tar.gz" src="${maven.build.dir}/${maven.final.name}-site.tar"/>
  +    <delete file="${maven.build.dir}/${maven.final.name}-site.tar"/>
  +
  +    <!-- FTP to the server -->
  +    <ftp server="${pom.siteAddress}"
  +    	 userid="${maven.username}"
  +    	 password="${maven.password}"
  +    	 remotedir="${pom.siteDirectory}">
  +    	 <fileset dir="${maven.build.dir}" includes="${maven.final.name}-site.tar.gz" />
  +    </ftp>
  +
  +	<!-- Expand on the server and chmod -->
  +	<telnet server="${pom.siteAddress}" userid="${maven.username}" password="${maven.password}">
  +		<read string="%"/>
  +		<write string="cd ${maven.homepage};${maven.site.gunzip.executable} ${maven.final.name}-site.tar.gz;${maven.site.tar.executable} xUvf ${maven.final.name}-site.tar;chmod -R g+u *;rm ${maven.final.name}-site.tar"/>
  +		<read string="%"/>
  +	</telnet>
  +
  +    <!-- Delete local gzip file -->
  +    <delete file="${maven.build.dir}/${maven.final.name}-site.tar.gz"/>
  +  </goal>  
   
     <!-- ================================================================== -->
     <!-- S I T E  S S H  D E P L O Y                                        -->
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org