Skip to content

invoker:install ignores bom files in dependency tree #680

Description

@hgschmie

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:

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-bom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

(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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions