[Created] (MDEP-591) Deployment confuses copy-dependencies: Search for timestamped SNAPSHOTs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Created] (MDEP-591) Deployment confuses copy-dependencies: Search for timestamped SNAPSHOTs

JIRA jira@apache.org
Andreas Sewe created MDEP-591:
---------------------------------

             Summary: Deployment confuses copy-dependencies: Search for timestamped SNAPSHOTs
                 Key: MDEP-591
                 URL: https://issues.apache.org/jira/browse/MDEP-591
             Project: Maven Dependency Plugin
          Issue Type: Bug
          Components: copy-dependencies
    Affects Versions: 3.0.2, 2.10
         Environment: Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
Java version: 1.8.0_111, vendor: Oracle Corporation
            Reporter: Andreas Sewe


Tested this with both versions 3.0.2 and 2.10.

I want to use {{deploy:deploy}} together with {{depedency:copy-dependencies}} to create a small, self-contained Maven repository containing just my projects and their dependencies.

For projects with release versions this works fine, but it fails for snapshots.

Steps to reproduce using a publicly available project:

{noformat}
> git clone https://github.com/apache/maven-resolver.git
> cd maven-resolver
> git checkout f7288bbbd8918e985e70cffd3f8a7950cf88dd50
> mvn -DskipTests -Dcheckstyle.skip -Drat.skip clean # Don't both with unnecessary steps \
    deploy -DaltDeploymentRepository=platform::default::file:///tmp/maven-resolver-repository \
    dependency:copy-dependencies -DoutputDirectory=/tmp/maven-resolver-repository -Dmdep.useRepositoryLayout=true -Dmdep.addParentPoms=true
{noformat}

This fails with the following error message:

{noformat}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.10:copy-dependencies (default-cli) on project maven-resolver-api: Could not find artifact org.apache.maven.resolver:maven-resolver:pom:1.1.1-20171206.115240-1 in apache.snapshots (https://repository.apache.org/snapshots)
{noformat}

But {{org.apache.maven.resolver:maven-resolver:pom:1.1.1-SNAPSHOT}} is part of the same reactor; it is just that {{dependency:copy-dependencies}} is looking for a timestamped artifact that causes the failure.

FWIW, these problems do not occur if {{dependency:copy-dependencies}} is invoked in a separate project, i.e., {{mvn clean deploy … && mvn dependency:copy-dependencies}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)