Skip to content

Commit fce8a46

Browse files
committed
Introduce profile for SBOM generation
1 parent 63d87b1 commit fce8a46

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

parent/pom.xml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -187,29 +187,40 @@
187187
</plugin>
188188
</plugins>
189189
</pluginManagement>
190-
191-
<plugins>
192-
<plugin>
193-
<groupId>org.cyclonedx</groupId>
194-
<artifactId>cyclonedx-maven-plugin</artifactId>
195-
<configuration>
196-
<schemaVersion>1.4</schemaVersion>
197-
<projectType>library</projectType>
198-
</configuration>
199-
<executions>
200-
<execution>
201-
<phase>package</phase>
202-
<goals>
203-
<goal>makeAggregateBom</goal>
204-
</goals>
205-
</execution>
206-
</executions>
207-
</plugin>
208-
</plugins>
209190

210191
</build>
211192

212193
<profiles>
194+
195+
<profile>
196+
<!-- Generates SBOM.
197+
Inactivate with -P-sbom-->
198+
<id>sbom</id>
199+
<activation>
200+
<activeByDefault>true</activeByDefault>
201+
</activation>
202+
<build>
203+
<plugins>
204+
<plugin>
205+
<groupId>org.cyclonedx</groupId>
206+
<artifactId>cyclonedx-maven-plugin</artifactId>
207+
<configuration>
208+
<schemaVersion>1.4</schemaVersion>
209+
<projectType>library</projectType>
210+
</configuration>
211+
<executions>
212+
<execution>
213+
<phase>package</phase>
214+
<goals>
215+
<goal>makeAggregateBom</goal>
216+
</goals>
217+
</execution>
218+
</executions>
219+
</plugin>
220+
</plugins>
221+
</build>
222+
</profile>
223+
213224
<!--
214225
This profile provides configuration for the plugins that are required are in
215226
order to deploy non SNAPSHOT artifacts.

0 commit comments

Comments
 (0)