Andreas Janning opened MDEP-680 and commented
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
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.
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
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline -Dmaven.repo.local=./depPluginRepo
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.
Affects: 3.1.2
Attachments:
Issue Links:
- MDEP-743 go-offline doesn't resolve dependencies from non-central repos
("is duplicated by")
- MDEP-711 go-offline fails to download SNAPSHOT from other repository
("is duplicated by")
Remote Links:
Andreas Janning opened MDEP-680 and commented
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
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.
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
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.
Affects: 3.1.2
Attachments:
Issue Links:
("is duplicated by")
("is duplicated by")
Remote Links: