Introduced special ci profile to archive JavaDoc.

This allows releasing without the distribute profile being active as this causes issues on multi-module projects.
This commit is contained in:
Oliver Gierke
2013-02-12 11:52:41 +01:00
parent f6bcb1a3b3
commit bd37d06c23
2 changed files with 59 additions and 30 deletions

View File

@@ -80,6 +80,5 @@ As an example have a look at the build of [Spring Data MongoDB](http://github.co
## Build configuration
- Configure "Artifactory Maven 3" task
- Goals to execute `clean (dependency:tree) install`
- Configure "Alternative Maven Tasks and Options" to `clean (dependency:tree) install -Pdistribute`
- A nightly build can then use `clean (dependency:tree) deploy -Pdistribute` to publish
- Goals to execute `clean (dependency:tree) install -Pci`
- A nightly build can then use `clean (dependency:tree) deploy -Pdistribute` to publish static resources and reference documentation

View File

@@ -118,7 +118,42 @@
</properties>
<profiles>
<profile>
<!-- Profile to be run on the CI server, JARs JavaDocs -->
<id>ci</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>package-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
Profile to be activated when building the distribution atrifacts.
Generates reference documentation, aggregates JavaDoc etc. Has to be combined with
profiles "release" or "milestone" to deploy artifacts into the appropriate places.
-->
<id>distribute</id>
<properties>
@@ -185,42 +220,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>jar-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>aggregate-javadoc</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>package</phase>
<configuration>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
<configuration>
<breakiterator>true</breakiterator>
<header>${project.name}</header>
<source>${source.level}</source>
<quiet>true</quiet>
<javadocDirectory>${shared.resources}/javadoc</javadocDirectory>
<overview>${shared.resources}/javadoc/overview.html</overview>
<stylesheetfile>${shared.resources}/javadoc/spring-javadoc.css</stylesheetfile>
<!-- copies doc-files subdirectory which contains image resources -->
<docfilessubdirs>true</docfilessubdirs>
<links>
<link>http://static.springframework.org/spring/docs/3.1.x/javadoc-api</link>
<link>http://download.oracle.com/javase/1.5.0/docs/api</link>
<link>http://static.springsource.org/spring-data/data-commons/docs/current/api</link>
</links>
</configuration>
</plugin>
<!--
@@ -663,6 +671,28 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<breakiterator>true</breakiterator>
<header>${project.name}</header>
<source>${source.level}</source>
<quiet>true</quiet>
<javadocDirectory>${shared.resources}/javadoc</javadocDirectory>
<overview>${shared.resources}/javadoc/overview.html</overview>
<stylesheetfile>${shared.resources}/javadoc/spring-javadoc.css</stylesheetfile>
<!-- copies doc-files subdirectory which contains image resources -->
<docfilessubdirs>true</docfilessubdirs>
<links>
<link>http://static.springframework.org/spring/docs/3.1.x/javadoc-api</link>
<link>http://download.oracle.com/javase/1.5.0/docs/api</link>
<link>http://static.springsource.org/spring-data/data-commons/docs/current/api</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>