Skip to content

Requests to wrong repositories causing block from apache.org #613

@mguillem

Description

@mguillem

The cyclonedx-maven-plugin performs useless requests to repositories found in dependencies (even with --ignore-transitive-repositories). The consequence for us was that we have been blocked from apache.org (https://infra.apache.org/abc/).

Here is a minimal project with only 3 simple pom.xml files allowing to reproduce the problem: https://github.com/mguillem/issue-cyclonedx-wrong-download

To summarize:

  • multimodule project with one parent and two children
  • child 1 contains one dependency and generates a test-jar
  • child 2 references child 1 jar & test-jar

In this demo project, the download is blocked by the mirror settings due to the http protocol, what makes the problematic requests visible.

[INFO] --- cyclonedx:2.9.0:makeBom (default-cli) @ child2 ---
[INFO] CycloneDX: Resolving Dependencies
[WARNING] Could not transfer metadata test:child1:0.0.1-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots)]
[WARNING] Could not transfer metadata test:wrong-repo-parent:0.0.1-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots)]
[WARNING] test:wrong-repo-parent:0.0.1-SNAPSHOT/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata test:wrong-repo-parent:0.0.1-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions