Skip to content

go-offline goal ignores excludeReactor flag for plugin dependencies since 3.9.0 #1543

@PayBas

Description

@PayBas

Affected version

3.9.0

Bug description

Since 3.9.0 the following doesn't work anymore when both mega.corp:foo and mega.corp:bar are part of the same reactor build.

<project>
    <groupId>mega.corp</groupId>
    <artifactId>foo</artifactId>
    <version>${revision}</version>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jaxb2-maven-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>mega.corp</groupId>
                            <artifactId>bar</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <executions>
                    ...
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Running mvn dependency:go-offline results in:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.9.0:go-offline (default-cli) on project bar: The following artifacts could not be resolved: mega.corp:bar:jar:0.0.0-local-SNAPSHOT (absent)
Could not transfer artifact mega.corp:bar:jar:0.0.0-local-SNAPSHOT from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots, default, snapshots)] -> [Help 1]

This was not an issue prior to 3.9.0. Probably because older versions didn't try to resolve plugin-dependencies at all.

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