apache / apache/maven-invoker-plugin

invoker:install ignores bom files in dependency tree

Open
#680 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
22
Forks
35
Avg merge
2d 17h
Merged PRs (30d)
7

Description

### Affected version

3.9.11

### Bug description

For Jdbi, we use the following structure:

module-under-test -- (parent) --> parent -- (parent) --> build-parent -> ...

the invoker plugin correctly resolves this:

```
module under test -> [INFO] Installing /Users/henning/code/jdbi/core/target/new-pom.xml to /Users/henning/code/jdbi/core/target/local-repo/org/jdbi/jdbi3-core/3.50.0-SNAPSHOT/jdbi3-core-3.50.0-SNAPSHOT.pom
direct parent -> [INFO] Installing /Users/henning/code/jdbi/pom.xml to /Users/henning/code/jdbi/core/target/local-repo/org/jdbi/internal/jdbi3-parent/3.50.0-SNAPSHOT/jdbi3-parent-3.50.0-SNAPSHOT.pom
build parent -> [INFO] Installing /Users/henning/code/jdbi/internal/build/pom.xml to /Users/henning/code/jdbi/core/target/local-repo/org/jdbi/jdbi3-build-parent/3.50.0-SNAPSHOT/jdbi3-build-parent-3.50.0-SNAPSHOT.pom
parent -> [INFO] Installing /Users/henning/code/jdbi/internal/root/pom.xml to /Users/henning/code/jdbi/core/target/local-repo/org/jdbi/internal/jdbi3-root/3.50.0-SNAPSHOT/jdbi3-root-3.50.0-SNAPSHOT.pom
parent -> [INFO] Installing /Users/henning/.m2/repository/org/basepom/basepom-oss/63/basepom-oss-63.pom to /Users/henning/code/jdbi/core/target/local-repo/org/basepom/basepom-oss/63/basepom-oss-63.pom
parent -> [INFO] Installing /Users/henning/.m2/repository/org/basepom/basepom-minimal/63/basepom-minimal-63.pom to /Users/henning/code/jdbi/core/target/local-repo/org/basepom/basepom-minimal/63/basepom-minimal-63.pom
parent -> [INFO] Installing /Users/henning/.m2/repository/org/basepom/basepom-foundation/63/basepom-foundation-63.pom to /Users/henning/code/jdbi/core/target/local-repo/org/basepom/basepom-foundation/63/basepom-foundation-63.pom
```

However, the direct parent contains this:

```



org.jdbi
jdbi3-bom
${project.version}
pom
import



```

(we delegate artifact resolution to our bom that we maintain anyway).

So when the invoker plugin starts, it finds all dependencies already installed in the local repository, except the "jdbi3-bom" dependency which it then downloads from central-snapshots.

The invoker plugin, for pom files, should also scan the dependencyManagement section, and find bom files (which are indirections for dependency versions) and install those in the local repository.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the invoker plugin's POM installation and dependency-tree resolution using the Jdbi structure described in the report. Reproduce the case with a dependencyManagement entry importing jdbi3-bom; the work is done when BOM POMs found there are installed in the local repository instead of downloaded from central-snapshots.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.