You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Janning (Jira)" <ji...@apache.org> on 2020/03/23 14:16:00 UTC

[jira] [Created] (MDEP-680) dependency:go-offline does not use repositories from parent pom in reactor build

Andreas Janning created MDEP-680:
------------------------------------

             Summary: dependency:go-offline does not use repositories from parent pom in reactor build
                 Key: MDEP-680
                 URL: https://issues.apache.org/jira/browse/MDEP-680
             Project: Maven Dependency Plugin
          Issue Type: Bug
          Components: go-offline
    Affects Versions: 3.1.2
            Reporter: Andreas Janning
         Attachments: go-offline-repository-reproducer.zip

h3. Observed behaviour

When running dependency:go-offline on multi-module projects, sub-modules always resolve their dependencies from maven-central, even if they inherit <repositories> from their parent pom
h3. Expected behaviour

dependency:go-offline resolves dependencies exactly the same way as they would be resolved in when running mvn install on the project, respecting <repositories> defined in parent poms.
h3. Description

When using dependency:go-offline to resolve the dependencies of a reactor build, repositories defined in a parent pom are ignored when resolving the dependencies of a module.

I have attached an example project to illustrate the issue

When running 
{code:java}
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline -Dmaven.repo.local=./depPluginRepo
{code}
on the parent project, the dependencies of the "parent" module are correctly resolved from the jcenter repository. But the dependencies of "child" are resolved from maven central. Even worse: When the dependency in question is not found in maven central, the build fails.

 

 

 



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