I think this should be possible, but I have not found anything related to it, as all I have found relates to dependency repositories.
What I would like to do is define the repository where maven (deploy, or release plugin for example) pushes the artifacts. How can I define it on the command line? I assume it is -Dsomething
UPDATE: When I read a jenkins error output carefully, it hints about using:-DaltDeploymentRepository=id::layout::url
What Is the format for using this? What is the layout parameter?
The simplest thing is to read the documentation about the maven-deploy-plugin which describes the format:
mvn -DaltDeploymentRepository=repositoryId::default::http://WhatEverURL
In the distributionManagement you usually give things like:
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>MyCo Internal Repository</name>
<url>Host to Company Repository</url>
</repository>
</distributionManagement>
If you like to use a different URL in this case you need to give:
mvn -DaltDeploymentRepository=internal.repo::default::http://WhatEverURL
The default in this case is the default for the maven repository layout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With