Author: olamy
Date: Wed Dec 12 21:35:43 2012
New Revision: 1420988
URL: http://svn.apache.org/viewvc?rev=1420988&view=rev
Log:
avoid checkout all the content from sub sites
Modified:
archiva/redback/redback-site/trunk/pom.xml
Modified: archiva/redback/redback-site/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/archiva/redback/redback-site/trunk/pom.xml?rev=1420988&r1=1420987&r2=1420988&view=diff
==============================================================================
--- archiva/redback/redback-site/trunk/pom.xml (original)
+++ archiva/redback/redback-site/trunk/pom.xml Wed Dec 12 21:35:43 2012
@@ -33,6 +33,7 @@
<redbackVersion>${project.version}</redbackVersion>
<scmPubCheckoutDirectory>${user.home}/archiva-sites/redback-site-pub</scmPubCheckoutDirectory>
+
<svnUrl>https://svn.apache.org/repos/asf/archiva/site-content/redback</svnUrl>
</properties>
@@ -40,7 +41,7 @@
<site>
<id>apache.website.svnpub</id>
<name>Redback Website</name>
-
<url>scm:svn:https://svn.apache.org/repos/asf/archiva/site-content/redback</url>
+ <url>scm:svn:${svnUrl}</url>
</site>
</distributionManagement>
@@ -122,4 +123,51 @@
<url>http://svn.apache.org/viewvc/archiva/redback/redback-site/trunk/</url>
</scm>
+ <profiles>
+ <profile>
+ <id>setup-checkout</id>
+ <activation>
+ <file>
+ <missing>${scmPubCheckoutDirectory}</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}
${scmPubCheckoutDirectory}" />
+ </exec>
+
+ <exec executable="svn">
+ <arg line="update --set-depth exclude
${scmPubCheckoutDirectory}/core ${scmPubCheckoutDirectory}/components" />
+ </exec>
+
+ <pathconvert pathsep=" " property="dirs">
+ <dirset dir="${scmPubCheckoutDirectory}" includes="*" />
+ </pathconvert>
+ <exec executable="svn">
+ <arg line="update --set-depth infinity ${dirs}" />
+ </exec>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>