[
https://issues.apache.org/jira/browse/MDEP-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976481#comment-15976481
]
Michael Osipov commented on MDEP-533:
-------------------------------------
bq. I would consider this a bug in the toString. The toString should print
valid Maven coordinates.
They are valid if you invert the bug. Currently, there is a mess in how
coordinates are supplied or written. In this plugin there are at least three
formats of input/output. Some are parsed directly, some are passed to some
shared component. MASSEMBLY has the same issue, custom format. It uses {{
org.apache.maven.shared.artifact.filter}}. I am quite certain that you will
find various diffent other spots in other plugins.
What makes it even worse is that we have {{Artifact}}, {{DependencyNode}},
{{Coordinate}} and other classes in Maven and Aether which likely will be
inconsistent.
bq. I'm not sure what you mean by "predefines"
Predefined formats: {{legacy}}: today's format, {{artifactFormat}}:
{{<groupId>:<artifactId>:<packaging>:<version>}}, etc.
bq. I might be willing to contribute, if there's consensus on what to do first
(don't want to do the work, only to have it rejected).
Fully agree here and second it.
I'd recommend to collect all those mismatches throughout the system and raise
it on dev@. I am personally willing to merge changes as long as we have a
consensus on the matter.
> dependency:list mismatch with -Dartifact= format
> ------------------------------------------------
>
> Key: MDEP-533
> URL: https://issues.apache.org/jira/browse/MDEP-533
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: resolve
> Affects Versions: 2.10
> Reporter: Christopher Tubbs
>
> I believe there is a bug in {{dependency:list}}. The output format is:
> {{<groupId>:<artifactId>:<packaging>:<version>}}
> Most of the other goals, like {{get}} and {{copy}} expect the artifact
> coordinates to be of the form:
> {{<groupId>:<artifactId>:<version>:<packaging>}}
> This means you cannot easily write a script to use the output of {{list}} to
> resolve artifacts with {{get}} or {{copy}} and {{-Dartifact=...}}
> I believe this is probably a bug in the output of {{list}}, but if anybody is
> relying on it, it might be better to add a new goal which fixes it by
> default, and has an option to specify the output format.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)