-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use quarkus 1.12.0.Final cleanup poms newest pc parent * remove some test dependencies * remove build extras * remove imports * more fixes * update to 1.13.1.Final * new graalvm version * correctly customize object mapper * fix tests
- Loading branch information
Showing
14 changed files
with
75 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,43 +3,38 @@ | |
<parent> | ||
<groupId>com.pro-crafting</groupId> | ||
<artifactId>pc-parent</artifactId> | ||
<version>9</version> | ||
<version>10</version> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.pro-crafting.tools</groupId> | ||
<artifactId>record-jar-converter-web</artifactId> | ||
|
||
<version>1.6.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<version>1.7.0-SNAPSHOT</version> | ||
|
||
<scm> | ||
<connection>scm:git:[email protected]:pro-crafting/record-jar-converter.git</connection> | ||
<url>https://github.com/pro-crafting/record-jar-converter</url> | ||
<developerConnection>scm:git:[email protected]:pro-crafting/record-jar-converter.git</developerConnection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<properties> | ||
<!-- Settings --> | ||
<docker.name>postremus/${project.artifactId}:${project.version}</docker.name> | ||
<file.runner>${project.build.finalName}-runner.jar</file.runner> | ||
|
||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<docker.repository>postremus</docker.repository> | ||
<!-- Port is set during execution of build-helper-maven-plugin:reserve-network-port goal --> | ||
<it.baseuri>127.0.0.1</it.baseuri> | ||
<sonar.organization>pro-crafting</sonar.organization> | ||
<sonar.host.url>https://sonarcloud.io</sonar.host.url> | ||
|
||
<!-- Dependency Versions --> | ||
<version.quarkus>1.8.1.Final</version.quarkus> | ||
<version.quarkus>1.13.1.Final</version.quarkus> | ||
|
||
<!-- Plugin Versions --> | ||
<version.docker-maven-plugin>0.34.0</version.docker-maven-plugin> | ||
<version.maven-surefire-plugin>2.21.0</version.maven-surefire-plugin> | ||
<version.maven-failsafe-plugin>2.21.0</version.maven-failsafe-plugin> | ||
<version.sonar-maven-plugin>3.4.1.1168</version.sonar-maven-plugin> | ||
<version.maven-failsafe-plugin>3.0.0-M5</version.maven-failsafe-plugin> | ||
|
||
<!-- Test Dependency Versions --> | ||
<junit.jupiter.version>5.2.0</junit.jupiter.version> | ||
<junit.platform.version>1.2.0</junit.platform.version> | ||
<version.mockito-core>2.18.3</version.mockito-core> | ||
<version.rest-assured>3.1.0</version.rest-assured> | ||
</properties> | ||
|
||
|
@@ -54,7 +49,6 @@ | |
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<version>${version.docker-maven-plugin}</version> | ||
<executions> | ||
<execution> | ||
<id>push</id> | ||
|
@@ -65,22 +59,6 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${version.maven-surefire-plugin}</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit.platform</groupId> | ||
<artifactId>junit-platform-surefire-provider</artifactId> | ||
<version>${junit.platform.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonarsource.scanner.maven</groupId> | ||
<artifactId>sonar-maven-plugin</artifactId> | ||
<version>${version.sonar-maven-plugin}</version> | ||
</plugin> | ||
</plugins> | ||
|
||
</pluginManagement> | ||
|
@@ -101,17 +79,11 @@ | |
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${version.maven-failsafe-plugin}</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit.platform</groupId> | ||
<artifactId>junit-platform-surefire-provider</artifactId> | ||
<version>${junit.platform.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonarsource.scanner.maven</groupId> | ||
<artifactId>sonar-maven-plugin</artifactId> | ||
<version>${version.sonar-maven-plugin}</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
|
@@ -134,6 +106,31 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<images> | ||
<image> | ||
<name>${docker.repository}/record-jar-converter-web</name> | ||
<run> | ||
<containerNamePattern>%a-%t-%i</containerNamePattern> | ||
<ports> | ||
<port>${docker.published.port}:8080</port> | ||
</ports> | ||
</run> | ||
<build> | ||
<contextDir>${project.basedir}</contextDir> | ||
|
||
<tags> | ||
<tag>latest</tag> | ||
<tag>${project.version}</tag> | ||
</tags> | ||
</build> | ||
</image> | ||
</images> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
@@ -149,35 +146,6 @@ | |
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
|
||
<!-- Test dependencies --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<version>${junit.jupiter.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>${version.mockito-core}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-junit-jupiter</artifactId> | ||
<version>${version.mockito-core}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<version>${version.rest-assured}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
|
@@ -193,11 +161,11 @@ | |
<!-- Quarkus Extensions --> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-arc</artifactId> | ||
<artifactId>quarkus-resteasy-jackson</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy-jackson</artifactId> | ||
<groupId>io.quarkus </groupId> | ||
<artifactId>quarkus-resteasy-multipart</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
|
@@ -207,10 +175,6 @@ | |
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-smallrye-metrics</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus </groupId> | ||
<artifactId>quarkus-resteasy-multipart</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus </groupId> | ||
<artifactId>quarkus-smallrye-openapi</artifactId> | ||
|
@@ -219,23 +183,14 @@ | |
|
||
<!-- Test dependencies --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-junit-jupiter</artifactId> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<version>${version.rest-assured}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
|
@@ -251,38 +206,6 @@ | |
</dependencies> | ||
|
||
<profiles> | ||
<profile> | ||
<id>docker</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<images> | ||
<image> | ||
<name>${docker.repository}/record-jar-converter-web</name> | ||
<run> | ||
<containerNamePattern>%a-%t-%i</containerNamePattern> | ||
<ports> | ||
<port>${docker.published.port}:8080</port> | ||
</ports> | ||
</run> | ||
<build> | ||
<contextDir>${project.basedir}</contextDir> | ||
|
||
<tags> | ||
<tag>latest</tag> | ||
<tag>${project.version}</tag> | ||
</tags> | ||
</build> | ||
</image> | ||
</images> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>docker-it</id> | ||
<build> | ||
|
@@ -361,11 +284,4 @@ | |
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
<scm> | ||
<connection>scm:git:[email protected]:pro-crafting/record-jar-converter.git</connection> | ||
<url>https://github.com/pro-crafting/record-jar-converter</url> | ||
<developerConnection>scm:git:[email protected]:pro-crafting/record-jar-converter.git</developerConnection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
</project> |
42 changes: 8 additions & 34 deletions
42
...a/com/pro_crafting/tools/recordjarconverter/representation/json/ObjectMapperProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,22 @@ | ||
package com.pro_crafting.tools.recordjarconverter.representation.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.databind.Module; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.databind.SerializationConfig; | ||
import com.fasterxml.jackson.databind.SerializerProvider; | ||
import com.fasterxml.jackson.databind.module.SimpleModule; | ||
import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider; | ||
import com.fasterxml.jackson.databind.ser.SerializerFactory; | ||
import com.google.common.collect.Multimap; | ||
import com.pro_crafting.tools.recordjarconverter.representation.json.module.RecordModule; | ||
import io.quarkus.jackson.ObjectMapperCustomizer; | ||
|
||
import javax.ws.rs.Consumes; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.ext.ContextResolver; | ||
import javax.ws.rs.ext.Provider; | ||
import javax.enterprise.context.ApplicationScoped; | ||
|
||
@Provider | ||
@Consumes(MediaType.WILDCARD) | ||
@Produces(MediaType.WILDCARD) | ||
public class ObjectMapperProvider implements ContextResolver<ObjectMapper> { | ||
@ApplicationScoped | ||
public class ObjectMapperProvider implements ObjectMapperCustomizer { | ||
|
||
private static ObjectMapper mapper; | ||
|
||
static { | ||
mapper = new ObjectMapper(); | ||
mapper.findAndRegisterModules(); | ||
mapper.registerModule(new RecordModule()); | ||
mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); | ||
@Override | ||
public void customize(ObjectMapper objectMapper) { | ||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); | ||
|
||
// Custom serializers | ||
SimpleModule serializerModule = new SimpleModule(); | ||
serializerModule.addSerializer(new MultimapSerializer()); | ||
|
||
mapper.registerModule(serializerModule); | ||
} | ||
|
||
public static ObjectMapper getMapper() { | ||
return mapper; | ||
} | ||
|
||
@Override | ||
public ObjectMapper getContext(Class<?> type) { | ||
return mapper; | ||
objectMapper.registerModule(serializerModule); | ||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
...java/com/pro_crafting/tools/recordjarconverter/representation/json/mixin/RecordMixin.java
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
...va/com/pro_crafting/tools/recordjarconverter/representation/json/module/RecordModule.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.