onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1420997 - /incubator/onami/trunk/site/pom.xml
Date Wed, 12 Dec 2012 21:48:11 GMT
Author: olamy
Date: Wed Dec 12 21:48:11 2012
New Revision: 1420997

URL: http://svn.apache.org/viewvc?rev=1420997&view=rev
Log:
make first checkout and update more faster when deploying the main web site

Modified:
    incubator/onami/trunk/site/pom.xml

Modified: incubator/onami/trunk/site/pom.xml
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/site/pom.xml?rev=1420997&r1=1420996&r2=1420997&view=diff
==============================================================================
--- incubator/onami/trunk/site/pom.xml (original)
+++ incubator/onami/trunk/site/pom.xml Wed Dec 12 21:48:11 2012
@@ -41,10 +41,15 @@
     <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/onami/trunk/site</developerConnection>
   </scm>
 
+  <properties>
+    <svnUrl>https://svn.apache.org/repos/asf/incubator/onami/site/</svnUrl>
+    <checkoutDirectory>${user.home}/onami-sites/onami-main-site</checkoutDirectory>
+  </properties>
+
   <distributionManagement>
     <site>
       <id>apache.website.svnpub</id>
-      <url>scm:svn:https://svn.apache.org/repos/asf/incubator/onami/site/</url>
+      <url>scm:svn:${svnUrl}</url>
     </site>
   </distributionManagement>
 
@@ -94,7 +99,7 @@
             <ignorePathToDelete>spi**</ignorePathToDelete>
             <ignorePathToDelete>test**</ignorePathToDelete>
           </ignorePathsToDelete>
-          <checkoutDirectory>${user.home}/onami-sites/onami-main-site</checkoutDirectory>
+          <checkoutDirectory>${checkoutDirectory}</checkoutDirectory>
         </configuration>
         <executions>
           <execution>
@@ -120,4 +125,55 @@
     </repository>
   </repositories>
 
+  <profiles>
+    <profile>
+      <id>setup-checkout</id>
+      <activation>
+        <file>
+          <missing>site-publish</missing>
+        </file>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.7</version>
+            <executions>
+              <execution>
+                <id>prepare-checkout</id>
+                <phase>pre-site</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <exec executable="svn">
+                      <arg line="checkout --depth immediates ${svnUrl} ${checkoutDirectory}"
/>
+                    </exec>
+
+                    <exec executable="svn">
+                      <arg line="update --set-depth exclude ${checkoutDirectory}/autobind
${checkoutDirectory}/cache
+                      ${checkoutDirectory}/configuration ${checkoutDirectory}/guava
+                      ${checkoutDirectory}/lifecycle ${checkoutDirectory}/logging
+                      ${checkoutDirectory}/scheduler ${checkoutDirectory}/spi
+                      ${checkoutDirectory}/test" />
+                    </exec>
+
+                    <pathconvert pathsep=" " property="dirs">
+                      <dirset dir="${checkoutDirectory}" includes="*" />
+                    </pathconvert>
+                    <exec executable="svn">
+                      <arg line="update --set-depth infinity ${dirs}" />
+                    </exec>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>



Mime
View raw message