Skip to content

Commit c5846e1

Browse files
committed
chore(ci): add spdx plugin
Signed-off-by: Sam Gammon <[email protected]>
1 parent 36538cc commit c5846e1

File tree

2 files changed

+97
-3
lines changed

2 files changed

+97
-3
lines changed

guava/pom.xml

+83-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<version>HEAD-jre-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>guava</artifactId>
12-
<packaging>bundle</packaging>
12+
<packaging>jar</packaging>
1313
<name>Guava: Google Core Libraries for Java</name>
1414
<url>https://github.com/google/guava</url>
1515
<description>
@@ -222,4 +222,86 @@
222222
</plugin>
223223
</plugins>
224224
</build>
225+
<profiles>
226+
<profile>
227+
<id>spdx</id>
228+
<activation>
229+
<jdk>[11,</jdk>
230+
</activation>
231+
<build>
232+
<plugins>
233+
<!--
234+
@TODO(sgammon): explain
235+
-->
236+
<plugin>
237+
<groupId>org.spdx</groupId>
238+
<artifactId>spdx-maven-plugin</artifactId>
239+
<executions>
240+
<execution>
241+
<id>build-spdx</id>
242+
<phase>install</phase>
243+
<goals>
244+
<goal>createSPDX</goal>
245+
</goals>
246+
</execution>
247+
</executions>
248+
<configuration>
249+
<useArtifactID>true</useArtifactID>
250+
<includeTransitiveDependencies>true</includeTransitiveDependencies>
251+
<originator>Organization: Google, LLC</originator>
252+
<copyrightText>Copyright (c) 2012-2024, The Guava Authors</copyrightText>
253+
<defaultFileCopyright>Copyright (c) 2012-2024, The Guava Authors</defaultFileCopyright>
254+
<defaultFileConcludedLicense>Apache-2.0</defaultFileConcludedLicense>
255+
<creators><creator>Organization: Google, LLC</creator></creators>
256+
<checksumAlgorithms>
257+
<checksumAlgorithm>SHA256</checksumAlgorithm>
258+
</checksumAlgorithms>
259+
</configuration>
260+
</plugin>
261+
<!--
262+
@TODO(sgammon): explain
263+
-->
264+
<plugin>
265+
<groupId>org.apache.maven.plugins</groupId>
266+
<artifactId>maven-antrun-plugin</artifactId>
267+
<executions>
268+
<execution>
269+
<id>repack-spdx</id>
270+
<phase>install</phase>
271+
<goals>
272+
<goal>run</goal>
273+
</goals>
274+
<configuration>
275+
<target>
276+
<unzip src="${project.build.directory}/guava-${project.version}.jar" dest="${project.build.directory}/repack"/>
277+
<copy todir="${project.build.directory}/repack/META-INF/spdx">
278+
<fileset dir="${project.build.directory}/site" >
279+
<include name="*.spdx.json"/>
280+
</fileset>
281+
</copy>
282+
<zip basedir="${project.build.directory}/repack" destfile="${project.build.directory}/guava-${project.version}.jar"/>
283+
</target>
284+
</configuration>
285+
</execution>
286+
</executions>
287+
</plugin>
288+
<!--
289+
@TODO(sgammon): explain
290+
-->
291+
<plugin>
292+
<artifactId>maven-gpg-plugin</artifactId>
293+
<executions>
294+
<execution>
295+
<id>default-gpg</id>
296+
<phase>install</phase>
297+
<goals>
298+
<goal>sign</goal>
299+
</goals>
300+
</execution>
301+
</executions>
302+
</plugin>
303+
</plugins>
304+
</build>
305+
</profile>
306+
</profiles>
225307
</project>

pom.xml

+14-2
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,20 @@
274274
<artifactId>build-helper-maven-plugin</artifactId>
275275
<version>3.4.0</version>
276276
</plugin>
277+
<plugin>
278+
<artifactId>maven-gpg-plugin</artifactId>
279+
<version>3.0.1</version>
280+
</plugin>
281+
<plugin>
282+
<groupId>dev.sigstore</groupId>
283+
<artifactId>sigstore-maven-plugin</artifactId>
284+
<version>0.4.0</version>
285+
</plugin>
286+
<plugin>
287+
<groupId>org.spdx</groupId>
288+
<artifactId>spdx-maven-plugin</artifactId>
289+
<version>0.7.3</version>
290+
</plugin>
277291
</plugins>
278292
</pluginManagement>
279293
</build>
@@ -331,7 +345,6 @@
331345
<plugin>
332346
<groupId>dev.sigstore</groupId>
333347
<artifactId>sigstore-maven-plugin</artifactId>
334-
<version>0.4.0</version>
335348
<executions>
336349
<execution>
337350
<id>sign</id>
@@ -343,7 +356,6 @@
343356
</plugin>
344357
<plugin>
345358
<artifactId>maven-gpg-plugin</artifactId>
346-
<version>3.0.1</version>
347359
<executions>
348360
<execution>
349361
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)