Skip to content

Commit 2f1baa2

Browse files
committed
Upgraded to Spring Boot 3 and java 21
1 parent 00d4145 commit 2f1baa2

29 files changed

+203
-318
lines changed

.bettercodehub.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/maven.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,8 @@ on:
1010
branches: [ master ]
1111

1212
jobs:
13-
build:
14-
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Repository checkout
19-
uses: actions/checkout@v2
20-
- name: Cache local Maven repository
21-
uses: actions/cache@v2
22-
with:
23-
path: ~/.m2/repository
24-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25-
restore-keys: ${{ runner.os }}-maven-
26-
- name: Set up JDK 11
27-
uses: actions/setup-java@v1
28-
with:
29-
java-version: 11
30-
- name: OWASP dependency checks
31-
run: mvn dependency-check:check
32-
- name: Build with Maven
33-
run: mvn clean verify
34-
- name: Code coverage with Codecov
35-
uses: codecov/codecov-action@v1
36-
13+
call-workflow:
14+
uses: 42BV/42-github-workflows/.github/workflows/maven-test.yml@main
15+
with:
16+
java-version: 21
17+
secrets: inherit

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish package to the Maven Central Repository
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-version:
7+
required: false
8+
description: Release-version (not required)
9+
next-version:
10+
required: false
11+
description: Next development-version. (not required)
12+
java-version:
13+
required: true
14+
default: '21'
15+
description: Java-version to use for the deployment.
16+
17+
jobs:
18+
call-workflow:
19+
uses: 42BV/42-github-workflows/.github/workflows/maven-release.yml@main
20+
secrets: inherit
21+
with:
22+
release-version: ${{ github.event.inputs.release-version }}
23+
next-version: ${{ github.event.inputs.next-version }}
24+
java-version: ${{ github.event.inputs.java-version }}

.gitignore

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,27 @@
11
target/
22
/.DS_Store
33
!.mvn/wrapper/maven-wrapper.jar
4-
5-
### STS ###
64
/.apt_generated
75
/.classpath
86
/.factorypath
97
/.project
108
/.settings
119
/.springBeans
1210
/bin
13-
14-
### IntelliJ IDEA ###
1511
/.idea
1612
/*.iws
1713
/*.iml
1814
/*.ipr
19-
20-
### NetBeans ###
2115
/nbproject/private/
2216
/build/
2317
/nbbuild/
2418
/dist/
2519
/nbdist/
2620
/.nb-gradle/
27-
28-
### Docker Postgres Logs ###
2921
/docker-std-err.log
3022
/docker-std-out.log
31-
32-
### JVM error logs ###
3323
/hs_err_*.log
34-
3524
/.ideaDataSources/
3625
/dataSources/
37-
38-
26+
.java-version
27+
pom.xml.versionsBackup

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [3.0.0] - 2025-12-04
8+
9+
- Upgraded to Java 21 and Spring Boot 4
10+
711
## [2.0.0] - 2019-08-29
812

913
- Upgraded to Java 11

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
[![Build Status](https://github.com/42BV/heph/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/42BV/heph/actions?query=workflow%3A%22Java+CI+with+Maven%22)
2-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f08863da179d410c977bbf3e143b0b1a)](https://www.codacy.com/gh/42BV/heph/dashboard?utm_source=github.com&utm_medium=referral&utm_content=42BV/heph&utm_campaign=Badge_Grade)
3-
[![BCH compliance](https://bettercodehub.com/edge/badge/42BV/heph?branch=master)](https://bettercodehub.com/)
4-
[![codecov](https://codecov.io/gh/42BV/heph/branch/master/graph/badge.svg)](https://codecov.io/gh/42BV/heph)
5-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/nl.42/heph/badge.svg)](https://maven-badges.herokuapp.com/maven-central/nl.42/heph)
6-
[![Javadocs](http://javadoc.io/badge/nl.42/heph.svg)](http://javadoc.io/doc/nl.42/heph)
1+
[![Java CI with Maven](https://github.com/42BV/heph/actions/workflows/maven.yml/badge.svg)](https://github.com/42BV/heph/actions/workflows/maven.yml)
2+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f08863da179d410c977bbf3e143b0b1a)](https://app.codacy.com/gh/42BV/heph/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
3+
[![codecov](https://codecov.io/gh/42BV/heph/graph/badge.svg?token=VMj23kHCls)](https://codecov.io/gh/42BV/heph)
4+
[![Maven Central](https://img.shields.io/maven-central/v/nl.42/heph.svg?color=green)](https://central.sonatype.com/artifact/nl.42/heph)
5+
[![Javadocs](https://www.javadoc.io/badge2/nl.42/heph/javadoc.svg)](https://www.javadoc.io/doc/nl.42/heph)
76
[![Apache 2](http://img.shields.io/badge/license-Apache%202-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
87

98
# Heph
@@ -18,7 +17,7 @@ In order to use Heph to power your testsuite, simply add the following Maven dep
1817
<dependency>
1918
<groupId>nl.42</groupId>
2019
<artifactId>heph</artifactId>
21-
<version>2.0.1</version>
20+
<version>3.0.0</version>
2221
</dependency>
2322
```
2423

pom.xml

Lines changed: 37 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,19 @@
4040
<properties>
4141
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4242
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
43-
<maven.compiler.source>11</maven.compiler.source>
44-
<maven.compiler.target>11</maven.compiler.target>
43+
<maven.compiler.release>21</maven.compiler.release>
4544

46-
<!-- Dependencies -->
47-
<beanmapper.version>3.1.0</beanmapper.version>
48-
<database.truncator.version>1.0.0</database.truncator.version>
49-
<spring-boot.version>2.4.1</spring-boot.version>
50-
</properties>
45+
<spring-boot.version>3.5.8</spring-boot.version>
46+
<beanmapper.version>6.0.0</beanmapper.version>
47+
<database.truncator.version>2.0.0</database.truncator.version>
5148

52-
<distributionManagement>
53-
<snapshotRepository>
54-
<id>ossrh</id>
55-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
56-
</snapshotRepository>
57-
<repository>
58-
<id>ossrh</id>
59-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
60-
</repository>
61-
</distributionManagement>
49+
<dependency-check-maven.version>12.1.9</dependency-check-maven.version>
50+
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
51+
<central-publishing-maven-plugin.version>0.9.0</central-publishing-maven-plugin.version>
52+
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
53+
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
54+
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
55+
</properties>
6256

6357
<dependencyManagement>
6458
<dependencies>
@@ -85,17 +79,6 @@
8579
<optional>true</optional>
8680
</dependency>
8781

88-
<dependency>
89-
<groupId>org.junit.vintage</groupId>
90-
<artifactId>junit-vintage-engine</artifactId>
91-
<scope>test</scope>
92-
<exclusions>
93-
<exclusion>
94-
<groupId>org.hamcrest</groupId>
95-
<artifactId>hamcrest-core</artifactId>
96-
</exclusion>
97-
</exclusions>
98-
</dependency>
9982
<dependency>
10083
<groupId>org.springframework.boot</groupId>
10184
<artifactId>spring-boot-starter-test</artifactId>
@@ -115,36 +98,24 @@
11598
</dependencies>
11699

117100
<build>
118-
<pluginManagement>
119-
<plugins>
120-
<plugin>
121-
<groupId>org.apache.maven.plugins</groupId>
122-
<artifactId>maven-compiler-plugin</artifactId>
123-
<version>3.8.1</version>
124-
</plugin>
125-
<plugin>
126-
<groupId>org.apache.maven.plugins</groupId>
127-
<artifactId>maven-surefire-plugin</artifactId>
128-
<version>2.22.2</version>
129-
</plugin>
130-
<plugin>
131-
<groupId>org.apache.maven.plugins</groupId>
132-
<artifactId>maven-release-plugin</artifactId>
133-
<version>2.5.3</version>
134-
<configuration>
135-
<mavenExecutorId>forked-path</mavenExecutorId>
136-
<useReleaseProfile>false</useReleaseProfile>
137-
<releaseProfiles>release</releaseProfiles>
138-
<goals>deploy</goals>
139-
</configuration>
140-
</plugin>
141-
</plugins>
142-
</pluginManagement>
143101
<plugins>
102+
<plugin>
103+
<groupId>org.owasp</groupId>
104+
<artifactId>dependency-check-maven</artifactId>
105+
<version>${dependency-check-maven.version}</version>
106+
<configuration>
107+
<failBuildOnCVSS>0</failBuildOnCVSS>
108+
<skipProvidedScope>true</skipProvidedScope>
109+
<skipTestScope>true</skipTestScope>
110+
<skipRuntimeScope>true</skipRuntimeScope>
111+
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
112+
<suppressionFile>owasp-suppressions.xml</suppressionFile>
113+
</configuration>
114+
</plugin>
144115
<plugin>
145116
<groupId>org.jacoco</groupId>
146117
<artifactId>jacoco-maven-plugin</artifactId>
147-
<version>0.8.6</version>
118+
<version>${jacoco-maven-plugin.version}</version>
148119
<executions>
149120
<execution>
150121
<goals>
@@ -160,19 +131,6 @@
160131
</execution>
161132
</executions>
162133
</plugin>
163-
<plugin>
164-
<groupId>org.owasp</groupId>
165-
<artifactId>dependency-check-maven</artifactId>
166-
<version>6.0.5</version>
167-
<configuration>
168-
<failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
169-
<skipProvidedScope>true</skipProvidedScope>
170-
<skipTestScope>true</skipTestScope>
171-
<skipRuntimeScope>true</skipRuntimeScope>
172-
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
173-
<suppressionFile>owasp-suppressions.xml</suppressionFile>
174-
</configuration>
175-
</plugin>
176134
</plugins>
177135
</build>
178136

@@ -184,10 +142,7 @@
184142
<plugin>
185143
<groupId>org.apache.maven.plugins</groupId>
186144
<artifactId>maven-javadoc-plugin</artifactId>
187-
<version>3.2.0</version>
188-
<configuration>
189-
<source>${maven.compiler.source}</source>
190-
</configuration>
145+
<version>${maven-javadoc-plugin.version}</version>
191146
<executions>
192147
<execution>
193148
<id>attach-javadocs</id>
@@ -200,7 +155,7 @@
200155
<plugin>
201156
<groupId>org.apache.maven.plugins</groupId>
202157
<artifactId>maven-source-plugin</artifactId>
203-
<version>3.2.1</version>
158+
<version>${maven-source-plugin.version}</version>
204159
<executions>
205160
<execution>
206161
<id>attach-sources</id>
@@ -213,7 +168,7 @@
213168
<plugin>
214169
<groupId>org.apache.maven.plugins</groupId>
215170
<artifactId>maven-gpg-plugin</artifactId>
216-
<version>1.6</version>
171+
<version>${maven-gpg-plugin.version}</version>
217172
<executions>
218173
<execution>
219174
<id>sign-artifacts</id>
@@ -224,6 +179,15 @@
224179
</execution>
225180
</executions>
226181
</plugin>
182+
<plugin>
183+
<groupId>org.sonatype.central</groupId>
184+
<artifactId>central-publishing-maven-plugin</artifactId>
185+
<version>${central-publishing-maven-plugin.version}</version>
186+
<extensions>true</extensions>
187+
<configuration>
188+
<publishingServerId>central</publishingServerId>
189+
</configuration>
190+
</plugin>
227191
</plugins>
228192
</build>
229193
</profile>

sonatype-release-doc.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
# Release to Maven Central
22

3-
1. Create a [ticket with Sonatype](http://central.sonatype.org/pages/ossrh-guide.html)
4-
(This has to be done by our maintenance department once per project).
5-
6-
2. Install a [gpg client](http://central.sonatype.org/pages/apache-maven.html#other-prerequisites) to sign the deployment artifacts
7-
(This step has obviously to be done once per client).
8-
9-
3. Prepare the release:
10-
`$ mvn release:prepare`
11-
12-
4. Perform the release:
13-
`$ mvn release:perform`
14-
15-
5. Verify the release on Maven central:
16-
- Navigate to [oss.sonatype.org](https://oss.sonatype.org/)
17-
- Log in
18-
- Go to 'Staging Repositories'
19-
- Search on '42'
20-
- Select the artifact
21-
- Press 'close'
22-
- Wait for closing to finish
23-
- Press 'release'
3+
1. Run the github action "Publish package to the Maven Central Repository"
4+
2. Wait for the release to complete
5+
3. Go to https://central.sonatype.com/publishing and publish the artifact
6+
(sonatype credentials in tpm)

src/test/java/nl/_42/heph/AbstractBuilderTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package nl._42.heph;
22

3-
import static org.junit.Assert.assertEquals;
4-
import static org.junit.Assert.assertNotNull;
5-
import static org.junit.Assert.assertNull;
6-
import static org.junit.Assert.fail;
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import static org.junit.jupiter.api.Assertions.assertNotNull;
5+
import static org.junit.jupiter.api.Assertions.assertNull;
6+
import static org.junit.jupiter.api.Assertions.fail;
77

88
import java.lang.reflect.InvocationHandler;
99
import java.lang.reflect.Method;
@@ -23,7 +23,7 @@
2323
import nl._42.heph.domain.Person;
2424
import nl._42.heph.shared.AbstractSpringTest;
2525

26-
import org.junit.Test;
26+
import org.junit.jupiter.api.Test;
2727
import org.springframework.beans.factory.annotation.Autowired;
2828
import org.springframework.context.ApplicationContext;
2929
import org.springframework.util.ReflectionUtils;

0 commit comments

Comments
 (0)