Skip to content
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

Add JDK17 and springboot 3.0 support #975

Merged
merged 62 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3841661
add support for java17
skyao Nov 28, 2023
e0ed3a4
upgrade spotbugs-maven-plugin version to support jdk17
skyao Dec 11, 2023
2d8b386
Merge branch 'dapr:master' into jdk17
skyao Dec 11, 2023
5f0f8c1
Merge branch 'master' into jdk17
skyao Dec 12, 2023
75985ae
add clean before install
skyao Dec 12, 2023
789e288
add clean in mvn command
skyao Dec 12, 2023
92a67d5
rollback spotbugs-maven-plugin version to 4.1.4
skyao Dec 12, 2023
1ef6170
Merge branch 'master' into jdk17
skyao Dec 13, 2023
d79dd0a
add jdk17 in build
skyao Dec 13, 2023
f71bb29
Merge branch 'jdk17' of github.com:skyao/java-sdk into jdk17
skyao Dec 13, 2023
ee0a3c6
update to support jdk17
skyao Dec 13, 2023
e112a7f
remove jdk versions earlier than jdk17
skyao Dec 13, 2023
e86eb5d
remove springboot 2.3 and 2.4 because they don't support jdk17
skyao Dec 13, 2023
0d80a99
update to jdk17
skyao Dec 13, 2023
60a3529
update maven plugin versions to support jdk17
skyao Dec 13, 2023
79482d7
temporarily ignoring checking after upgrade to new spotbugs version t…
skyao Dec 13, 2023
797b57e
use the same version of maven-failsafe-plugin
skyao Dec 13, 2023
7b8e98f
hard code maven-failsafe-plugin version to 3.2.2
skyao Dec 13, 2023
38b6fe1
set sourceDirectory of checkstyle plugin to only check the sources di…
skyao Dec 14, 2023
2cc1aaf
set release to jdk17 in examples subproject
skyao Dec 16, 2023
dfe18b7
update to springboot 3.0
skyao Dec 16, 2023
9708112
add springboot 3.0.13 in springboot version matrics
skyao Dec 16, 2023
a3c2fa4
upgrade to springboot 3.0.13 in sdk-tests
skyao Dec 16, 2023
ad37578
remove Nullable annotation
skyao Dec 16, 2023
5e19033
force opentelemetry-sdk-metrics dependencies to be version 0.14.0
skyao Dec 16, 2023
47b9ac2
jakarta.servlet is needed for dapr compatibility for spring boot vers…
skyao Dec 16, 2023
7137739
update code to run with jakarta.servlet and javax.servlet
skyao Dec 16, 2023
9642cf8
update jakarta.annotation to latest version
skyao Dec 17, 2023
1b5b073
add javax.annotation
skyao Dec 17, 2023
3e190f5
trigger ci
skyao Dec 17, 2023
44febd9
revert back to using 3.0 version of the github action
skyao Dec 18, 2023
19323da
Merge branch 'master' into springboot30
skyao Dec 19, 2023
47fe57b
revert back to use jdk11 for vallidate
skyao Dec 19, 2023
4a1641c
Merge branch 'springboot30' of github.com:skyao/java-sdk into springb…
skyao Dec 19, 2023
7d9aa5e
jdk17 is required for vallidate
skyao Dec 19, 2023
3570c83
trigger ci
skyao Dec 19, 2023
5a9824f
use jdk17 to validate
skyao Dec 19, 2023
b4f51b8
Merge branch 'master' into springboot30
skyao Dec 27, 2023
3adeecc
fix merge conflicts
skyao Jan 8, 2024
70a59e4
remove java8 support
skyao Jan 8, 2024
184dcda
use jdk11 to test springboot2.x and jdk17 to test springboot3.0
skyao Jan 8, 2024
7c22d48
rollback to jdk17 to test for springboot2.x
skyao Jan 8, 2024
acefafa
Merge branch 'master' into springboot30
skyao Jan 9, 2024
fc62d27
Merge branch 'master' into springboot30
mukundansundar Jan 10, 2024
9a9569a
Merge branch 'master' into springboot30
mukundansundar Jan 11, 2024
4038c86
rename springboot30 to springboot3
skyao Jan 14, 2024
77fcd2c
Merge branch 'master' into springboot30
skyao Jan 14, 2024
95ac8b3
skip mvn test in mvn install
skyao Jan 14, 2024
27a185f
add more exclude for spotbugs
skyao Jan 14, 2024
e4225f0
add more exclude for spotbugs
skyao Jan 14, 2024
18dc748
set java source and target to 17 in sdk-tests
skyao Jan 14, 2024
d57950c
rollback root pom.xml to remove sdk-tests module
skyao Jan 14, 2024
66590b0
exclude logback to avoid conflicts
skyao Jan 14, 2024
f99174a
replace ctx.getLogger() with sysout
skyao Jan 15, 2024
2bae97f
update stdout line according to source code
skyao Jan 15, 2024
f31aa63
rollback validate line, replace ctx.getLogger() with system out in wo…
skyao Jan 15, 2024
0b8108f
rollback example code for subworkflow
skyao Jan 15, 2024
df1c4a1
print ctx.getLogger() and instanceId for debug
skyao Jan 15, 2024
75b7148
rollback to not exclude logback
skyao Jan 15, 2024
91c430a
add slf4j as compile dependency and upgrade its version to 2.0.9
skyao Jan 15, 2024
e9c6f94
print the logger implementation class
skyao Jan 15, 2024
c6df692
remove debug code
skyao Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 11, 13, 15, 16 ]
skyao marked this conversation as resolved.
Show resolved Hide resolved
spring-boot-version: [ 2.7.8 ]
java: [ 17 ]
spring-boot-version: [ 3.0.13 ]
experimental: [ false ]
include:
- java: 11
- java: 17
spring-boot-version: 2.7.8
experimental: false
- java: 17
spring-boot-version: 2.6.14
experimental: false
- java: 11
- java: 17
spring-boot-version: 2.5.7
experimental: false
- java: 11
spring-boot-version: 2.4.0
experimental: false
- java: 11
spring-boot-version: 2.3.6.RELEASE
experimental: false
env:
GOVER: "1.20"
GOOS: linux
Expand Down Expand Up @@ -152,7 +149,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
env:
JDK_VER: 11
JDK_VER: 17
OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }}
OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }}
GPG_KEY: ${{ secrets.GPG_KEY }}
Expand All @@ -178,7 +175,7 @@ jobs:
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV
- name: Install jars
if: env.DEPLOY_OSSRH == 'true'
run: ./mvnw clean install -B -q
run: ./mvnw install -B -q
- name: Publish to ossrh
if: env.DEPLOY_OSSRH == 'true'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
java: [ 11, 13, 15, 16 ]
java: [ 17 ]
env:
GOVER: "1.20"
GOOS: linux
Expand Down
24 changes: 19 additions & 5 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
<properties>
<protobuf.output.directory>${project.build.directory}/generated-sources</protobuf.output.directory>
<protobuf.input.directory>${project.basedir}/proto</protobuf.input.directory>
<java.version>11</java.version>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
skyao marked this conversation as resolved.
Show resolved Hide resolved
<maven.deploy.skip>true</maven.deploy.skip>
<spotbugs.fail>false</spotbugs.fail>
<opentelemetry.version>0.14.0</opentelemetry.version>
<springboot.version>3.0.13</springboot.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -66,12 +67,12 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.7.8</version>
<version>${springboot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.7.8</version>
<version>${springboot.version}</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
Expand Down Expand Up @@ -111,7 +112,7 @@
</dependency>
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-springboot</artifactId>
<artifactId>dapr-sdk-springboot3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand All @@ -134,6 +135,11 @@
<artifactId>retry4j</artifactId>
<version>0.15.0</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -176,7 +182,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -212,6 +218,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<!-- Skip checkstyle for auto-generated code -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.DispatcherType;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Collections;

@Component
Expand Down
40 changes: 20 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
<maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.deploy.skip>true</maven.deploy.skip>
<!--
manually declare durabletask-client's jackson dependencies for workflows sdk
Expand All @@ -32,13 +32,11 @@
-->
<jackson.version>2.12.3</jackson.version>
<gpg.skip>true</gpg.skip>
<spotbugs.version>4.0.0-RC1</spotbugs.version>
<spotbugs.fail>true</spotbugs.fail>
<spotbugs.exclude.filter.file>../spotbugs-exclude.xml</spotbugs.exclude.filter.file>
<springboot.version>2.7.8</springboot.version>
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
<failsafe.version>3.1.2</failsafe.version>
<surefire.version>3.1.2</surefire.version>
<failsafe.version>3.2.2</failsafe.version>
<surefire.version>3.2.2</surefire.version>
<junit-bom.version>5.7.2</junit-bom.version>
</properties>

Expand All @@ -60,6 +58,11 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
Expand Down Expand Up @@ -120,7 +123,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.11</version>
<executions>
<execution>
<goals>
Expand All @@ -132,7 +135,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.20</version>
<version>1.23</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
Expand All @@ -154,7 +157,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -175,7 +178,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -186,7 +189,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<version>3.3.1</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
Expand Down Expand Up @@ -219,15 +222,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.1.4</version>
<dependencies>
<!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.version}</version>
</dependency>
</dependencies>
<version>4.8.2.0</version>
<configuration>
<excludeFilterFile>${spotbugs.exclude.filter.file}</excludeFilterFile>
<failOnError>${spotbugs.fail}</failOnError>
Expand Down Expand Up @@ -316,7 +311,12 @@
<module>sdk-actors</module>
<module>sdk-workflows</module>
<module>sdk-springboot</module>
<module>sdk-springboot3</module>
<module>examples</module>
<!-- don't add sdk-tests to the build,
it's only used for CI testing by github action
<module>sdk-tests</module>
-->
</modules>

</project>
2 changes: 1 addition & 1 deletion sdk-actors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.11</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down
2 changes: 1 addition & 1 deletion sdk-springboot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.11</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down