Plain old 'mvn deploy' results in the failure [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ artifact --- Downloading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=${timestamp};build.number=${buildNumber}/com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata com.example:artifact:1.0-SNAPSHOT/maven-metadata.xml from/to snapshots (http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=${timestamp};build.number=${buildNumber}): Illegal character in path at index 100: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=${timestamp};build.number=${buildNumber}/com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml
Using 'mvn deploy -Dtimestamp=1234 -DbuildNumber=5678' succeeds (confirming I have permission). In the latter case where I supply the property via command-line or in the <properties> element in pom.xml, the Maven console output shows those properties resolved in the URL. [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ artifact --- Downloading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml Downloaded: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml (742 B at 1.6 KB/sec) Uploading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/artifact-1.0-20170213.204205-2.jar Uploaded: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/artifact-1.0-20170213.204205-2.jar (3 KB at 15.6 KB/sec) Uploading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/artifact-1.0-20170213.204205-2.pom Uploaded: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/artifact-1.0-20170213.204205-2.pom (3 KB at 26.1 KB/sec) Downloading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/maven-metadata.xml Downloaded: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/maven-metadata.xml (345 B at 8.0 KB/sec) Uploading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml Uploaded: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml (763 B at 16.2 KB/sec) Uploading: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/maven-metadata.xml Uploaded: http://art.example.com/artifactory/test-deploy-snapshots;build.name=artifact;build.timestamp=1234;build.number=5678/com/example/artifact/maven-metadata.xml (358 B at 5.6 KB/sec) The full example pom.xml that I'm using to test is now posted on the GitHub issue. -----Original Message----- From: Karl Heinz Marbaise [mailto:khmarba...@gmx.de] Sent: Sunday, February 12, 2017 5:17 AM To: Maven Users List <users@maven.apache.org> Subject: [EXTERNAL] Re: buildnumber-maven-plugin's buildNumber property unset during deploy goal External Sender: Use caution with links/attachments. Hi, first how are you calling Maven ? Can you show a complete call...Furthermore a full example pom ? Based on the docs..Do you have the permission to use the property ? You must have the 'Annotate' permission in order to add properties to deployed artifacts. ? Kind regards Karl Heinz Marbaise On 12/02/17 02:24, Justin Georgeson wrote: > Slight correction, the timestamp property as set by buildnumber-maven-plugin > is also not set. I noticed I am defaulting the timestamp property with > maven.build.timestamp. When I remove that then the failure also includes a > literal "${timestamp}" in the URL. I've tested using a stub project generated > with the quickstart archetype and submitted it as an issue to > buildnumber-maven-plugin [2]. > > [2] > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mojohaus_buildnumber-2Dmaven-2Dplugin_issues_58&d=DwIGaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=8-VAN_5IarytosAs-BfD5x8T0eWZPR6I0Ohn20tw0j4&s=ZnHB7P3TdNZ8jN1vBX-ptnWB9oq6rSN5mSTsPQZyALM&e= > > -----Original Message----- > From: Justin Georgeson [mailto:jgeorge...@lgc.com] > Sent: Saturday, February 11, 2017 6:51 PM > To: Maven Users List (users@maven.apache.org) <users@maven.apache.org> > Subject: [EXTERNAL] buildnumber-maven-plugin's buildNumber property unset > during deploy goal > > External Sender: Use caution with links/attachments. > > > > Posting here in case the issue is in maven-deploy-plugin rather than > buildnumber-maven-plugin. Using 1.4 of buildnumber-maven-plugin, with both > 3.2.5 and 3.3.9 of Maven. > > I'm trying to make use of Artifactory's matrix parameters in the > distributionManagement URL to attach properties in Artifactory [1]. > > <distributionManagement> > <repository> > <id>snapshots</id> > <name>artprod.example.com-releases</name> > > <url>https://urldefense.proofpoint.com/v2/url?u=https-3A__artprod.example.com_artifactory_test-2Ddeploy-2Dreleases-3Bbuild.name-3D-24&d=DwIFAg&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=Mm2YhlLYr2DTRM6a_kyb26TI7xMWKrVcvbOxyD948FA&s=GVz2IAufbzRlIuXon0_49qAdNYDX4euVAE4cvOgIvc4&e= > > {project.artifactId};build.timestamp=${timestamp};build.number=${buildNumber}</url> > </repository> > <snapshotRepository> > <id>snapshots</id> > <name>artprod.example.com-snapshots</name> > > <url>https://urldefense.proofpoint.com/v2/url?u=https-3A__artprod.example.com_artifactory_test-2Ddeploy-2Dsnapshots-3Bbuild.name-3D-24&d=DwIFAg&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=Mm2YhlLYr2DTRM6a_kyb26TI7xMWKrVcvbOxyD948FA&s=NF5fsk4I_uEc7eqXlyxPW5XGhNPjIQ8WwAsgVVKFV4Q&e= > > {project.artifactId};build.timestamp=${timestamp};build.number=${buildNumber}</url> > </snapshotRepository> > </distributionManagement> > > The deploy is failing because it has a literal "${buildNumber}" in the URL > while all the other property references (including the ${timestamp} property > also set by buildnumber-maven-plugin) are resolving ok. > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on > project com.example.artifact: Failed to retrieve remote metadata > com.example:com.example.artifact:10.5.4-SNAPSHOT/maven-metadata.xml: Could > not transfer metadata > com.example:com.example.artifact:10.5.4-SNAPSHOT/maven-metadata.xml from/to > snapshots > (https://urldefense.proofpoint.com/v2/url?u=https-3A__artprod.example.com_artifactory_test-2Ddeploy-2Dsnapshots-3Bbuild.name-3Dcom.example.artifact-3Bbuild.timestamp-3D20170212002949-3Bbuild.number-3D-24&d=DwIFAg&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=Mm2YhlLYr2DTRM6a_kyb26TI7xMWKrVcvbOxyD948FA&s=bxuoJXilYzFlOI-TuOn6OzgHIZ43HYBt6ptPIk8eF6Q&e= > {buildNumber}): Illegal character in path at index 155: > https://urldefense.proofpoint.com/v2/url?u=https-3A__artprod.example.com_artifactory_test-2Ddeploy-2Dsnapshots-3Bbuild.name-3Dcom.example.artifact-3Bbuild.timestamp-3D20170212002949-3Bbuild.number-3D-24&d=DwIFAg&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=Mm2YhlLYr2DTRM6a_kyb26TI7xMWKrVcvbOxyD948FA&s=bxuoJXilYzFlOI-TuOn6OzgHIZ43HYBt6ptPIk8eF6Q&e= > > {buildNumber}/com/lgc/dsg-installables/com.example.artifact/10.5.4-SNAPSHOT/maven-metadata.xml > -> [Help 1] > > I've tried changing the build number property name set by > buildnumber-maven-plugin with > -Dmaven.buildNumber.buildNumberPropertyName=build.blah and referencing that > alternate property in the distributionManagement URL, with the same ill > result. > > [1] > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.jfrog.com_confluence_display_RTF_Using-2BProperties-2Bin-2BDeployment-2Band-2BResolution-23UsingPropertiesinDeploymentandResolution-2DDynamicallyAddingPropertiestoArtifactsonDeployment&d=DwIFAg&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=Mm2YhlLYr2DTRM6a_kyb26TI7xMWKrVcvbOxyD948FA&s=7ySqBaHpasb8itCASvlLnjFRDfVoBt7Xc075kMUwcKI&e= > > ---------------------------------------------------------------------- > This e-mail, including any attached files, may contain confidential and > privileged information for the sole use of the intended recipient. Any > review, use, distribution, or disclosure by others is strictly prohibited. > If you are not the intended recipient (or authorized to receive information > for the intended recipient), please contact the sender by reply e-mail and > delete all copies of this message.