Skip to content

Commit d5477a8

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 d5477a8

File tree

2 files changed

+40
-27
lines changed

2 files changed

+40
-27
lines changed

pom.xml

Lines changed: 34 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>
@@ -58,23 +57,31 @@
5857
<!-- Maven Plugin Versions -->
5958
<maven.clean.plugin.version>3.4.1</maven.clean.plugin.version>
6059
<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>
60+
<maven.deploy.plugin.version>3.1.4</maven.deploy.plugin.version>
61+
<maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>
6362
<maven.install.plugin.version>3.1.4</maven.install.plugin.version>
6463
<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>
64+
<maven.javadoc.plugin.version>3.11.2</maven.javadoc.plugin.version>
65+
<maven.release.plugin.version>3.1.1</maven.release.plugin.version>
66+
<maven.resources.plugin.version>3.3.1</maven.resources.plugin.version>
6867
<maven.site.plugin.version>3.21.0</maven.site.plugin.version>
69-
<maven.source.plugin.version>3.3.0</maven.source.plugin.version>
68+
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
7069
<maven.surefire.plugin.version>3.5.2</maven.surefire.plugin.version>
7170
<!-- Maven build plugins for quality checks -->
7271
<error.prone.core.version>2.36.0</error.prone.core.version>
7372
<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>
73+
<spotbugs.maven.plugin.version>4.9.2.0</spotbugs.maven.plugin.version>
74+
<com.github.spotbugs.version>4.9.2</com.github.spotbugs.version>
7675
<!-- Dependency versions -->
77-
<junit.version>5.12.0</junit.version>
76+
<cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>
77+
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
78+
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.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.0</junit-bom.version>
82+
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
83+
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
84+
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
7885
</properties>
7986

8087
<scm>
@@ -107,24 +114,22 @@
107114

108115
<dependencyManagement>
109116
<dependencies>
110-
111117
<!-- BOMs at the end, so they don't overwrite the dependencies above -->
112118
<dependency>
113119
<groupId>org.junit</groupId>
114120
<artifactId>junit-bom</artifactId>
115-
<version>${junit.version}</version>
121+
<version>${junit-bom.version}</version>
116122
<type>pom</type>
117123
<scope>import</scope>
118124
</dependency>
119-
120125
</dependencies>
121126
</dependencyManagement>
122127

123128
<dependencies>
124129
<dependency>
125130
<groupId>jakarta.validation</groupId>
126131
<artifactId>jakarta.validation-api</artifactId>
127-
<version>3.1.1</version>
132+
<version>${jakarta.validation-api.version}</version>
128133
<optional>true</optional>
129134
<scope>provided</scope>
130135
</dependency>
@@ -136,7 +141,7 @@
136141
<dependency>
137142
<groupId>org.json</groupId>
138143
<artifactId>json</artifactId>
139-
<version>20240303</version>
144+
<version>${json.version}</version>
140145
<scope>test</scope>
141146
</dependency>
142147
<dependency>
@@ -174,6 +179,11 @@
174179
<artifactId>maven-install-plugin</artifactId>
175180
<version>${maven.install.plugin.version}</version>
176181
</plugin>
182+
<plugin>
183+
<groupId>org.apache.maven.plugins</groupId>
184+
<artifactId>maven-gpg-plugin</artifactId>
185+
<version>${maven-gpg-plugin.version}</version>
186+
</plugin>
177187
<plugin>
178188
<groupId>org.apache.maven.plugins</groupId>
179189
<artifactId>maven-jar-plugin</artifactId>
@@ -278,6 +288,14 @@
278288
</dependency>
279289
</dependencies>
280290
</plugin>
291+
<plugin>
292+
<groupId>org.codehaus.mojo</groupId>
293+
<artifactId>versions-maven-plugin</artifactId>
294+
<version>${versions-maven-plugin.version}</version>
295+
<configuration>
296+
<ignoredVersions>(?i).+[-.](alpha|beta|cr|dev|m|rc)([-.]?\d+)?</ignoredVersions>
297+
</configuration>
298+
</plugin>
281299
<plugin>
282300
<groupId>org.jacoco</groupId>
283301
<artifactId>jacoco-maven-plugin</artifactId>
@@ -327,7 +345,7 @@
327345
<plugin>
328346
<groupId>org.cyclonedx</groupId>
329347
<artifactId>cyclonedx-maven-plugin</artifactId>
330-
<version>2.9.1</version>
348+
<version>${cyclonedx-maven-plugin.version}</version>
331349
<configuration>
332350
<projectType>library</projectType>
333351
</configuration>
@@ -352,7 +370,6 @@
352370
</build>
353371

354372
<profiles>
355-
356373
<!--
357374
~ Profile to run tests using JRE 8.
358375
~
@@ -366,7 +383,6 @@
366383
<exists>${user.home}/.m2/toolchains.xml</exists>
367384
</file>
368385
</activation>
369-
370386
<build>
371387
<plugins>
372388
<plugin>
@@ -386,7 +402,6 @@
386402
</plugins>
387403
</build>
388404
</profile>
389-
390405
<profile>
391406
<id>release</id>
392407
<activation>
@@ -415,7 +430,6 @@
415430
<plugin>
416431
<groupId>org.apache.maven.plugins</groupId>
417432
<artifactId>maven-gpg-plugin</artifactId>
418-
<version>3.2.7</version>
419433
<executions>
420434
<execution>
421435
<id>sign-artifacts</id>
@@ -430,5 +444,4 @@
430444
</build>
431445
</profile>
432446
</profiles>
433-
434447
</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)