[ 
https://issues.apache.org/jira/browse/MNG-7108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294479#comment-17294479
 ] 

Pawel Veselov commented on MNG-7108:
------------------------------------

[~michael-o], here you are:

* [^get-X.txt] - from first :get operation (I remove the binary download 
messages)

* [^copy-X.txt] - from the consequent :copy operation

 

[~hboutemy] I have not done anything by hand here, everything that I do I do 
through the dependency plugin. The meta-data file has a different name if 
-DremoteRepositories are used. Things work fine with either:
 * having the package come from Maven central
 * having a pom file that defines repositories to get the package from.

AFAIU, the problem here is that :copy has no idea which alternative metadata 
file names to try because it has no information on the repository IDs that were 
being used. Either the repository IDs shall be read and considered from 
_remote.repositories, or the user should be able to specify them as an input to 
the plugin.

I know LATEST is unsafe, but in this case I do need to use it (get the very 
latest version of a package, and copy it as a standalone JAR file so I don't 
have the code rummage in the local repo for it). In any case things break with 
RELEASE meta version as well.

 

 

> Can't copy dependency from a 3rd party repository
> -------------------------------------------------
>
>                 Key: MNG-7108
>                 URL: https://issues.apache.org/jira/browse/MNG-7108
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.6.3
>         Environment: Linux (fc33)
>            Reporter: Pawel Veselov
>            Priority: Major
>         Attachments: copy-X.txt, get-X.txt
>
>
> I can't seem to be able to copy a dependency that I previously downloaded 
> from a 3rd party repository, when referring to it using metaversion.
> This doesn't work, unless I refer to the version directly in the :copy 
> invocation:
> {noformat}
> $ # rm -rf ~/.m2/repository/org/openconext/ # clean up
> $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
> -DremoteRepositories=excelfore.public::::https://dev-esync.excelfore.com/artifactory/excelfore.public
>  \
> -Dartifact=org.openconext:mujina-idp:LATEST:jar
> $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:copy \
> -Dartifact=org.openconext:mujina-idp:LATEST:jar -DoutputDirectory=/tmp
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-dependency-plugin:3.1.2:copy (default-cli) on 
> project standalone-pom: Unable to find/resolve artifact.: Failed to read 
> artifact descriptor for org.openconext:mujina-idp:jar:LATEST: Failed to 
> resolve version for org.openconext:mujina-idp:jar:LATEST: Could not find 
> metadata org.openconext:mujina-idp/maven-metadata.xml in local 
> (/home/vps/.m2/repository) -> [Help 1]
> {noformat}
> (this is from a real public repo)
> I figure this has something to do with the fact that plugin has no knowledge 
> of the repository ID, and needs it to find the right metadata file. So maybe 
> the plugin should have "repositoryId" property that can be supplied to it so 
> it knows which metadata file to check.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to