Dear Maven Users,
I am using the maven-deploy-plugin to deploy snapshot builds to a shared
repository. This works fine for all my "standard" projects, but I have one
project that uses the maven-pde-plugin to build an Eclipse plugin, and this
involves attaching an extra artifact to the build. My POM packaging type
for this project is is "pom", mainly because I couldn't get the
maven-pde-plugin to work with any other packaging type. The build process
works fine, and I can install the generated artifacts to my local repository
using "mvn install", but as soon as I try "mvn deploy" to upload the
artifacts to my shared repository, everything goes pear-shaped.
Specifically, there are 2 artifacts produced by the build: a POM file and a
ZIP file. The POM file is given the buildNumber I would expect - e.g. if
the latest buildNumber is 2, it would be given buildNumber 3. However, the
ZIP file (which is the attached artifact produced by the maven-pde-plugin)
is given a buildNumber of 4, and if I check the maven-metadata.xml file, the
buildNumber has indeed been incremented twice.
Sample output from "mvn deploy" (with company-specific information cunningly
blanked out):
[INFO] [deploy:deploy {execution: default-deploy}]
[INFO] Retrieving previous build number from inhouse_snapshot_xxx
Uploading:
http://123.123.123.123:8081/nexus/content/repositories/snapshots/com/xxxxxxxxxx/xxx/xxx-eclipse-plugin/xxx-SNAPSHOT/xxx-eclipse-plugin-xxx-20101001.150902-3.pom
4K uploaded (xxx-eclipse-plugin-xxx-20101001.150902-3.pom)
[INFO] Retrieving previous metadata from inhouse_snapshot_xxx
[INFO] Uploading repository metadata for: 'artifact
com.xxxxxxxxxx.xxx:xxx-eclipse-plugin'
[INFO] Retrieving previous metadata from inhouse_snapshot_xxx
[INFO] Uploading repository metadata for: 'snapshot
com.xxxxxxxxxx.xxx:xxx-eclipse-plugin:xxx-SNAPSHOT'
[INFO] Retrieving previous build number from inhouse_snapshot_xxx
Uploading:
http://123.123.123.123:8081/nexus/content/repositories/snapshots/com/xxxxxxxxxx/xxx/xxx-eclipse-plugin/xxx-SNAPSHOT/xxx-eclipse-plugin-xxx-20101001.150902-4.zip
27K uploaded (xxx-eclipse-plugin-xxx-20101001.150902-4.zip)
[INFO] Retrieving previous metadata from inhouse_snapshot_xxx
[INFO] Uploading repository metadata for: 'artifact
com.xxxxxxxxxx.xxx:xxx-eclipse-plugin'
[INFO] Retrieving previous metadata from inhouse_snapshot_xxx
[INFO] Uploading repository metadata for: 'snapshot
com.xxxxxxxxxx.xxx:xxx-eclipse-plugin:xxx-SNAPSHOT'
As you can see, the POM file has the suffix "-3.pom" whereas the ZIP file
has the suffix "-4.zip". I've searched the maven-deploy-plugin JIRA for
similar issues and found a few that appear to show the same behaviour
(MDEPLOY-27, MDEPLOY-32 and MDEPLOY-33), but they all appear to have been
marked as Fixed long ago.
Any assistance on this would be greatly appreciated. Thanks in advance.
Regards
Daniel Patton
[email protected]