Automate docs build with shared parent pom

This commit is contained in:
Dave Syer
2014-10-06 11:22:20 +01:00
parent 5e62ed983d
commit 8eaedf976f
2 changed files with 29 additions and 61 deletions

View File

@@ -2,7 +2,7 @@ language: java
before_install: git config user.name "$GIT_NAME" && git config user.email "$GIT_EMAIL"
&& git config credential.helper "store --file=.git/credentials" && echo "https://$GH_TOKEN:@github.com" > .git/credentials
install:
- mvn install -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
- mvn install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
- ./src/main/asciidoc/ghpages.sh
script: mvn --settings .settings.xml deploy -nsu -Dmaven.test.redirectTestOutputToFile=true
env:

88
pom.xml
View File

@@ -5,9 +5,9 @@
<artifactId>spring-cloud-cli-parent</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.1.5.RELEASE</version>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<packaging>pom</packaging>
@@ -19,6 +19,7 @@
<url>http://www.spring.io</url>
</organization>
<properties>
<docs.main>spring-cloud-cli</docs.main>
<main.basedir>${basedir}/..</main.basedir>
</properties>
<modules>
@@ -43,61 +44,28 @@
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>1.7.12</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>readme</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<inherited>false</inherited>
<configuration>
<tasks>
<java classname="org.jruby.Main" failonerror="yes">
<arg value="${basedir}/src/main/ruby/generate_readme.sh" />
<arg value="-o" />
<arg value="${basedir}/README.adoc" />
</java>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>generate-</id>
<phase>process-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<inherited>false</inherited>
<configuration>
<sourceDocumentName>spring-cloud-cli.adoc</sourceDocumentName>
<backend>html</backend>
<doctype>article</doctype>
<attributes>
<docinfo>true</docinfo>
<spring-cloud-version>${project.version}</spring-cloud-version>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>docs</id>
<build>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>false</inherited>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>