Skip to content

Commit

Permalink
Add cyclonedx plugin configuration for generating SBOMs (#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
elahrvivaz authored Nov 29, 2023
1 parent d4a1fc4 commit 9a4fb82
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 2 deletions.
63 changes: 63 additions & 0 deletions build/cyclonedx-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<!--
cyclonedx does not pick up the repos defined in our pom, so we have to redefine them in the settings.xml.
This file can be used directly with `mvn -s build/cyclonedx-settings.xml`, or the contents can be merged
with a user's `~/.m2/settings.xml`.
-->
<id>cyclonedx</id>
<repositories>
<!-- include central so that it is searched before our alternate repos -->
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- geotools -->
<repository>
<id>osgeo</id>
<url>https://repo.osgeo.org/repository/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- confluent -->
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
<!-- nightly geomesa snapshots -->
<repository>
<id>locationtech-snapshots</id>
<url>https://repo.eclipse.org/content/groups/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- nightly geotools snapshots -->
<repository>
<id>osgeo-snapshots</id>
<url>https://repo.osgeo.org/repository/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>

35 changes: 33 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -290,6 +290,32 @@
</pluginRepositories>
</profile>

<profile>
<id>cyclonedx</id>
<build>
<plugins>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>2.7.10</version>
<configuration>
<schemaVersion>1.4</schemaVersion>
<projectType>library</projectType>
</configuration>
<executions>
<execution>
<id>makeBom</id>
<phase>verify</phase>
<goals>
<goal>makeBom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>bloop</id>
<properties>
Expand Down Expand Up @@ -3461,6 +3487,11 @@
<tag>geomesa_2.11-3.1.0</tag>
</scm>

<issueManagement>
<system>JIRA</system>
<url>https://geomesa.atlassian.net/issues/</url>
</issueManagement>

<developers>
<developer>
<name>Anthony Fox</name>
Expand Down

0 comments on commit 9a4fb82

Please sign in to comment.