Skip to content

[4.x] Upgrade Java libraries, fix maven plugins, remove deprecated code, fix release CI #564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ name: sdk-java Verify
on:
push:
branches:
- 4.0.*
- 4.*
pull_request:
branches:
- 4.0.*
- 4.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: pre release

steps:
- uses: radcortez/project-metadata-action@master
- uses: radcortez/project-metadata-action@main
name: retrieve project metadata
id: metadata
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
release:
runs-on: ubuntu-latest
name: release
if: ${{github.event.pull_request.merged == true}}
if: ${{ github.event.pull_request.merged == true }}

steps:
- uses: radcortez/project-metadata-action@main
Expand All @@ -20,7 +20,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Import GPG key
id: import_gpg
Expand All @@ -30,7 +30,7 @@ jobs:
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
Expand All @@ -51,10 +51,10 @@ jobs:
cat release.properties
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
mvn -B release:perform -Prelease -Darguments="-DperformRelease"
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

- name: Push tags
run: git push && git push --tags
run: git push && git push --tags
20 changes: 0 additions & 20 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,26 +140,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<verbose>false</verbose>
<filesNamePattern>.*\.java</filesNamePattern>
<skip>false</skip>
<skipSortingImports>false</skipSortingImports>
<style>google</style>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
20 changes: 0 additions & 20 deletions diagram/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,26 +127,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<verbose>false</verbose>
<filesNamePattern>.*\.java</filesNamePattern>
<skip>false</skip>
<skipSortingImports>false</skipSortingImports>
<style>google</style>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
76 changes: 51 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,42 @@
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.maven>3.6.2</version.maven>
<version.maven>3.9.7</version.maven>

<!-- Plugin versions, please keep in alphabetical order -->
<version.buildnumber.plugin>3.2.0</version.buildnumber.plugin>
<version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
<version.compiler.plugin>3.8.1</version.compiler.plugin>
<version.deploy.plugin>2.8.2</version.deploy.plugin>
<version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
<version.failsafe.plugin>3.1.2</version.failsafe.plugin>
<version.fmt-maven-plugin>2.9.1</version.fmt-maven-plugin>
<version.gpg.plugin>3.1.0</version.gpg.plugin>
<version.jar.plugin>3.2.0</version.jar.plugin>
<version.buildnumber.plugin>3.2.1</version.buildnumber.plugin>
<version.checkstyle.plugin>3.6.0</version.checkstyle.plugin>
<version.compiler.plugin>3.14.0</version.compiler.plugin>
<version.deploy.plugin>3.1.4</version.deploy.plugin>
<version.enforcer.plugin>3.5.0</version.enforcer.plugin>
<version.failsafe.plugin>3.5.3</version.failsafe.plugin>
<version.fmt-maven-plugin>2.25</version.fmt-maven-plugin>
<version.gpg.plugin>3.2.7</version.gpg.plugin>
<version.jar.plugin>3.4.2</version.jar.plugin>
<version.jdk>${java.version}</version.jdk>
<version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
<version.javadoc.plugin>3.6.0</version.javadoc.plugin>
<version.release.plugin>3.0.1</version.release.plugin>
<version.source.plugin>3.3.0</version.source.plugin>
<version.surefire.plugin>2.22.0</version.surefire.plugin>
<version.jsonschema2pojo-maven-plugin>1.2.2</version.jsonschema2pojo-maven-plugin>
<version.javadoc.plugin>3.11.2</version.javadoc.plugin>
<version.release.plugin>3.1.1</version.release.plugin>
<version.source.plugin>3.3.1</version.source.plugin>
<version.surefire.plugin>3.5.3</version.surefire.plugin>
<version.nexus.plugin>1.7.0</version.nexus.plugin>


