diff options
author | Edwin Kempin <edwin.kempin@sap.com> | 2013-10-08 16:24:22 +0200 |
---|---|---|
committer | Edwin Kempin <edwin.kempin@sap.com> | 2013-10-08 16:24:22 +0200 |
commit | c2e9684b8f797968260ccc40883f822244aafdcb (patch) | |
tree | 93ac40e583d1e12ac20daf7f59313c7bcc32196f | |
parent | b3d0cc4c2a2dcbdc1f9fecee080ab969c513990a (diff) |
Fix javadoc generation for gerrit extension and plugin API
It was a bad idea to use the maven-dependency-plugin to unpack the
sources for the javadoc generation as this plugin needs to download
the source artifact from a Maven repository. At this point in time the
source artifact only exists in the local target folder but is not yet
installed into a Maven repository. Instead we are now using the
maven-antrun-plugin to unzip the local source artifact.
Change-Id: I37a7f2e214a395f0c64fbe8001655ed842bab01f
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
-rw-r--r-- | gerrit-extension-api/pom.xml | 73 | ||||
-rw-r--r-- | gerrit-plugin-api/pom.xml | 74 |
2 files changed, 66 insertions, 81 deletions
diff --git a/gerrit-extension-api/pom.xml b/gerrit-extension-api/pom.xml index 4c8d8deb4b..cdab3ab208 100644 --- a/gerrit-extension-api/pom.xml +++ b/gerrit-extension-api/pom.xml @@ -83,46 +83,39 @@ limitations under the License. </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> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>unpack-sources</id> + <phase>package</phase> + <configuration> + <tasks> + <unzip src="${project.build.directory}/${project.artifactId}-${project.version}-all-sources.jar" dest="${project.build.directory}/unpack_sources" /> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </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>package</phase> + </execution> + </executions> </plugin> </plugins> </build> diff --git a/gerrit-plugin-api/pom.xml b/gerrit-plugin-api/pom.xml index 97b4eaa51b..6437674bce 100644 --- a/gerrit-plugin-api/pom.xml +++ b/gerrit-plugin-api/pom.xml @@ -119,47 +119,39 @@ limitations under the License. </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> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>unpack-sources</id> + <phase>package</phase> + <configuration> + <tasks> + <unzip src="${project.build.directory}/${project.artifactId}-${project.version}-sources.jar" dest="${project.build.directory}/unpack_sources" /> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </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>package</phase> + </execution> + </executions> </plugin> </plugins> </build> |