Specifying a deployment repository *only* by ID?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Specifying a deployment repository *only* by ID?

Mark Raynsford-3
Hello.

If I want to deploy to a different repository, I can use the
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#altDeploymentRepository
property:

  $ mvn deploy -DaltDeploymentRepository=releases::default::https://packages.example.com/repository/releases

This is cumbersome, because I've already provided that URI and layout
in the ~/.m2/settings.xml file. I'd much rather do:

  $ mvn deploy -DaltDeploymentRepository=releases

Is there some way I can achieve this without putting anything in the
project's pom.xml?

--
Mark Raynsford | http://www.io7m.com


attachment0 (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Specifying a deployment repository *only* by ID?

Mirko Friedenhagen-5
Hello Mark,

you may put the property in a profile of your settings.xml and just call „mvn -P releases deploy“ given the profile is called releases.

Best Regards
Mirko Friedenhagen

Sent from my mobile

Am 03.11.18 um 17:55 schrieb Mark Raynsford

> Hello.
>
> If I want to deploy to a different repository, I can use the
> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#altDeploymentRepository
> property:
>
>   $ mvn deploy -DaltDeploymentRepository=releases::default::https://packages.example.com/repository/releases
>
> This is cumbersome, because I've already provided that URI and layout
> in the ~/.m2/settings.xml file. I'd much rather do:
>
>   $ mvn deploy -DaltDeploymentRepository=releases
>
> Is there some way I can achieve this without putting anything in the
> project's pom.xml?
>
> --
> Mark Raynsford | http://www.io7m.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Specifying a deployment repository *only* by ID?

Mark Raynsford-3
On 2018-11-04T00:24:46 +0100
"Mirko Friedenhagen" <[hidden email]> wrote:

> Hello Mark,
>
> you may put the property in a profile of your settings.xml and just call „mvn -P releases deploy“ given the profile is called releases.

Ah, yes, thank you! Didn't think of that.

--
Mark Raynsford | http://www.io7m.com


attachment0 (235 bytes) Download Attachment