maven-deploy-plugin deploy-file goal insists on deploying javadoc file for previous deploy-file execution -



maven-deploy-plugin deploy-file goal insists on deploying javadoc file for previous deploy-file execution -

i have pom utilize bundle 3rd party jars deploy local nexus. fails sec upload. seems if picking javadoc associated first deploy-file execution, eventhough have not specified this.

is bug, or doing wrong?

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>a.b.c</groupid> <artifactid>vendorx_jdbc_driver_wrapper</artifactid> <version>0.0.1-snapshot</version> <packaging>pom</packaging> <properties> <vendorx_jdbc_driver_wrapper.javadoczip>${basedir}/files/11.2.0.1.0/jdbc/javadoc.zip</vendorx_jdbc_driver_wrapper.javadoczip> <vendorx_jdbc_driver_wrapper.javadoctemp>${basedir}/files/11.2.0.1.0/jdbc/javadoctemp</vendorx_jdbc_driver_wrapper.javadoctemp> <vendorx_jdbc_driver_wrapper.javadocfile>${basedir}/files/11.2.0.1.0/jdbc/javadoctemp/thejavadocs.jar</vendorx_jdbc_driver_wrapper.javadocfile> </properties> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-antrun-plugin</artifactid> <version>1.2</version> <executions> <execution> <id>prepare</id> <phase>validate</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <echo message="repackge vendorx javadoc zip in expected format" /> <delete includeemptydirs="true"> <fileset dir="${vendorx_jdbc_driver_wrapper.javadoctemp}" includes="**/*" defaultexcludes="false"/> </delete> <unzip src="${vendorx_jdbc_driver_wrapper.javadoczip}" dest="${vendorx_jdbc_driver_wrapper.javadoctemp}" /> <!-- n.b. vendorx zip version specific location - have alter create work --> <jar destfile="${vendorx_jdbc_driver_wrapper.javadocfile}" basedir="${vendorx_jdbc_driver_wrapper.javadoctemp}/e13995_02/html"/> </tasks> </configuration> </execution> </executions> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-install-plugin</artifactid> <version>2.3.1</version> <executions> <execution> <id>install-library-main</id> <phase>install</phase> <goals> <goal>install-file</goal> </goals> <configuration> <file>${basedir}/files/11.2.0.1.0/jdbc/lib/vjdbc99.jar</file> <groupid>a.b.c.com.vendorx</groupid> <artifactid>vjdbc99</artifactid> <version>11.2.0.1.0</version> <packaging>jar</packaging> <generatepom>true</generatepom> </configuration> </execution> <execution> <id>install-javadocs-main</id> <phase>install</phase> <goals> <goal>install-file</goal> </goals> <configuration> <file>${vendorx_jdbc_driver_wrapper.javadocfile}</file> <groupid>a.b.c.com.vendorx</groupid> <artifactid>vjdbc99</artifactid> <version>11.2.0.1.0</version> <packaging>jar</packaging> <classifier>javadoc</classifier> </configuration> </execution> <execution> <id>install-library-debug</id> <phase>install</phase> <goals> <goal>install-file</goal> </goals> <configuration> <file>${basedir}/files/11.2.0.1.0/jdbc/lib/vjdbc99_g.jar</file> <groupid>a.b.c.com.vendorx</groupid> <artifactid>vjdbc99_g</artifactid> <version>11.2.0.1.0</version> <packaging>jar</packaging> <generatepom>true</generatepom> </configuration> </execution> <execution> <id>install-javadocs-debug</id> <phase>install</phase> <goals> <goal>install-file</goal> </goals> <configuration> <!-- same javadocs non debug --> <file>${vendorx_jdbc_driver_wrapper.javadocfile}</file> <groupid>a.b.c.com.vendorx</groupid> <artifactid>vjdbc99_g</artifactid> <version>11.2.0.1.0</version> <packaging>jar</packaging> <classifier>javadoc</classifier> </configuration> </execution> </executions> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-deploy-plugin</artifactid> <version>2.7</version> <executions> <!-- don't bother deploying pom ... artifact want deploy --> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> <configuration> <skip>true</skip> </configuration> </execution> <!-- real thing deploying --> <execution> <id>deploy-library-main</id> <phase>deploy</phase> <goals> <goal>deploy-file</goal> </goals> <configuration> <file>${basedir}/files/11.2.0.1.0/jdbc/lib/vjdbc99.jar</file> <groupid>a.b.c.com.vendorx</groupid> <artifactid>vjdbc99</artifactid> <version>11.2.0.1.0</version> <packaging>jar</packaging> <generatepom>true</generatepom> <javadoc>${vendorx_jdbc_driver_wrapper.javadocfile}</javadoc> <url>http://foo.lan:8888/nexus/content/repositories/releases</url> <repositoryid>releases</repositoryid> </configuration> </execution> <execution> <id>deploy-library-debug</id> <phase>deploy</phase> <goals> <goal>deploy-file</goal> </goals> <configuration> <file>${basedir}/files/11.2.0.1.0/jdbc/lib/vjdbc99_g.jar</file> <groupid>a.b.c.com.vendorx</groupid> <artifactid>vjdbc99_g</artifactid> <version>11.2.0.1.0</version> <packaging>jar</packaging> <generatepom>true</generatepom> <url>http://foo.lan:8888/nexus/content/repositories/releases</url> <repositoryid>releases</repositoryid> </configuration> </execution> </executions> </plugin> </plugins> </build> <distributionmanagement> <repository> <id>releases</id> <url>http://foo.lan:8888/nexus/content/repositories/releases</url> </repository> <snapshotrepository> <id>snapshots</id> <url>http://foo.lan:8888/nexus/content/repositories/snapshots</url> </snapshotrepository> </distributionmanagement> </project>

