CycloneDX / CycloneDX/cyclonedx-maven-plugin

Requests to wrong repositories causing block from apache.org

Open
#613 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
385
Forks
107
Avg merge
17h 31m
Merged PRs (30d)
7

Description

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)]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.