maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherit...@apache.org
Subject svn commit: r422534 - in /maven/maven-1/plugins/trunk/site: plugin.jelly project.xml xdocs/changes.xml
Date Sun, 16 Jul 2006 21:00:47 GMT
Author: aheritier
Date: Sun Jul 16 14:00:47 2006
New Revision: 422534

URL: http://svn.apache.org/viewvc?rev=422534&view=rev
Log:
Update files modes on the remote host after deployment with rsync (you don't have to use the
same rights in your local directory).
Update root directory mode on the remote host (rsync and ssh).

Modified:
    maven/maven-1/plugins/trunk/site/plugin.jelly
    maven/maven-1/plugins/trunk/site/project.xml
    maven/maven-1/plugins/trunk/site/xdocs/changes.xml

Modified: maven/maven-1/plugins/trunk/site/plugin.jelly
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/site/plugin.jelly?rev=422534&r1=422533&r2=422534&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/site/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/site/plugin.jelly Sun Jul 16 14:00:47 2006
@@ -207,7 +207,7 @@
     </exec>
     <echo>Updating files modes on the remote host</echo>
     <exec dir="." executable="${maven.ssh.executable}" failonerror="${maven.site.failonerror}">
-      <arg line="${maven.ssh.args} -l ${siteUsername} ${siteAddress} 'cd ${maven.homepage}
&amp;&amp; chmod ${maven.site.chmod.options} ${maven.site.chmod.mode} * ./*'"/>
+      <arg line="${maven.ssh.args} -l ${siteUsername} ${siteAddress} 'cd ${maven.homepage}
&amp;&amp; chmod ${maven.site.chmod.options} ${maven.site.chmod.mode} ${maven.homepage}
* ./*'"/>
     </exec>
     <echo>Deleting remote archive</echo>
     <exec dir="." executable="${maven.ssh.executable}" failonerror="${maven.site.failonerror}">
@@ -239,41 +239,42 @@
 
   </goal>
 
-  <goal name="site:war" description="Create a WAR File from the generated site"
-    prereqs="site:init, site">
-    <mkdir dir="${docsDest}/WEB-INF" />
-    <war destfile="${maven.build.dir}/${maven.final.name}-site.war"
-      webxml="${plugin.resources}/web.xml">
-      <fileset dir="${docsDest}" />
-    </war>
-  </goal>
-
-  <goal name="site:ear" prereqs="site:war"
-    description="Create an EAR File from the generated site">
+  <!-- ================================================================== -->
+  <!-- S I T E  R S Y N C D E P L O Y                                     -->
+  <!-- Deploys the site using rsync                                       -->
+  <!-- ================================================================== -->
 
-    <j:set var="docType1" value="&lt;" />
-    <j:set var="docType2">!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD
J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'</j:set>
-    <j:set var="docType3" value="&gt;" />
-    <mkdir dir="${maven.build.dir}/${plugin.artifactId}" />
-    <j:set var="warName" value="${maven.final.name}-site.war" />
+  <goal name="site:rsyncdeploy" 
+    description="Deploy the generated site using rsync"
+    prereqs="site:init,site:remote-deploy-init">
     
-    <copy file="${plugin.resources}/application.xml"
-      tofile="${maven.build.dir}/${plugin.artifactId}/application.xml"/>
-      
-    <replace file="${maven.build.dir}/${plugin.artifactId}/application.xml">
-      <replacefilter token="@name@" value="${pom.artifactId}"/>
-      <replacefilter token="@shortDescription@"
-        value="${pom.shortDescription}"/>
-      <replacefilter token="@warName@" value="${warName}" />
-      <replacefilter token="@contextRoot@" value="${maven.final.name}" />
-    </replace>
+    <echo>rsyncing...</echo>
+    <exec dir="." executable="${maven.ssh.executable}" failonerror="${maven.site.failonerror}">
+      <arg line="${siteUsername}@${siteAddress} 'mkdir -p ${siteDirectory}'" />
+    </exec>
     
-    <ear destfile="${maven.build.dir}/${maven.final.name}-site.ear"
-      appxml="${maven.build.dir}/${plugin.artifactId}/application.xml">
-      <fileset dir="${maven.build.dir}" includes="${maven.final.name}-site.war" />
-    </ear>
+    <maven:makeRelativePath var="relativeDocsDest" path="${docsDest}" separator="/" basedir="${basedir}"
/>
+    <j:if test="${siteClean}">
+      <echo>Cleaning destination</echo>
+      <j:set var="rsyncArgs" value="${rsyncArgs} --delete" />
+    </j:if>
+    <!-- Note: trailing slash is important! -->
+    <exec dir="." executable="${maven.rsync.executable}" failonerror="${maven.site.failonerror}">
+      <arg line="-az ${rsyncArgs} ${relativeDocsDest}/ ${siteUsername}@${siteAddress}:${siteDirectory}"
/>
+    </exec>
+    
+    <echo>Updating files modes on the remote host</echo>
+    <exec dir="." executable="${maven.ssh.executable}" failonerror="${maven.site.failonerror}">
+      <arg line="${maven.ssh.args} -l ${siteUsername} ${siteAddress} 'cd ${siteDirectory}
&amp;&amp; chmod ${maven.site.chmod.options} ${maven.site.chmod.mode} ${siteDirectory}
* ./*'"/>
+    </exec>
+
   </goal>
 
+  <!-- ================================================================== -->
+  <!-- S I T E  P U B L I S H                                             -->
+  <!-- Synchronize the staged site to the live site                       -->
+  <!-- ================================================================== -->
+
   <goal name="site:publish" description="Synchronize the staged site to the live site"
prereqs="site:remote-deploy-init">
     <j:set var="destSiteAddress" value="${pom.siteAddress}" />
     <j:set var="destSiteDirectory" value="${pom.siteDirectory}" />
@@ -334,24 +335,51 @@
       </j:otherwise>
     </j:choose> 
   </goal>
+  
+  <!-- ================================================================== -->
+  <!-- S I T E  W A R                                                     -->
+  <!-- Create an WAR File from the generated site                         -->
+  <!-- ================================================================== -->
 
-  <goal name="site:rsyncdeploy" 
-    description="Deploy the generated site using rsync"
-    prereqs="site:init,site:remote-deploy-init">
-    <echo>rsyncing...</echo>
-    <exec dir="." executable="${maven.ssh.executable}" failonerror="${maven.site.failonerror}">
-      <arg line="${siteUsername}@${siteAddress} 'mkdir -p ${siteDirectory}'" />
-    </exec>
+  <goal name="site:war" description="Create a WAR File from the generated site"
+    prereqs="site:init, site">
+    <mkdir dir="${docsDest}/WEB-INF" />
+    <war destfile="${maven.build.dir}/${maven.final.name}-site.war"
+      webxml="${plugin.resources}/web.xml">
+      <fileset dir="${docsDest}" />
+    </war>
+  </goal>
+
+  <!-- ================================================================== -->
+  <!-- S I T E  E A R                                                     -->
+  <!-- Create an EAR File from the generated site                         -->
+  <!-- ================================================================== -->
+
+  <goal name="site:ear" prereqs="site:war"
+    description="Create an EAR File from the generated site">
+
+    <j:set var="docType1" value="&lt;" />
+    <j:set var="docType2">!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD
J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'</j:set>
+    <j:set var="docType3" value="&gt;" />
+    <mkdir dir="${maven.build.dir}/${plugin.artifactId}" />
+    <j:set var="warName" value="${maven.final.name}-site.war" />
     
-    <maven:makeRelativePath var="relativeDocsDest" path="${docsDest}" separator="/" basedir="${basedir}"
/>
-    <j:if test="${siteClean}">
-      <echo>Cleaning destination</echo>
-      <j:set var="rsyncArgs" value="${rsyncArgs} --delete" />
-    </j:if>
-    <!-- Note: trailing slash is important! -->
-    <exec dir="." executable="${maven.rsync.executable}" failonerror="${maven.site.failonerror}">
-      <arg line="-az ${rsyncArgs} ${relativeDocsDest}/ ${siteUsername}@${siteAddress}:${siteDirectory}"
/>
-    </exec>
+    <copy file="${plugin.resources}/application.xml"
+      tofile="${maven.build.dir}/${plugin.artifactId}/application.xml"/>
+      
+    <replace file="${maven.build.dir}/${plugin.artifactId}/application.xml">
+      <replacefilter token="@name@" value="${pom.artifactId}"/>
+      <replacefilter token="@shortDescription@"
+        value="${pom.shortDescription}"/>
+      <replacefilter token="@warName@" value="${warName}" />
+      <replacefilter token="@contextRoot@" value="${maven.final.name}" />
+    </replace>
+    
+    <ear destfile="${maven.build.dir}/${maven.final.name}-site.ear"
+      appxml="${maven.build.dir}/${plugin.artifactId}/application.xml">
+      <fileset dir="${maven.build.dir}" includes="${maven.final.name}-site.war" />
+    </ear>
   </goal>
+
 </project>
 

Modified: maven/maven-1/plugins/trunk/site/project.xml
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/site/project.xml?rev=422534&r1=422533&r2=422534&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/site/project.xml (original)
+++ maven/maven-1/plugins/trunk/site/project.xml Sun Jul 16 14:00:47 2006
@@ -22,7 +22,7 @@
   <pomVersion>3</pomVersion>
   <id>maven-site-plugin</id>
   <name>Maven Site Plugin</name>
-  <currentVersion>1.7</currentVersion>
+  <currentVersion>1.7.1-SNAPSHOT</currentVersion>
   <description>Generate web site.</description>
   <shortDescription>Generate web site</shortDescription>
   <developers>

Modified: maven/maven-1/plugins/trunk/site/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/site/xdocs/changes.xml?rev=422534&r1=422533&r2=422534&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/site/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/site/xdocs/changes.xml Sun Jul 16 14:00:47 2006
@@ -23,6 +23,10 @@
     <author email="dion@multitask.com.au">dIon Gillard</author>
   </properties>
   <body>
+    <release version="1.7.1-SNAPSHOT" date="In SVN">
+      <action dev="aheritier" type="fix">Update files modes on the remote host after
deployment with rsync (you don't have to use the same rights in your local directory).</action>
+      <action dev="aheritier" type="fix">Update root directory mode on the remote host
(rsync and ssh).</action>
+    </release>
     <release version="1.7" date="2006-05-07">
       <action dev="ltheussl" type="add" issue="MPSITE-50" due-to="Shinobu Kawai">New
property
         <code>maven.site.reports.ignoreErrors</code>to ignore any errors in all
reports during site generation.



Mime
View raw message