Skip to content

Commit

Permalink
Instead exporting docs directly from wiki, fetches them from website
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Apr 6, 2014
1 parent 31b60c9 commit 01d6f1a
Showing 1 changed file with 36 additions and 50 deletions.
86 changes: 36 additions & 50 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 01d6f1a

Please sign in to comment.