add clean property for publish separately

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@124984 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2005-01-12 19:54:51 +00:00
1 parent 21d68ac1e7
commit b0e1118d98
3 files changed
+17 -6

No files matched your search

+5 -3
View File
@@ -233,6 +233,7 @@
<j:set var="destSiteAddress" value="${pom.siteAddress}" />
<j:set var="destSiteDirectory" value="${pom.siteDirectory}" />
<j:set var="destSiteUsername" value="${maven.username}" />
<j:set var="publishClean" value="${maven.site.publish.clean}" />
<echo>
source site address: ${siteAddress}
@@ -241,6 +242,7 @@
destination site address: ${destSiteAddress}
destination site directory: ${destSiteDirectory}
destination site username: ${destSiteUsername}
publish clean: ${publishClean}
</echo>
<j:if test="${siteAddress == destSiteAddress and
@@ -253,7 +255,7 @@
<j:choose>
<j:when test="${deployMethod == 'fs'}">
<echo>Executing filesystem copy on local server to publish</echo>
<j:if test="${siteClean}">
<j:if test="${publishClean}">
<echo>Cleaning destination first</echo>
<delete dir="${destSiteDirectory}" />
</j:if>
@@ -264,7 +266,7 @@
</j:when>
<j:when test="${siteAddress == destSiteAddress}">
<echo>Executing filesystem copy on remote server to publish</echo>
<j:if test="${siteClean}">
<j:if test="${publishClean}">
<echo>Cleaning destination first</echo>
<exec dir="." executable="${maven.ssh.executable}">
<arg line="${siteUsername}@${siteAddress} 'rm -r ${destSiteDirectory}'" />
@@ -277,7 +279,7 @@
<j:otherwise>
<echo>Executing rsync on stage server to publish to live server</echo>
<j:set var="rsyncArgs" value="${maven.rsync.args}" />
<j:if test="${siteClean}">
<j:if test="${publishClean}">
<echo>Cleaning destination</echo>
<j:set var="rsyncArgs" value="${rsyncArgs} --delete" />
</j:if>
+1
View File
@@ -35,3 +35,4 @@ maven.rsync.executable=rsync
maven.username=USERNAME_NOT_SET
maven.site.deploy.clean=false
maven.site.publish.clean=false
+11 -3
View File
@@ -55,10 +55,18 @@
<td>maven.site.deploy.clean</td>
<td>Yes</td>
<td>
This will ensure the target in either a <code>site:deploy</code> or <code>site:publish</code> goal is
This will ensure the target in a <code>site:deploy</code> goal is
clean by either deleting the directory first, or rsync'ing with the <code>--delete</code> option.
This operation is not atomic, so is not recommended for the live site unless you are using the rsync
method.
This operation is not atomic, so is not recommended for the live site unless you are using the rsync method.
</td>
</tr>
<tr>
<td>maven.site.publish.clean</td>
<td>Yes</td>
<td>
This will ensure the target in a <code>site:publish</code> goal is
clean by either deleting the directory first, or rsync'ing with the <code>--delete</code> option.
This operation is not atomic, so is not recommended for the live site unless you are using the rsync method.
</td>
</tr>
<tr>