Skip to content

Commit 99f75e1

Browse files
committed
Update dependencies
Update all dependencies to the latest version and use properties for all versions for easy updating.
1 parent 48f3d4e commit 99f75e1

File tree

2 files changed

+37
-27
lines changed

2 files changed

+37
-27
lines changed

pom.xml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3-
43
<modelVersion>4.0.0</modelVersion>
54
<groupId>com.github.package-url</groupId>
65
<artifactId>packageurl-java</artifactId>
@@ -56,25 +55,30 @@
5655
<max.jdk.version>18</max.jdk.version>
5756

5857
<!-- Maven Plugin Versions -->
58+
<cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>
5959
<maven.clean.plugin.version>3.4.1</maven.clean.plugin.version>
6060
<maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version>
61-
<maven.deploy.plugin.version>2.7</maven.deploy.plugin.version>
62-
<maven.enforcer.plugin.version>3.4.1</maven.enforcer.plugin.version>
61+
<maven.deploy.plugin.version>3.1.4</maven.deploy.plugin.version>
62+
<maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>
63+
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
6364
<maven.install.plugin.version>3.1.4</maven.install.plugin.version>
6465
<maven.jar.plugin.version>3.4.2</maven.jar.plugin.version>
65-
<maven.javadoc.plugin.version>3.6.3</maven.javadoc.plugin.version>
66-
<maven.release.plugin.version>3.0.1</maven.release.plugin.version>
67-
<maven.resources.plugin.version>2.6</maven.resources.plugin.version>
66+
<maven.javadoc.plugin.version>3.11.2</maven.javadoc.plugin.version>
67+
<maven.release.plugin.version>3.1.1</maven.release.plugin.version>
68+
<maven.resources.plugin.version>3.3.1</maven.resources.plugin.version>
6869
<maven.site.plugin.version>3.21.0</maven.site.plugin.version>
69-
<maven.source.plugin.version>3.3.0</maven.source.plugin.version>
70+
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
7071
<maven.surefire.plugin.version>3.5.2</maven.surefire.plugin.version>
72+
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
7173
<!-- Maven build plugins for quality checks -->
7274
<error.prone.core.version>2.36.0</error.prone.core.version>
7375
<jacoco.maven.plugin.version>0.8.12</jacoco.maven.plugin.version>
74-
<spotbugs.maven.plugin.version>4.8.3.1</spotbugs.maven.plugin.version>
75-
<com.github.spotbugs.version>4.8.3</com.github.spotbugs.version>
76+
<spotbugs.maven.plugin.version>4.9.3.0</spotbugs.maven.plugin.version>
77+
<com.github.spotbugs.version>4.9.3</com.github.spotbugs.version>
7678
<!-- Dependency versions -->
77-
<junit.version>5.12.0</junit.version>
79+
<jakarta.validation-api.version>3.1.1</jakarta.validation-api.version>
80+
<json.version>20250107</json.version>
81+
<junit-bom.version>5.12.1</junit-bom.version>
7882
</properties>
7983

8084
<scm>
@@ -107,24 +111,22 @@
107111

108112
<dependencyManagement>
109113
<dependencies>
110-
111114
<!-- BOMs at the end, so they don't overwrite the dependencies above -->
112115
<dependency>
113116
<groupId>org.junit</groupId>
114117
<artifactId>junit-bom</artifactId>
115-
<version>${junit.version}</version>
118+
<version>${junit-bom.version}</version>
116119
<type>pom</type>
117120
<scope>import</scope>
118121
</dependency>
119-
120122
</dependencies>
121123
</dependencyManagement>
122124

