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://artprod.example.com/artifactory/test-deploy-releases;build.name=${project.artifactId};build.timestamp=${timestamp};build.number=${buildNumber}</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>artprod.example.com-snapshots</name>
            
<url>https://artprod.example.com/artifactory/test-deploy-snapshots;build.name=${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://artprod.example.com/artifactory/test-deploy-snapshots;build.name=com.example.artifact;build.timestamp=20170212002949;build.number=${buildNumber}):
 Illegal character in path at index 155: 
https://artprod.example.com/artifactory/test-deploy-snapshots;build.name=com.example.artifact;build.timestamp=20170212002949;build.number=${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://www.jfrog.com/confluence/display/RTF/Using+Properties+in+Deployment+and+Resolution#UsingPropertiesinDeploymentandResolution-DynamicallyAddingPropertiestoArtifactsonDeployment

----------------------------------------------------------------------
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.

Reply via email to