Author: lukaszlenart
Date: Wed Jul 17 08:37:09 2013
New Revision: 1504050
URL: http://svn.apache.org/r1504050
Log:
INFRA-6350 Uses CXF SiteExporter instead of wget to update Draft docs
Added:
struts/site/trunk/src/
struts/site/trunk/src/etc/
struts/site/trunk/src/etc/docs.cfg
- copied, changed from r1503569,
struts/struts2/trunk/assembly/src/main/resources/docs.cfg
struts/site/trunk/src/etc/template.vm
- copied unchanged from r1503569,
struts/struts2/trunk/assembly/src/main/resources/template.vm
Modified:
struts/site/trunk/pom.xml
struts/site/trunk/scripts/update-draft-docs.sh
Modified: struts/site/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/struts/site/trunk/pom.xml?rev=1504050&r1=1504049&r2=1504050&view=diff
==============================================================================
--- struts/site/trunk/pom.xml (original)
+++ struts/site/trunk/pom.xml Wed Jul 17 08:37:09 2013
@@ -212,6 +212,52 @@
</build>
+ <profiles>
+ <profile>
+ <id>update-draft-docs</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>cwiki-docs</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <classpathScope>runtime</classpathScope>
+
<includeProjectDependencies>true</includeProjectDependencies>
+
<mainClass>org.apache.cxf.cwiki.SiteExporter</mainClass>
+ <arguments>
+ <argument>-d</argument>
+
<argument>${project.build.directory}/cwiki/WW</argument>
+ <argument>-password</argument>
+
<argument>${confluence.password}</argument>
+ <argument>-user</argument>
+ <argument>${confluence.user}</argument>
+
<argument>${basedir}/src/etc/docs.cfg</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.site-export</groupId>
+ <artifactId>cxf-site-export</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<reporting>
<outputDirectory>${site.output}</outputDirectory>
<plugins>
Modified: struts/site/trunk/scripts/update-draft-docs.sh
URL:
http://svn.apache.org/viewvc/struts/site/trunk/scripts/update-draft-docs.sh?rev=1504050&r1=1504049&r2=1504050&view=diff
==============================================================================
--- struts/site/trunk/scripts/update-draft-docs.sh (original)
+++ struts/site/trunk/scripts/update-draft-docs.sh Wed Jul 17 08:37:09 2013
@@ -1,20 +1,20 @@
#!/bin/sh
# This script is used to periodically update Development version of docs -
Draft docs
-# The docs are available here http://struts.apache.org/development/2.x/docs/
-
-svn co
https://svn.apache.org/repos/infra/websites/production/struts/content/development/2.x/docs
struts2-draft-docs --no-auth-cache
# Grab docs from Confluence
-wget -erobots=off -nH -nv -E -L --directory-prefix=cwiki
--no-check-certificate -r https://cwiki.apache.org/WW/
+mvn clean package -Pupdate-draft-docs
+
+# The docs are available here http://struts.apache.org/development/2.x/docs/
+svn co
https://svn.apache.org/repos/infra/websites/production/struts/content/development/2.x/docs
target/struts2-draft-docs --no-auth-cache
# Remove the old docs
-rm -R struts2-draft-docs/*
+rm -R target/struts2-draft-docs/*
# Move the new docs
-mv cwiki/WW/* struts2-draft-docs/
+mv target/cwiki/WW/docs/* target/struts2-draft-docs/
-cd struts2-draft-docs
+cd target/struts2-draft-docs
touch PLACEHOLDER
@@ -24,14 +24,15 @@ if [ -n "$DIFF" ]; then
# echo "Changes detected - add and commit"
# Add all the file
svn add ./ --force
+ # Remove already removed files
+ svn status | grep '^\!' | sed 's/! *//' | awk 'BEGIN {FS="\t"};{print
"\""$1"\""}' | xargs svn del --force
# Commit changes
svn commit -m "Updates draft docs" --no-auth-cache
fi
-cd ..
+cd ../..
# Cleanup
-rm -R struts2-draft-docs
-rm -R cwiki
+mvn clean
# echo "Success!"
Copied: struts/site/trunk/src/etc/docs.cfg (from r1503569,
struts/struts2/trunk/assembly/src/main/resources/docs.cfg)
URL:
http://svn.apache.org/viewvc/struts/site/trunk/src/etc/docs.cfg?p2=struts/site/trunk/src/etc/docs.cfg&p1=struts/struts2/trunk/assembly/src/main/resources/docs.cfg&r1=1503569&r2=1504050&rev=1504050&view=diff
==============================================================================
--- struts/struts2/trunk/assembly/src/main/resources/docs.cfg (original)
+++ struts/site/trunk/src/etc/docs.cfg Wed Jul 17 08:37:09 2013
@@ -1,6 +1,6 @@
spaceKey: WW
pageCacheFile:/cache/docs.pageCache
-templateName:assembly/src/main/resources/template.vm
+templateName:src/etc/template.vm
outputDir:/docs
globalPages:Navigation,Banner,QuickLinks