From 62f5438bdb86052bef43c59011422759f257a236 Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Sat, 5 Oct 2013 11:24:30 +0200 Subject: [PATCH] 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 --- gerrit-extension-api/pom.xml | 43 +++++++++++++++++++++++++++++++++++ gerrit-plugin-api/pom.xml | 44 ++++++++++++++++++++++++++++++++++++ pom.xml | 6 +++++ tools/deploy_api.sh | 21 +++++++++++++++++ 4 files changed, 114 insertions(+) diff --git a/gerrit-extension-api/pom.xml b/gerrit-extension-api/pom.xml index d641a3be3b..4c8d8deb4b 100644 --- a/gerrit-extension-api/pom.xml +++ b/gerrit-extension-api/pom.xml @@ -81,6 +81,49 @@ limitations under the License. + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-artifact-sources + generate-resources + + unpack + + + + + ${project.groupId} + gerrit-extension-api + ${project.version} + all-sources + true + + + ${project.build.directory}/unpack_sources + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + ${project.build.directory}/unpack_sources + ISO-8859-1 + true + false + + + + + jar + + process-resources + + + diff --git a/gerrit-plugin-api/pom.xml b/gerrit-plugin-api/pom.xml index 3190379316..97b4eaa51b 100644 --- a/gerrit-plugin-api/pom.xml +++ b/gerrit-plugin-api/pom.xml @@ -117,6 +117,50 @@ limitations under the License. + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-artifact-sources + generate-resources + + unpack + + + + + ${project.groupId} + gerrit-plugin-api + ${project.version} + sources + true + + + ${project.build.directory}/unpack_sources + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.7 + + ${project.build.directory}/unpack_sources + ISO-8859-1 + true + false + + + + + jar + + process-resources + + + diff --git a/pom.xml b/pom.xml index df0096ded9..c4b4b4177d 100644 --- a/pom.xml +++ b/pom.xml @@ -355,6 +355,12 @@ limitations under the License. 2.1.2 + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + org.apache.maven.plugins maven-shade-plugin diff --git a/tools/deploy_api.sh b/tools/deploy_api.sh index 26baa31cbb..7d1ff0672a 100755 --- a/tools/deploy_api.sh +++ b/tools/deploy_api.sh @@ -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 +