Skip to content

Commit

Permalink
Update POM to use the release plugin
Browse files Browse the repository at this point in the history
Fixes #51

Signed-off-by: Gary O'Neall <[email protected]>
  • Loading branch information
goneall committed Dec 17, 2023
1 parent f363a25 commit a878fb7
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 45 deletions.
10 changes: 10 additions & 0 deletions RELEASE-CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Release Checklist for the SPDX RDF Store

- [ ] Check for any warnings from the compiler and findbugs
- [ ] Run unit tests for all packages that depend on the library
- [ ] Run dependency check to find any potential vulnerabilities `mvn dependency-check:check`
- [ ] Run `mvn release:prepare` - you will be prompted for the release - typically take the defaults
- [ ] Run `mvn release:perform`
- [ ] Release artifacts to Maven Central
- [ ] Create a Git release including release notes
- [ ] Zip up the files from the Maven archive and add them to the release
96 changes: 53 additions & 43 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>spdx</sonar.organization>
<sonar.projectKey>spdx-tagvalue-store</sonar.projectKey>
<dependency-check-maven.version>8.0.1</dependency-check-maven.version>
<dependency-check-maven.version>8.4.3</dependency-check-maven.version>
</properties>

<description>SPDX store that supports serializing and deserializing SPDX tag/value files.</description>
<scm>
<url>https://github.com/spdx/spdx-java-tagvalue-store</url>
<connection>https:</connection>
<connection>scm:git:ssh://[email protected]:spdx/spdx-java-tagvalue-store</connection>
<developerConnection>scm:git:[email protected]:spdx/spdx-java-tagvalue-store</developerConnection>
<tag>master</tag>
</scm>
<issueManagement>
<system>Github</system>
Expand Down Expand Up @@ -69,9 +71,23 @@
</properties>
</profile>
<profile>
<id>gpg-signing</id>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -90,6 +106,28 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<quiet>true</quiet>
<source>8</source>
<javadocExecutable>${env.JAVA_HOME}/bin/javadoc</javadocExecutable>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -149,6 +187,16 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
Expand All @@ -157,7 +205,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -167,46 +215,10 @@
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<quiet>true</quiet>
<source>8</source>
<javadocExecutable>${env.JAVA_HOME}/bin/javadoc</javadocExecutable>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.spdx</groupId>
<artifactId>spdx-maven-plugin</artifactId>
<version>0.5.5</version>
<version>0.7.1</version>
<executions>
<execution>
<id>build-spdx</id>
Expand All @@ -217,8 +229,6 @@
</execution>
</executions>
<configuration>
<spdxDocumentNamespace>http://spdx.org/documents/java-spdx-tagvalue-store-{$version}</spdxDocumentNamespace>

<defaultFileCopyright>Copyright (c) 2020 Source Auditor Inc.</defaultFileCopyright>
<defaultFileContributors>
<param>Gary O'Neall</param>
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/org/spdx/tagvaluestore/TagValueStoreTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ public void testArtifactOf() throws InvalidSPDXAnalysisException, IOException {
public void testCaseWarning() throws InvalidSPDXAnalysisException, IOException {
File tagValueFile = new File(CASE_FILE_PATH);
TagValueStore tvs = new TagValueStore(new InMemSpdxStore());
String docUri = null;
try (InputStream tagValueInput = new FileInputStream(tagValueFile)) {
docUri = tvs.deSerialize(tagValueInput, false);
tvs.deSerialize(tagValueInput, false);
}
assertEquals(1, tvs.getWarnings().size());
}
Expand Down

0 comments on commit a878fb7

Please sign in to comment.