[
https://issues.apache.org/jira/browse/MDEPLOY-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253618#comment-17253618
]
Phil Clay commented on MDEPLOY-265:
-----------------------------------
Hi [~michael-o]. Thank you for the response!
It looks like the only recent changes to this area are to add a more
descriptive error message in
[https://github.com/apache/maven-deploy-plugin/pull/12].
Unfortunately, that change doesn't solve the problem for which I originally
filed this ticket.
I would like for the {{alt*DeploymentRepository}} properties to maintain
support for {{id::default::url}} format if and only if the layout is equal to
"default". Making this backwards compatible will allow maven settings files on
CI servers to specify the {{alt*DeploymentRepository}} properties regardless of
the version of the maven-deploy-plugin used by the hundreds of projects being
built by that CI server.
With the recent changes, the
[regex|https://github.com/apache/maven-deploy-plugin/blob/92d7e747c2228ed411ae6e9d1639401a6b8fe6cc/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java#L54]
for detecting the old format and [checking for layout ==
"default"|https://github.com/apache/maven-deploy-plugin/blob/92d7e747c2228ed411ae6e9d1639401a6b8fe6cc/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java#L260]
has been re-introduced for the purpose of modifying an error message. Since
the code is already parsing the string, and checking for layout == "default",
it would be trivial to continue to support the legacy format if the layout is
"default" by changing the code
[here|https://github.com/apache/maven-deploy-plugin/blob/92d7e747c2228ed411ae6e9d1639401a6b8fe6cc/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java#L262]
to output a warning message, instead of throwing an error.
I have submitted https://github.com/apache/maven-deploy-plugin/pull/15 to do so.
Please do consider merging the PR to make this backwards compatible to reduce
the pain when upgrading the maven-deploy-plugin for projects that use common
maven settings files that specify the {{alt*DeploymentRepository}} properties.
Thanks!
> Allow old alt*DeploymentRepository property format if default layout is used
> ----------------------------------------------------------------------------
>
> Key: MDEPLOY-265
> URL: https://issues.apache.org/jira/browse/MDEPLOY-265
> Project: Maven Deploy Plugin
> Issue Type: Improvement
> Components: deploy:deploy
> Affects Versions: 3.0.0-M1
> Reporter: Phil Clay
> Priority: Major
> Fix For: waiting-for-feedback
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In 3.0.0-M1, the format of the {{alt*DeploymentRepository}} properties
> changed from {{id::layout::url}} to {{id::url}}
>
> It would be awesome if the old format was supported _if and only if_ the
> layout was equal to {{default}}. Specifically, the following formats should
> be supported:
> * {{id::url}}
> * {{id::default::url}}
> This would allow for better backwards compatibility, and to allow the same
> property values to be used regardless of what version of the
> maven-deploy-plugin was used by a project (as long as the layout is
> {{default}})
>
> In my case, we have a global maven {{settings.xml}} file on our CI server
> that specifies the {{alt*DeploymentRepository}} properties to deploy to our
> corporate maven repository. I would like to be able to use this global maven
> settings.xml file regardless of what version of maven-deploy-plugin is used
> by our (many) projects. In order to do that, I would like to use the
> {{id::default::url}} format.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)