Generate javadoc for gerrit extension and plugin API

To make the consumption of the gerrit extension and plugin API easier
for plugin developers gerrit-extension-api.jar and
gerrit-plugin-api.jar should be published to Maven central. For this
having javadocs generated is required.

Change-Id: Ibb13fbb61c94c76fe6e2f7041d5a1e269d39d788
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin 2013-10-05 11:24:30 +02:00
parent ef48818083
commit 62f5438bdb
4 changed files with 114 additions and 0 deletions

View File

@ -81,6 +81,49 @@ limitations under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-artifact-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>gerrit-extension-api</artifactId>
<version>${project.version}</version>
<classifier>all-sources</classifier>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/unpack_sources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourcepath>${project.build.directory}/unpack_sources</sourcepath>
<encoding>ISO-8859-1</encoding>
<quiet>true</quiet>
<detectOfflineLinks>false</detectOfflineLinks>
</configuration>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -117,6 +117,50 @@ limitations under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-artifact-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>gerrit-plugin-api</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/unpack_sources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<sourcepath>${project.build.directory}/unpack_sources</sourcepath>
<encoding>ISO-8859-1</encoding>
<quiet>true</quiet>
<detectOfflineLinks>false</detectOfflineLinks>
</configuration>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -355,6 +355,12 @@ limitations under the License.
<version>2.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>

View File

@ -38,6 +38,16 @@ mvn deploy:deploy-file \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL
mvn deploy:deploy-file \
-DgroupId=com.google.gerrit \
-DartifactId=gerrit-extension-api \
-Dversion=$VER \
-Dpackaging=jar \
-Dfile=gerrit-extension-api/target/gerrit-extension-api-$VER-javadoc.jar \
-Djava-source=false \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL
echo "Deploying $type gerrit-plugin-api $VER"
mvn deploy:deploy-file \
@ -58,3 +68,14 @@ mvn deploy:deploy-file \
-Djava-source=false \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL
mvn deploy:deploy-file \
-DgroupId=com.google.gerrit \
-DartifactId=gerrit-plugin-api \
-Dversion=$VER \
-Dpackaging=jar \
-Dfile=gerrit-plugin-api/target/gerrit-plugin-api-$VER-javadoc.jar \
-Djava-source=false \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL