Skip to content

Commit 4e2d3b7

Browse files
committed
Updated dependencies to align with Spring Boot 3.2.5
1 parent eec30fe commit 4e2d3b7

File tree

11 files changed

+64
-38
lines changed

11 files changed

+64
-38
lines changed

.github/maven-settings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
</activation>
2424
<properties>
2525
<gpg.executable>gpg</gpg.executable>
26-
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
2726
</properties>
2827
</profile>
2928
</profiles>

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
persist-credentials: false
1414

1515
- name: Cache local Maven repository
16-
uses: actions/cache@v3
16+
uses: actions/cache@v4
1717
with:
1818
path: ~/.m2/repository
1919
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -68,7 +68,7 @@ jobs:
6868
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
6969
GIT_HUB_USERNAME: ${{ secrets.GIT_HUB_USERNAME }}
7070
GIT_HUB_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
71-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
71+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
7272

7373
- name: Create GitHub release
7474
id: create_release

.github/workflows/owasp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
shell: bash
1717

1818
- name: Restore cached Maven dependencies
19-
uses: actions/cache/restore@v3
19+
uses: actions/cache/restore@v4
2020
with:
2121
path: ~/.m2/repository
2222
# Using datetime in cache key as OWASP database may change, without the pom changing
@@ -36,7 +36,7 @@ jobs:
3636

3737
# Want the Maven dependencies to be cached even if the build fails as we want the OWASP database cached, regardless of whether vulnerabilities are found or not
3838
- name: Cache Maven dependencies
39-
uses: actions/cache/save@v3
39+
uses: actions/cache/save@v4
4040
if: always()
4141
with:
4242
path: ~/.m2/repository

config/pmd/rulesets/spt-default-rules.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
<rule ref="category/java/bestpractices.xml/DoubleBraceInitialization" />
2020
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach" />
2121
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons" />
22-
<rule ref="category/java/bestpractices.xml/LooseCoupling" />
22+
<rule ref="category/java/bestpractices.xml/LooseCoupling">
23+
<properties>
24+
<property name="allowedTypes" value="org.springframework.core.annotation.AnnotationAttributes" />
25+
</properties>
26+
</rule>
2327
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray" />
2428
<rule ref="category/java/bestpractices.xml/MissingOverride" />
2529
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine" />
@@ -101,7 +105,7 @@
101105
<rule ref="category/java/design.xml/SwitchDensity" />
102106
<rule ref="category/java/design.xml/UseUtilityClass">
103107
<properties>
104-
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration/preceding-sibling::Annotation/MarkerAnnotation/Name[@Image='SpringBootApplication']" />
108+
<property name="violationSuppressXPath" value=".[pmd-java:hasAnnotation('org.springframework.boot.autoconfigure.SpringBootApplication')]" />
105109
</properties>
106110
</rule>
107111
<rule ref="category/java/design.xml/UselessOverridingMethod" />

pom.xml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
<spt-cid.version>2.0.14</spt-cid.version>
3939

4040
<!-- Dependency versions, matched to Spring Boot -->
41-
<aspectj.version>1.9.21</aspectj.version>
41+
<aspectj.version>1.9.22</aspectj.version>
4242
<httpcore5.version>5.2.4</httpcore5.version>
43-
<slf4j.version>2.0.12</slf4j.version>
44-
<spring.version>6.1.5</spring.version>
43+
<slf4j.version>2.0.13</slf4j.version>
44+
<spring.version>6.1.6</spring.version>
4545

4646
<!-- Test dependency versions -->
47-
<spt-development-test.version>3.1.5</spt-development-test.version>
47+
<spt-development-test.version>3.1.6</spt-development-test.version>
4848