here's output

c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper>mvn deploy [info] scanning projects... [info] [info] ------------------------------------------------------------------------ [info] building vendorx_jdbc_driver_wrapper 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info] [info] --- maven-antrun-plugin:1.2:run (prepare) @ vendorx_jdbc_driver_wrapper --- [info] executing tasks [echo] repackge vendorx javadoc zip in expected format [unzip] expanding: c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\javadoc.zip c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\j dbc\javadoctemp [jar] building jar: c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\javadoctemp\thejavadocs.jar [info] executed tasks [info] [info] --- maven-install-plugin:2.3.1:install (default-install) @ vendorx_jdbc_driver_wrapper --- [info] installing c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\pom.xml c:\users\wibble\.m2\repository\uk\co\his\vendorx_jdbc_driver_wrapper\0.0.1-snapshot\vendorx_jdbc_driver_wr apper-0.0.1-snapshot.pom [info] [info] --- maven-install-plugin:2.3.1:install-file (install-library-main) @ vendorx_jdbc_driver_wrapper --- [info] installing c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\lib\vjdbc99.jar c:\users\wibble\.m2\repository\uk\co\his\com\vendorx\vjdbc99\11.2.0.1.0\ojdbc 6-11.2.0.1.0.jar [info] installing c:\users\wibble\appdata\local\temp\1\mvninstall1181445077198226588.pom c:\users\wibble\.m2\repository\uk\co\his\com\vendorx\vjdbc99\11.2.0.1.0\vjdbc99-11.2.0.1.0.pom [info] [info] --- maven-install-plugin:2.3.1:install-file (install-javadocs-main) @ vendorx_jdbc_driver_wrapper --- [info] installing c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\javadoctemp\thejavadocs.jar c:\users\wibble\.m2\repository\uk\co\his\com\vendorx\vjdbc99\11. 2.0.1.0\vjdbc99-11.2.0.1.0-javadoc.jar [info] [info] --- maven-install-plugin:2.3.1:install-file (install-library-debug) @ vendorx_jdbc_driver_wrapper --- [info] installing c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\lib\vjdbc99_g.jar c:\users\wibble\.m2\repository\uk\co\his\com\vendorx\vjdbc99_g\11.2.0.1.0\o jdbc6_g-11.2.0.1.0.jar [info] installing c:\users\wibble\appdata\local\temp\1\mvninstall4548076073436253537.pom c:\users\wibble\.m2\repository\uk\co\his\com\vendorx\vjdbc99_g\11.2.0.1.0\vjdbc99_g-11.2.0.1.0.pom [info] [info] --- maven-install-plugin:2.3.1:install-file (install-javadocs-debug) @ vendorx_jdbc_driver_wrapper --- [info] installing c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\javadoctemp\thejavadocs.jar c:\users\wibble\.m2\repository\uk\co\his\com\vendorx\vjdbc99_g\1 1.2.0.1.0\vjdbc99_g-11.2.0.1.0-javadoc.jar [info] [info] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ vendorx_jdbc_driver_wrapper --- [info] skipping artifact deployment [info] [info] --- maven-deploy-plugin:2.7:deploy-file (deploy-library-main) @ vendorx_jdbc_driver_wrapper --- uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0.jar uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0.jar (2062 kb @ 3152.7 kb/sec) uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0.pom uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0.pom (404 b @ 8.8 kb/sec) downloading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/maven-metadata.xml uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/maven-metadata.xml uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/maven-metadata.xml (316 b @ 6.1 kb/sec) uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0-javadoc.jar uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0-javadoc.jar (780 kb @ 1621.4 kb/sec) [info] [info] --- maven-deploy-plugin:2.7:deploy-file (deploy-library-debug) @ vendorx_jdbc_driver_wrapper --- uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/11.2.0.1.0/vjdbc99_g-11.2.0.1.0.jar uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/11.2.0.1.0/vjdbc99_g-11.2.0.1.0.jar (3323 kb @ 2472.1 kb/sec) uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/11.2.0.1.0/vjdbc99_g-11.2.0.1.0.pom uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/11.2.0.1.0/vjdbc99_g-11.2.0.1.0.pom (406 b @ 6.8 kb/sec) downloading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/maven-metadata.xml uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/maven-metadata.xml uploaded: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99_g/maven-metadata.xml (318 b @ 4.7 kb/sec) uploading: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/11.2.0.1.0/vjdbc99-11.2.0.1.0-javadoc.jar [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 6.311s [info] finished at: mon jan 23 12:34:09 gmt 2012 [info] final memory: 4m/15m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (deploy-library-debug) on project vendorx_jdbc_driver_wrapper: error deploying attached artifact c:\users\adm inistrator\workspace\vendorx_jdbc_driver_wrapper\files\11.2.0.1.0\jdbc\javadoctemp\thejavadocs.jar: failed deploy artifacts: not transfer artifact uk.co.his.com.vendorx:vjdbc99:jar:javadoc:11.2. 0.1.0 from/to releases (http://foo.lan:8888/nexus/content/repositories/releases): failed transfer file: http://foo.lan:8888/nexus/content/repositories/releases/a/b/c/com/vendorx/vjdbc99/1 1.2.0.1.0/vjdbc99-11.2.0.1.0-javadoc.jar. homecoming code is: 400 -> [help 1] [error] [error] see total stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable total debug logging. [error] [error] more info errors , possible solutions, please read next articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception c:\users\wibble\workspace\vendorx_jdbc_driver_wrapper>

i have created bug on deploy plugin jira: mdeploy-143

third party poms never play nicely local maven infrastructure.

the pom in question modifies maven build lifecycle associating number of goals phase install.

to deploy artifacts defined pom, i'd recommend first create artifacts issuing mvn package command. create artifacts in project's build folder (target/) not send them local repository. upload them manually 1 1 repository.

if instead prefer deploy straight pom file, prepared serious editing beforehand.

as side note: might want set such artifacts 3rd party repository within nexus, not nexus/content/repositories/releases, reserved releases of own software (by convention).

hope helps!

maven javadoc

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -