Skip to content

Commit e6ad49c

Browse files
committed
Migrate to Quarkus 3.30
1 parent ac75b05 commit e6ad49c

File tree

9 files changed

+38
-36
lines changed

9 files changed

+38
-36
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ indent_style = space
1212
indent_size = 4
1313
max_line_length = 120
1414

15-
[*.{scss,json,yml,conf,toml}]
15+
[*.{scss,json,yml,yaml,conf,toml}]
1616
indent_size = 2
1717

1818
[*.html]

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Set up JDK 11
15+
- name: Set up JDK 17
1616
uses: actions/setup-java@v3
1717
with:
18-
java-version: '11'
18+
java-version: '17'
1919
distribution: 'temurin'
2020
cache: 'maven'
2121
- name: Maven build

pom.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.frightanic</groupId>
55
<artifactId>open-data-smn</artifactId>
6-
<version>2.0.2-SNAPSHOT</version>
6+
<version>2.0.3-SNAPSHOT</version>
77

88
<name>OpenData SMN</name>
99
<description>An API to serve publicly available data from the SwissMetNet.</description>
@@ -52,25 +52,25 @@
5252

5353
<properties>
5454
<!-- dependencies -->
55-
<dokka.version>1.7.10</dokka.version>
56-
<jacoco.version>0.8.8</jacoco.version>
57-
<kotlin.version>1.7.10</kotlin.version>
58-
<microprofile-openapi-api.version>3.0</microprofile-openapi-api.version>
59-
<quarkus.version>2.12.1.Final</quarkus.version>
55+
<dokka.version>2.1.0</dokka.version>
56+
<jacoco.version>0.8.14</jacoco.version>
57+
<kotlin.version>2.2.21</kotlin.version>
58+
<quarkus.version>3.30.5</quarkus.version>
6059

6160
<!-- plugins -->
62-
<compiler-plugin.version>3.10.1</compiler-plugin.version>
61+
<compiler-plugin.version>3.12.1</compiler-plugin.version>
6362
<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
6463
<gpg-plugin.version>3.0.1</gpg-plugin.version>
65-
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
64+
<surefire-plugin.version>3.2.3</surefire-plugin.version>
6665

6766
<!-- Docker/Buildx -->
6867
<buildx.builder.name>maven</buildx.builder.name>
6968
<buildx.platforms>linux/amd64,linux/arm64</buildx.platforms>
7069
<docker.file>src/main/docker/Dockerfile.jvm</docker.file>
7170
<docker.image-name>marcelstoer/open-data-smn</docker.image-name>
7271

73-
<java.version>11</java.version>
72+
<java.version>17</java.version>
73+
<maven.compiler.release>${java.version}</maven.compiler.release>
7474
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7575
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
7676
<skipITs>true</skipITs>
@@ -116,11 +116,11 @@
116116
</dependency>
117117
<dependency>
118118
<groupId>io.quarkus</groupId>
119-
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
119+
<artifactId>quarkus-rest-jackson</artifactId>
120120
</dependency>
121121
<dependency>
122122
<groupId>io.quarkus</groupId>
123-
<artifactId>quarkus-resteasy-reactive</artifactId>
123+
<artifactId>quarkus-rest</artifactId>
124124
</dependency>
125125
<dependency>
126126
<groupId>io.quarkus</groupId>
@@ -129,7 +129,6 @@
129129
<dependency>
130130
<groupId>org.eclipse.microprofile.openapi</groupId>
131131
<artifactId>microprofile-openapi-api</artifactId>
132-
<version>${microprofile-openapi-api.version}</version>
133132
</dependency>
134133

135134
<!-- test -->
@@ -336,13 +335,13 @@
336335
</executions>
337336
</plugin>
338337
<plugin>
339-
<groupId>org.sonatype.plugins</groupId>
340-
<artifactId>nexus-staging-maven-plugin</artifactId>
338+
<groupId>org.sonatype.central</groupId>
339+
<artifactId>central-publishing-maven-plugin</artifactId>
341340
<extensions>true</extensions>
342341
<configuration>
343-
<serverId>ossrh</serverId>
344-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
345-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
342+
<publishingServerId>central</publishingServerId>
343+
<autoPublish>true</autoPublish>
344+
<waitUntil>published</waitUntil>
346345
</configuration>
347346
</plugin>
348347
<plugin>
@@ -410,7 +409,8 @@
410409
</activation>
411410
<properties>
412411
<skipITs>false</skipITs>
413-
<quarkus.package.type>native</quarkus.package.type>
412+
<quarkus.native.enabled>true</quarkus.native.enabled>
413+
<quarkus.package.jar.enabled>false</quarkus.package.jar.enabled>
414414
</properties>
415415
</profile>
416416
</profiles>

src/main/kotlin/com/frightanic/smn/SmnResource.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import org.eclipse.microprofile.openapi.annotations.enums.SchemaType.STRING
1010
import org.eclipse.microprofile.openapi.annotations.media.Schema
1111
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter
1212
import org.eclipse.microprofile.openapi.annotations.tags.Tag
13-
import javax.enterprise.context.ApplicationScoped
14-
import javax.ws.rs.GET
15-
import javax.ws.rs.Path
16-
import javax.ws.rs.PathParam
17-
import javax.ws.rs.Produces
18-
import javax.ws.rs.QueryParam
13+
import jakarta.enterprise.context.ApplicationScoped
14+
import jakarta.ws.rs.GET
15+
import jakarta.ws.rs.Path
16+
import jakarta.ws.rs.PathParam
17+
import jakarta.ws.rs.Produces
18+
import jakarta.ws.rs.QueryParam
1919

2020
private const val cacheName = "http"
2121

src/main/kotlin/com/frightanic/smn/StationMap.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ object StationMap {
172172
MAP["REH"] = Station("REH", "Zürich / Affoltern", 681432, 253548, 47.433333, 8.516667, 443)
173173
MAP["SMA"] = Station("SMA", "Zürich / Fluntern", 685116, 248065, 47.383333, 8.566667, 555)
174174
MAP["KLO"] = Station("KLO", "Zürich / Kloten", 682710, 259338, 47.483333, 8.533333, 426)
175+
MAP["PFA"] = Station("PFA", "Pfäffikon, ZH", 1248165, 2699401, 47.376817, 8.754864, 537)
175176
}
176177

177178
/**

src/main/kotlin/com/frightanic/smn/core/GeoAdmin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory
88
import java.net.http.HttpClient
99
import java.net.http.HttpRequest
1010
import java.net.http.HttpResponse
11-
import javax.enterprise.context.ApplicationScoped
11+
import jakarta.enterprise.context.ApplicationScoped
1212

1313

1414
@ApplicationScoped

src/main/kotlin/com/frightanic/smn/util/ObjectMapperCustomizer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import io.quarkus.jackson.ObjectMapperCustomizer
99
import io.quarkus.jackson.ObjectMapperCustomizer.MINIMUM_PRIORITY
1010
import java.time.OffsetDateTime
1111
import java.time.format.DateTimeFormatter
12-
import javax.inject.Singleton
12+
import jakarta.inject.Singleton
1313

1414
@Singleton
1515
class ObjectMapperCustomizer : ObjectMapperCustomizer {

src/main/resources/application.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ quarkus:
33
name: open-data-smn
44
cache:
55
caffeine:
6-
'"smn"':
6+
smn:
77
expire-after-write: 5M
8-
'"http"':
8+
http:
99
expire-after-write: 1M
1010
http:
1111
port: 8080
12-
cors: true
13-
cors.origins: "*"
14-
cors.methods: "GET"
12+
cors:
13+
origins: "*"
14+
methods: "GET"
15+
enabled: true
1516
header:
16-
'"Cache-Control"':
17+
Cache-Control:
1718
value: "max-age=300"
1819
swagger-ui:
1920
always-include: true

src/test/kotlin/com/frightanic/smn/SmnResourceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import io.restassured.RestAssured.given
55
import org.hamcrest.CoreMatchers.containsString
66
import org.junit.jupiter.api.Nested
77
import org.junit.jupiter.api.Test
8-
import javax.ws.rs.core.HttpHeaders.CACHE_CONTROL
8+
import jakarta.ws.rs.core.HttpHeaders.CACHE_CONTROL
99

1010
@QuarkusTest
1111
internal class SmnResourceTest {

0 commit comments

Comments
 (0)