4949
<!-- Test dependency versions, matched to Spring Boot -->
5050
<hamcrest.version>2.2</hamcrest.version>
@@ -55,30 +55,31 @@
5555
<!-- Plugin versions -->
5656
<build-helper-maven-plugin.version>3.5.0</build-helper-maven-plugin.version>
5757
<checkstyle-maven-plugin.version>3.3.1</checkstyle-maven-plugin.version>
58-
<dependency-check-maven.version>9.0.10</dependency-check-maven.version>
59-
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
58+
<dependency-check-maven.version>9.1.0</dependency-check-maven.version>
59+
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
6060
<license-maven-plugin.version>2.4.0</license-maven-plugin.version>
6161
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
6262
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
6363
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
64-
<maven-gpg-plugin.version>3.2.1</maven-gpg-plugin.version>
64+
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
6565
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
6666
<maven-jxr-plugin.version>3.3.2</maven-jxr-plugin.version>
67-
<maven-pmd-plugin.version>3.21.2</maven-pmd-plugin.version>
67+
<maven-pmd-plugin.version>3.22.0</maven-pmd-plugin.version>
6868
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
69-
<maven-scm-plugin.version>2.0.1</maven-scm-plugin.version>
70-
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
69+
<maven-scm-plugin.version>2.1.0</maven-scm-plugin.version>
70+
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
7171
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
7272
<nexus-staging-plugin.version>1.6.13</nexus-staging-plugin.version>
73-
<pitest-maven.version>1.15.8</pitest-maven.version>
74-
<spotbugs.version>4.8.3.1</spotbugs.version>
73+
<pitest-maven.version>1.16.0</pitest-maven.version>
74+
<spotbugs.version>4.8.4.0</spotbugs.version>
7575
<versions-maven-plugin.version>2.16.2</versions-maven-plugin.version>
7676

7777
<!-- Plugin dependencies -->
78-
<checkstyle.version>10.14.2</checkstyle.version>
78+
<checkstyle.version>10.15.0</checkstyle.version>
7979
<findbugs-slf4j-bug-pattern.version>1.5.0</findbugs-slf4j-bug-pattern.version>
8080
<findbugs-sec-bug-pattern.version>1.12.0</findbugs-sec-bug-pattern.version>
8181
<pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>
82+
<pmd.version>7.1.0</pmd.version>
8283
</properties>
8384

8485
<dependencyManagement>
@@ -216,6 +217,28 @@
216217
<plugin>
217218
<artifactId>maven-pmd-plugin</artifactId>
218219
<version>${maven-pmd-plugin.version}</version>
220+
<dependencies>
221+
<dependency>
222+
<groupId>net.sourceforge.pmd</groupId>
223+
<artifactId>pmd-core</artifactId>
224+
<version>${pmd.version}</version>
225+
</dependency>
226+
<dependency>
227+
<groupId>net.sourceforge.pmd</groupId>
228+
<artifactId>pmd-java</artifactId>
229+
<version>${pmd.version}</version>
230+
</dependency>
231+
<dependency>
232+
<groupId>net.sourceforge.pmd</groupId>
233+
<artifactId>pmd-javascript</artifactId>
234+
<version>${pmd.version}</version>
235+
</dependency>
236+
<dependency>
237+
<groupId>net.sourceforge.pmd</groupId>
238+
<artifactId>pmd-jsp</artifactId>
239+
<version>${pmd.version}</version>
240+
</dependency>
241+
</dependencies>
219242
</plugin>
220243
<plugin>
221244
<artifactId>maven-source-plugin</artifactId>

src/test/java/com/spt/development/logging/spring/DaoSupportLoggerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import static org.mockito.Mockito.when;
2626

