Closed ThorbenLindhauer closed 1 year ago
Experiment for automatically detecting licenses:
mvn org.codehaus.mojo:license-maven-plugin:2.0.0:aggregate-download-licenses
in the root directory of the repo. Findings:
https://www.mojohaus.org/license-maven-plugin/aggregate-add-third-party-mojo.html and its configuration are quite powerful, e.g. the parameter templateFile
can be used to create a JSON document (or any other text format).
Same experiment as above using https://github.com/CycloneDX/cyclonedx-maven-plugin/:
Dependencies not detected:
jakarta.el-api
, which is detected correctlyIncorrect licenses:
BSD-3-Clause
is declared. Maybe Maven reads this comment when detecting the license. The license texts of the two licenses are 99% identical (note that https://www.eclipse.org/org/documents/edl-v10.php also gives BSD-3 Clause
as the SPDX identifier for the EDL 1.0 license)<licenses>
<license>
<name>BSD</name>
<url>http://asm.ow2.org/license.html</url>
</license>
</licenses>
BSD-3-Clause
in the name attribute. CycloneDX interprets BSD
as the original BSD-4-Clause license: https://github.com/CycloneDX/cyclonedx-core-java/blob/cyclonedx-core-java-7.3.2/src/main/resources/license-mapping.json#L73The plugin gets the license information from Maven (I assume that this means it retrieves whatever is declared in the pom.xml of the Maven artifact). See https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/cyclonedx-maven-plugin-2.7.9/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java#L297 and calling code.
Idea for the tool chain:
mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.9:makeAggregateBom
Side notes:
Test PRs:
Breakdown of remaining tasks:
maven-default-http-blocker
) in the global settings XML that redirects any http repository requests to the non-existent 0.0.0.0. Nevertheless, the artifacts can be resolved by other declared repositories, so that is not a problem.javax.enterprise:cdi-api:1.0-SP4
-T
parameter is not useful, becasue the makeAggregateBom
goal does all of its work in the root module (the remaining modules are skipped) and -T
only parallelizes by module-Dmaven.artifact.threads=10
) only has a slight positive effect (10:30 minutes vs 12:00 minutes build time)Blocked HTTP repository example output:
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from camunda-public-repository: https://artifacts.camunda.com/artifactory/public/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from maven-default-http-blocker: http://0.0.0.0/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Progress (1): 622 B
Downloaded from camunda-public-repository: https://artifacts.camunda.com/artifactory/public/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml (622 B at 6.1 kB/s)
Downloading from JBoss public: https://repository.jboss.org/nexus/content/groups/public/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Progress (1): 622 B
Downloading from sonatype-oss-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml (622 B at 2.3 kB/s)
Progress (1): 622 B
Downloaded from sonatype-oss-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml (622 B at 1.3 kB/s)
[WARNING] Could not transfer metadata org.camunda.bpm.webapp:camunda-webapp-root:7.20.0-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/camunda-webapp-root-7.20.0-20230818.070330-58.pom
Progress (1): 4.1/10 kB
Progress (1): 7.8/10 kB
Progress (1): 10 kB
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/camunda-webapp-root-7.20.0-20230818.070330-58.pom (10 kB at 42 kB/s)
[WARNING] org.camunda.bpm.webapp:camunda-webapp-root:7.20.0-SNAPSHOT/maven-metadata.xmlfailed 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 org.camunda.bpm.webapp:camunda-webapp-root:7.20.0-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Repos that we will roll out the workflow to:
camunda/camunda-bpm-platform camunda/camunda-bpm-platform-maintenance camunda/camunda-bpm-platform-ee camunda/camunda-bpm-platform-ee-maintenance camunda/camunda-connect camunda/camunda-spin camunda/camunda-commons camunda/camunda-template-engines-jsr223 camunda/camunda-bpm-rpa-bridge-ee
We will also need the 7.20 branches. ❓Should we also include the older but still active branches for spin, commons and connect? Or it's unnecessary.
The workflow rollout PRs miss a reference to the main branch for the reusable workflow, I thought it'd pick it by default.
uses: camunda/automation-platform-github-actions/.github/workflows/java-dependency-check.yml
needs to be changed to
uses: camunda/automation-platform-github-actions/.github/workflows/java-dependency-check.yml@main
@danielkelemen I have added the 7.20 PRs and corrected the workflow references. Please re-review.
❓Should we also include the older but still active branches for spin, commons and connect? Or it's unnecessary.
Forgot to respond here. I decided to not do backports there to save some effort. Anyone who needs it can still do it when they work with such a branch.
This issue was imported from JIRA:
Acceptance Criteria (Required on creation):
Hints (optional):
Links: