← All tasks
javaapache/maven #8501Not checked yet

[MNG-6759] [REGRESSION] Maven fails to use <repositories> section from dependency when resolving transitive dependencies in some cases

envgap__apache__maven-8501

Original GitHub issue ↗Opened 2019-09-07

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not checked yet.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
pom.xml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

apache/maven #8501 · read the original issue
**[Stig Rohde Døssing](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=srdo)** opened **[MNG-6759](https://issues.apache.org/jira/browse/MNG-6759?redirect=false)** and commented

With Maven 3.6.2, I get the following error on a project using the ASF parent POM version 21:

> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (process-resource-bundles) on project ChildA: Failed to resolve dependencies for one or more projects in the reactor. Reason: Missing:
> [ERROR] ----------
> [ERROR] 1) io.confluent:kafka-avro-serializer:jar:1.0
> [ERROR]
> [ERROR]   Try downloading the file manually from the project website.
> [ERROR]
> [ERROR]   Then, install it using the command:
> [ERROR]       mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file
> [ERROR]
> [ERROR]   Alternatively, if you host your own repository you can deploy the file there:
> [ERROR]       mvn deploy:deploy-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> [ERROR]
> [ERROR]   Path to dependency:
> [ERROR]         1) io.github.srdo:ChildA:jar:0.0.1-SNAPSHOT
> [ERROR]         2) io.github.srdo:ChildB:jar:0.0.1-SNAPSHOT
> [ERROR]         3) io.confluent:kafka-avro-serializer:jar:1.0
> [ERROR] ----------
> [ERROR] 1 required artifact is missing.
> [ERROR]
> [ERROR] for artifact:
> [ERROR]   io.github.srdo:ChildA:jar:0.0.1-SNAPSHOT
> [ERROR]
> [ERROR] from the specified remote repositories:
> [ERROR]   apache.snapshots (https://repository.apache.org/snapshots, releases=false, snapshots=true),
> [ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

This build works on Maven 3.6.1. I've put up a reproduction at https://github.com/srdo/Maven362RepositoriesRegression

I've found the following workarounds:

* Dropping the ASF parent POM. Maybe there's a plugin version in there Maven 3.6.2 doesn't like?
* Copying the \<repositories> section from ChildB into ChildA



---

**Affects:** 3.6.2

**Issue Links:**
- [MNG-6638](https://issues.apache.org/jira/browse/MNG-6638) Prevent reparsing POMs in MavenMetadataSource
 (_**"is caused by"**_)

**Remote Links:**
- [GitHub Pull Request #50
](https://github.com/apache/maven-integration-testing/pull/50)
- [GitHub Pull Request #294
](https://github.com/apache/maven/pull/294)
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy reproduction is generic install-only; match the actual issue failure before admission.