2727
class DaoSupportLoggerTest {
28-
private static class TestData {
28+
private static final class TestData {
2929
static final String CORRELATION_ID = "2f0c045f-7547-438c-8496-700126b4d1f8";
3030
static final String RESULT = "Success!";
3131
static final String METHOD = "test";
@@ -220,13 +220,13 @@ private DaoSupportLogger createLogger(boolean includeCorrelationIdInLogs) {
220220
return includeCorrelationIdInLogs ? new DaoSupportLogger() : new DaoSupportLogger(false);
221221
}
222222

223-
private static class TestTarget extends DaoSupportLogger {
223+
private static final class TestTarget extends DaoSupportLogger {
224224
public String test(String correlationId, @NoLogging String password) {
225225
return TestData.RESULT;
226226
}
227227
}
228228

229-
private static class TestTargetLoggedAtInfo extends DaoSupportLogger {
229+
private static final class TestTargetLoggedAtInfo extends DaoSupportLogger {
230230
public String test(String correlationId, @NoLogging String password) {
231231
return TestData.RESULT;
232232
}

src/test/java/com/spt/development/logging/spring/JmsListenerLoggerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static org.mockito.Mockito.when;
2121

2222
class JmsListenerLoggerTest {
23-
private static class TestData {
23+
private static final class TestData {
2424
static final String CORRELATION_ID = "f3867dd5-b137-4c05-8816-69fd262024b7";
2525
static final String RESULT = "Success!";
2626
static final String METHOD = "test";
@@ -109,7 +109,7 @@ private JmsListenerLogger createLogger(boolean includeCorrelationIdInLogs) {
109109
return includeCorrelationIdInLogs ? new JmsListenerLogger() : new JmsListenerLogger(false);
110110
}
111111

112-
private static class TestTarget {
112+
private static final class TestTarget {
113113
public String test(String correlationId, @NoLogging String password) {
114114
return TestData.RESULT;
115115
}

src/test/java/com/spt/development/logging/spring/LoggerUtilTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import static org.hamcrest.MatcherAssert.assertThat;
1414

1515
class LoggerUtilTest {
16-
private static class TestData {
16+
private static final class TestData {
1717
static final String TEST_CLASS = "Test Class";
1818
static final String SHORT_STRING = "Short String";
1919
static final String MEDIUM_STRING = "String with 75 characters--------------------------------------------------";
@@ -50,22 +50,22 @@ void formatArgs_argAnnotatedWithNoLogging_shouldNotBeLogged() {
5050
assertThat(result, is(MASKED_ARG + ", " + MASKED_ARG));
5151
}
5252

53-
private static class TestClass {
53+
private static final class TestClass {
5454
@Override
5555
public String toString() {
5656
return TestData.TEST_CLASS;
5757
}
5858
}
5959

60-
private static class ConcreteNoLogging implements NoLogging {
60+
private static final class ConcreteNoLogging implements NoLogging {
6161

6262
@Override
6363
public Class<? extends Annotation> annotationType() {
6464
return null;
6565
}
6666
}
6767

68-
private static class ConcreteAnnotation implements Annotation {
68+
private static final class ConcreteAnnotation implements Annotation {
6969

7070
@Override
7171
public Class<? extends Annotation> annotationType() {

src/test/java/com/spt/development/logging/spring/RepositoryLoggerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import static org.mockito.Mockito.when;
2626

2727
class RepositoryLoggerTest {
28-
private static class TestData {
28+
private static final class TestData {
2929
static final String CORRELATION_ID = "2f0c045f-7547-438c-8496-700126b4d1f8";
3030
static final String RESULT = "Success!";
3131
static final String METHOD = "test";
@@ -220,13 +220,13 @@ private RepositoryLogger createLogger(boolean includeCorrelationIdInLogs) {
220220
return includeCorrelationIdInLogs ? new RepositoryLogger() : new RepositoryLogger(false);
221221
}
222222

223-
private static class TestTarget {
223+
private static final class TestTarget {
224224
public String test(String correlationId, @NoLogging String password) {
225225
return TestData.RESULT;
226226
}
227227
}
228228

229-
private static class TestTargetLoggedAtInfo {
229+
private static final class TestTargetLoggedAtInfo {
230230
public String test(String correlationId, @NoLogging String password) {
231231
return TestData.RESULT;
232232
}

src/test/java/com/spt/development/logging/spring/RestControllerLoggerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import static org.mockito.Mockito.when;
2828

2929
class RestControllerLoggerTest {
30-
private static class TestData {
30+
private static final class TestData {
3131
static final String CORRELATION_ID = "52d676d9-81f3-4167-a078-09a1c2ed9a01";
3232
static final String RESULT = "Success!";
3333
static final String METHOD = "test";
@@ -494,17 +494,17 @@ private static RestControllerLogger createLogger(boolean includeCorrelationIdInL
494494
return includeCorrelationIdInLogs ? new RestControllerLogger() : new RestControllerLogger(false);
495495
}
496496

497-
private static class TestTarget {
497+
private static final class TestTarget {
498498
public String test(String correlationId, @NoLogging String password) {
499499
return TestData.RESULT;
500500
}
501501
}
502502

503503
@ResponseStatus(value = HttpStatus.CONFLICT, reason = "Email address already in use")
504-
private static class DuplicateUserException extends Exception {
504+
private static final class DuplicateUserException extends Exception {
505505
static final long serialVersionUID = 1L;
506506

507-
public DuplicateUserException(String message, Throwable cause) {
507+
DuplicateUserException(String message, Throwable cause) {
508508
super(message, cause);
509509
}
510510
}

0 commit comments

Comments
 (0)