Apply MAVEN-703.
Allows deployment of the site via FTP git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114238 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
<body>
|
||||
<release version="1.4" date="in CVS">
|
||||
<action dev="dion" type="update">
|
||||
Apply MAVEN-703. Allows site deployment via ftp
|
||||
</action>
|
||||
<action dev="dion" type="fix">
|
||||
Fix MAVEN-939. Top level site directory needs g+u
|
||||
</action>
|
||||
|
||||
Reference in New Issue
Block a user