<!-- Dependencies versions, please keep in alphabetical order -->
<version.ch.qos.logback>1.4.9</version.ch.qos.logback>
<version.com.fasterxml.jackson>2.15.3</version.com.fasterxml.jackson>
<version.com.networknt>1.0.87</version.com.networknt>
<version.ch.qos.logback>1.2.11</version.ch.qos.logback>
<version.com.fasterxml.jackson>2.18.3</version.com.fasterxml.jackson>
<version.com.networknt>1.5.6</version.com.networknt>
<version.commons.lang>3.13.0</version.commons.lang>
<version.graphviz>0.17.0</version.graphviz>
<version.hamcrest>1.3</version.hamcrest>
<version.javax.validation>2.0.1.Final</version.javax.validation>
<version.jsonassert>1.5.0</version.jsonassert>
<version.org.assertj>3.13.2</version.org.assertj>
<version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
<version.org.junit.minor>6.0</version.org.junit.minor>
<version.org.junit>5.${version.org.junit.minor}</version.org.junit>
<version.org.mockito>5.6.0</version.org.mockito>
<version.org.slf4j>1.7.25</version.org.slf4j>
<version.org.junit.jupiter>5.12.2</version.org.junit.jupiter>
<version.org.mockito>5.17.0</version.org.mockito>
<version.org.slf4j>2.0.17</version.org.slf4j>
<version.plantuml>8059</version.plantuml>
<version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>

Expand Down Expand Up @@ -271,6 +271,17 @@

<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${version.nexus.plugin}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down Expand Up @@ -383,9 +394,24 @@
<version>${version.checkstyle.plugin}</version>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>${version.fmt-maven-plugin}</version>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<verbose>false</verbose>
<filesNamePattern>.*\.java</filesNamePattern>
<skip>false</skip>
<skipSortingImports>false</skipSortingImports>
<style>google</style>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
20 changes: 0 additions & 20 deletions spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,26 +99,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<verbose>false</verbose>
<filesNamePattern>.*\.java</filesNamePattern>
<skip>false</skip>
<skipSortingImports>false</skipSortingImports>
<style>google</style>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
20 changes: 0 additions & 20 deletions utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,26 +99,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<verbose>false</verbose>
<filesNamePattern>.*\.java</filesNamePattern>
<skip>false</skip>
<skipSortingImports>false</skipSortingImports>
<style>google</style>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public static JsonNode mergeNodes(JsonNode mainNode, JsonNode updateNode) {
if (mainNode instanceof ObjectNode) {
// Overwrite field
JsonNode value = updateNode.get(fieldName);
((ObjectNode) mainNode).put(fieldName, value);
((ObjectNode) mainNode).set(fieldName, value);
}
}
}
Expand All @@ -591,7 +591,7 @@ public static JsonNode mergeNodes(JsonNode mainNode, JsonNode updateNode) {
* @return original, main node with field added
*/
public static JsonNode addNode(JsonNode mainNode, JsonNode toAddNode, String fieldName) {
((ObjectNode) mainNode).put(fieldName, toAddNode);
((ObjectNode) mainNode).set(fieldName, toAddNode);
return mainNode;
}

Expand All @@ -604,7 +604,7 @@ public static JsonNode addNode(JsonNode mainNode, JsonNode toAddNode, String fie
* @return original, main node with array added
*/
public static JsonNode addArray(JsonNode mainNode, ArrayNode toAddArray, String arrayName) {
((ObjectNode) mainNode).put(arrayName, toAddArray);
((ObjectNode) mainNode).set(arrayName, toAddArray);
return mainNode;
}

Expand All @@ -618,7 +618,7 @@ public static JsonNode addArray(JsonNode mainNode, ArrayNode toAddArray, String
*/
public static JsonNode addFieldValue(JsonNode mainNode, Object toAddValue, String fieldName) {
ObjectMapper mapper = new ObjectMapper();
((ObjectNode) mainNode).put(fieldName, mapper.valueToTree(toAddValue));
((ObjectNode) mainNode).set(fieldName, mapper.valueToTree(toAddValue));
return mainNode;
}
}
20 changes: 0 additions & 20 deletions validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<verbose>false</verbose>
<filesNamePattern>.*\.java</filesNamePattern>
<skip>false</skip>
<skipSortingImports>false</skipSortingImports>
<style>google</style>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void testWorkflowMissingStatesIdAndKey() {
Assertions.assertEquals(1, validationErrors.size());

Assertions.assertEquals(
"$.id: is missing but it is required", validationErrors.get(0).getMessage());
"$: required property 'id' not found", validationErrors.get(0).getMessage());
}

@Test
Expand Down