Instead exporting docs directly from wiki, fetches them from website

This commit is contained in:
Lukasz Lenart
2014-04-06 10:17:41 +02:00
parent 31b60c96ea
commit 01d6f1a52b
+36 -50
View File
@@ -76,6 +76,42 @@
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>cwiki-docs</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/cwiki/" />
<exec executable="wget">
<arg value="-erobots=off" />
<arg value="-nH" />
<arg value="--cut-dirs=3" />
<arg value="-nv" />
<arg value="-E" />
<arg value="-L" />
<arg value="-l 0" />
<arg value="-np" />
<arg value="--directory-prefix=${project.build.directory}/cwiki" />
<arg value="--no-check-certificate" />
<arg value="-r" />
<arg value="http://struts.apache.org/development/2.x/docs/" />
</exec>
<delete>
<fileset dir="${project.build.directory}/cwiki/" includes="index.*"/>
</delete>
<copy file="${project.build.directory}/cwiki/home.html" tofile="${project.build.directory}/cwiki/index.html"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
@@ -103,58 +139,8 @@
</plugins>
</build>
<profiles>
<profile>
<id>export-cwiki</id>
<activation>
<property>
<name>!skipWiki</name>
</property>
</activation>
<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/main/resources/docs.cfg</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.apache.cxf.site-export</groupId>
<artifactId>cxf-site-export</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-cdi-plugin</artifactId>