123125
<dependencies>
124126
<dependency>
125127
<groupId>jakarta.validation</groupId>
126128
<artifactId>jakarta.validation-api</artifactId>
127-
<version>3.1.1</version>
129+
<version>${jakarta.validation-api.version}</version>
128130
<optional>true</optional>
129131
<scope>provided</scope>
130132
</dependency>
@@ -136,7 +138,7 @@
136138
<dependency>
137139
<groupId>org.json</groupId>
138140
<artifactId>json</artifactId>
139-
<version>20240303</version>
141+
<version>${json.version}</version>
140142
<scope>test</scope>
141143
</dependency>
142144
<dependency>
@@ -174,6 +176,11 @@
174176
<artifactId>maven-install-plugin</artifactId>
175177
<version>${maven.install.plugin.version}</version>
176178
</plugin>
179+
<plugin>
180+
<groupId>org.apache.maven.plugins</groupId>
181+
<artifactId>maven-gpg-plugin</artifactId>
182+
<version>${maven-gpg-plugin.version}</version>
183+
</plugin>
177184
<plugin>
178185
<groupId>org.apache.maven.plugins</groupId>
179186
<artifactId>maven-jar-plugin</artifactId>
@@ -278,6 +285,14 @@
278285
</dependency>
279286
</dependencies>
280287
</plugin>
288+
<plugin>
289+
<groupId>org.codehaus.mojo</groupId>
290+
<artifactId>versions-maven-plugin</artifactId>
291+
<version>${versions-maven-plugin.version}</version>
292+
<configuration>
293+
<ignoredVersions>(?i).+[-.](alpha|beta|cr|dev|m|rc)([-.]?\d+)?</ignoredVersions>
294+
</configuration>
295+
</plugin>
281296
<plugin>
282297
<groupId>org.jacoco</groupId>
283298
<artifactId>jacoco-maven-plugin</artifactId>
@@ -327,7 +342,7 @@
327342
<plugin>
328343
<groupId>org.cyclonedx</groupId>
329344
<artifactId>cyclonedx-maven-plugin</artifactId>
330-
<version>2.9.1</version>
345+
<version>${cyclonedx-maven-plugin.version}</version>
331346
<configuration>
332347
<projectType>library</projectType>
333348
</configuration>
@@ -352,7 +367,6 @@
352367
</build>
353368

354369
<profiles>
355-
356370
<!--
357371
~ Profile to run tests using JRE 8.
358372
~
@@ -366,7 +380,6 @@
366380
<exists>${user.home}/.m2/toolchains.xml</exists>
367381
</file>
368382
</activation>
369-
370383
<build>
371384
<plugins>
372385
<plugin>
@@ -386,7 +399,6 @@
386399
</plugins>
387400
</build>
388401
</profile>
389-
390402
<profile>
391403
<id>release</id>
392404
<activation>
@@ -415,7 +427,6 @@
415427
<plugin>
416428
<groupId>org.apache.maven.plugins</groupId>
417429
<artifactId>maven-gpg-plugin</artifactId>
418-
<version>3.2.7</version>
419430
<executions>
420431
<execution>
421432
<id>sign-artifacts</id>
@@ -430,5 +441,4 @@
430441
</build>
431442
</profile>
432443
</profiles>
433-
434444
</project>

src/test/java/com/github/packageurl/PackageURLTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ void validPercentEncoding() throws MalformedPackageURLException {
8383
@SuppressWarnings("deprecation")
8484
@Test
8585
void invalidPercentEncoding() throws MalformedPackageURLException {
86-
assertThrows(MalformedPackageURLException.class, () -> new PackageURL("pkg:maven/com.google.summit/summit-ast@2.2.0%"));
87-
assertThrows(MalformedPackageURLException.class, () -> new PackageURL("pkg:maven/com.google.summit/summit-ast@2.2.0%0"));
86+
assertThrowsExactly(MalformedPackageURLException.class, () -> new PackageURL("pkg:maven/com.google.summit/summit-ast@2.2.0%"));
87+
assertThrowsExactly(MalformedPackageURLException.class, () -> new PackageURL("pkg:maven/com.google.summit/summit-ast@2.2.0%0"));
8888
PackageURL purl = new PackageURL("pkg:maven/com.google.summit/summit-ast@2.2.0");
89-
Throwable t1 = assertThrows(ValidationException.class, () -> purl.uriDecode("%"));
89+
Throwable t1 = assertThrowsExactly(ValidationException.class, () -> purl.uriDecode("%"));
9090
assertEquals("Incomplete percent encoding at offset 0 with value '%'", t1.getMessage());
91-
Throwable t2 = assertThrows(ValidationException.class, () -> purl.uriDecode("a%0"));
91+
Throwable t2 = assertThrowsExactly(ValidationException.class, () -> purl.uriDecode("a%0"));
9292
assertEquals("Incomplete percent encoding at offset 1 with value '%0'", t2.getMessage());
93-
Throwable t3 = assertThrows(ValidationException.class, () -> purl.uriDecode("aaaa%%0A"));
93+
Throwable t3 = assertThrowsExactly(ValidationException.class, () -> purl.uriDecode("aaaa%%0A"));
9494
assertEquals("Invalid percent encoding char 1 at offset 5 with value '%'", t3.getMessage());
95-
Throwable t4 = assertThrows(ValidationException.class, () -> purl.uriDecode("%0G"));
95+
Throwable t4 = assertThrowsExactly(ValidationException.class, () -> purl.uriDecode("%0G"));
9696
assertEquals("Invalid percent encoding char 2 at offset 2 with value 'G'", t4.getMessage());
9797
}
9898

0 commit comments

Comments
 (0)