maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Georgeson <JGeorge...@lgc.com>
Subject RE: buildnumber-maven-plugin's buildNumber property unset during deploy goal
Date Sun, 12 Feb 2017 01:24:37 GMT
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://github.com/mojohaus/buildnumber-maven-plugin/issues/58

-----Original Message-----
From: Justin Georgeson [mailto:JGeorgeson@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.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message