diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index 58b4d7ac..3c846f7a 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -16,14 +16,14 @@ jobs: strategy: fail-fast: false matrix: - java: ['8', '11', '17'] #Support LTS releases 8, 11 and 17 and the latest release supported by Micronaut. + java: ['17'] #Support LTS releases 17 and the latest release supported by Micronaut. runtime: ['netty'] - include: # Test more server runtimes on Java 8 only (to reduce number of combinations) - - java: '8' + include: # Test more server runtimes on Java 17 only (to reduce number of combinations) + - java: '17' runtime: 'jetty' - - java: '8' + - java: '17' runtime: 'tomcat' - - java: '8' + - java: '17' runtime: 'undertow' steps: diff --git a/.github/workflows/nightly-all-combinations.yml b/.github/workflows/nightly-all-combinations.yml index 48ee7339..0e2ab06d 100644 --- a/.github/workflows/nightly-all-combinations.yml +++ b/.github/workflows/nightly-all-combinations.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - java: ['8', '11', '17'] #Support LTS releases 8, 11, and 17 and the latest release supported by Micronaut. + java: ['17'] #Support LTS releases 17 and the latest release supported by Micronaut. runtime: ['netty', 'jetty', 'tomcat', 'undertow'] steps: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 3929df14..8ca91a6a 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -13,11 +13,11 @@ jobs: steps: - name: Git Checkout uses: actions/checkout@v3 - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '8' + java-version: '17' - name: Extract secring.gpg to sign files run: echo -n $SECRING_GPG | base64 --decode > micronaut-camunda-bpm-feature/secring.gpg diff --git a/README.md b/README.md index 014eeb18..f2b5e115 100644 --- a/README.md +++ b/README.md @@ -263,9 +263,13 @@ Here are some example applications: ## Supported JDKs We officially support the following JDKs: +* JDK 17 (LTS) + +The following JDKs are no longer supported by Micronaut 4: * JDK 8 (LTS) * JDK 11 (LTS) -* JDK 17 (LTS) + +Release 2.15.0 was the last release to support Micronaut 3. # 🏆Advanced Topics diff --git a/gradle.properties b/gradle.properties index 6373bea0..771dc305 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,17 @@ # The project property 'version' is overwritten via .github/workflows/publish-release.yml version=0.0.1-SNAPSHOT -kotlinVersion=1.6.21 -micronautVersion=3.9.4 -micronautApplicationPluginVersion=3.7.10 -micronautLibraryPluginVersion=3.7.10 -# The matching versions can be found here: https://github.com/micronaut-projects/micronaut-servlet/blob/v3.3.5/gradle/libs.versions.toml -jettyVersion=9.4.49.v20220914 -tomcatVersion=9.0.65 -undertowVersion=2.2.18.Final +javaLanguageVersion=17 +kotlinVersion=1.8.22 +micronautVersion=4.0.0 +micronautApplicationPluginVersion=4.0.0 +micronautLibraryPluginVersion=4.0.0 +# The matching versions can be found here: https://github.com/micronaut-projects/micronaut-servlet/blob/v4.0.0/gradle/libs.versions.toml +jettyVersion=11.0.15 +tomcatVersion=10.1.11 +undertowVersion=2.3.7.Final camundaVersion=7.19.0 # Latest Jersey, that implements JAX-RS 2.1 API: see https://eclipse-ee4j.github.io/jersey/download.html -jerseyVersion=2.39.1 +jerseyVersion=2.40 # Prevent upload of maven-metadata.xml.sha256/sha512 files to oss.sonatype.org # see https://issues.sonatype.org/browse/OSSRH-53695?focusedCommentId=887733&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-887733 # see https://github.com/gradle/gradle/issues/11308#issuecomment-554317655 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f06b38cb..21b45cbe 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists # -bin.zip is used for size/caching reasons, -all.zip is bigger and therefore not used -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/micronaut-camunda-bpm-example/build.gradle b/micronaut-camunda-bpm-example/build.gradle index d55222fc..8a5e8c07 100644 --- a/micronaut-camunda-bpm-example/build.gradle +++ b/micronaut-camunda-bpm-example/build.gradle @@ -17,6 +17,7 @@ dependencies { implementation(project(":micronaut-camunda-bpm-feature")) runtimeOnly("com.h2database:h2") runtimeOnly("ch.qos.logback:logback-classic") + runtimeOnly("org.yaml:snakeyaml") // Test testImplementation("io.micronaut:micronaut-http-client") @@ -30,8 +31,8 @@ application { } java { - sourceCompatibility = JavaVersion.toVersion("1.8") - targetCompatibility = JavaVersion.toVersion("1.8") + sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion) + targetCompatibility = JavaVersion.toVersion(javaLanguageVersion) } dockerfile { diff --git a/micronaut-camunda-bpm-example/src/main/resources/logback.xml b/micronaut-camunda-bpm-example/src/main/resources/logback.xml index 8c4f4528..3e163360 100644 --- a/micronaut-camunda-bpm-example/src/main/resources/logback.xml +++ b/micronaut-camunda-bpm-example/src/main/resources/logback.xml @@ -1,7 +1,6 @@ - false diff --git a/micronaut-camunda-bpm-feature/build.gradle b/micronaut-camunda-bpm-feature/build.gradle index 4ab873e2..d880cd90 100644 --- a/micronaut-camunda-bpm-feature/build.gradle +++ b/micronaut-camunda-bpm-feature/build.gradle @@ -19,7 +19,8 @@ micronaut { } dependencies { - implementation("io.micronaut:micronaut-validation") + annotationProcessor("io.micronaut.validation:micronaut-validation-processor") + implementation("io.micronaut.validation:micronaut-validation") implementation("io.micronaut:micronaut-runtime") implementation("com.fasterxml.uuid:java-uuid-generator:4.2.0") api("org.camunda.bpm:camunda-engine:$camundaVersion") { @@ -36,7 +37,7 @@ dependencies { compileOnly("org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion") compileOnly("io.undertow:undertow-core:$undertowVersion") - kaptTest platform("io.micronaut:micronaut-bom:$micronautVersion") + kaptTest(platform("io.micronaut.platform:micronaut-platform:$micronautVersion")) kaptTest("io.micronaut.data:micronaut-data-processor") kapt("io.micronaut:micronaut-inject-java:$micronautVersion") @@ -63,11 +64,12 @@ dependencies { testRuntimeOnly("com.h2database:h2") testRuntimeOnly("io.micronaut:micronaut-http-server-netty") testRuntimeOnly("org.codehaus.groovy:groovy-all:3.0.18") // as script engine + testRuntimeOnly("org.yaml:snakeyaml") } java { - sourceCompatibility = JavaVersion.toVersion('1.8') - targetCompatibility = JavaVersion.toVersion('1.8') + sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion) + targetCompatibility = JavaVersion.toVersion(javaLanguageVersion) withJavadocJar() withSourcesJar() } @@ -79,7 +81,7 @@ test { tasks { compileTestKotlin { kotlinOptions { - jvmTarget = "1.8" + jvmTarget = javaLanguageVersion } } } diff --git a/micronaut-camunda-bpm-feature/jetty-webapp-and-rest/build.gradle b/micronaut-camunda-bpm-feature/jetty-webapp-and-rest/build.gradle index 1ce9a34a..b34c7dc9 100644 --- a/micronaut-camunda-bpm-feature/jetty-webapp-and-rest/build.gradle +++ b/micronaut-camunda-bpm-feature/jetty-webapp-and-rest/build.gradle @@ -18,8 +18,9 @@ dependencies { testImplementation(project(":micronaut-camunda-bpm-feature")) testRuntimeOnly("com.h2database:h2") testRuntimeOnly("ch.qos.logback:logback-classic") + testRuntimeOnly("org.yaml:snakeyaml") - kaptTest(platform("io.micronaut:micronaut-bom:$micronautVersion")) + kaptTest(platform("io.micronaut.platform:micronaut-platform:$micronautVersion")) kaptTest("io.micronaut.data:micronaut-data-processor") kaptTest("io.micronaut:micronaut-inject-java:$micronautVersion") @@ -36,13 +37,13 @@ application { } java { - sourceCompatibility = JavaVersion.toVersion("1.8") + sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion) } tasks { compileTestKotlin { kotlinOptions { - jvmTarget = "1.8" + jvmTarget = javaLanguageVersion } } } diff --git a/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/rest/JettyServerCustomizerRuntimeRest.java b/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/rest/JettyServerCustomizerRuntimeRest.java index 4d68473a..929a4fb1 100644 --- a/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/rest/JettyServerCustomizerRuntimeRest.java +++ b/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/rest/JettyServerCustomizerRuntimeRest.java @@ -30,12 +30,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.servlet.DispatcherType; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import java.util.EnumSet; import static info.novatec.micronaut.camunda.bpm.feature.Configuration.Rest.DEFAULT_AUTHENTICATION_PROVIDER; -import static javax.servlet.DispatcherType.REQUEST; /** * Using Micronaut Servlet with Jetty to run the REST API/Webapps as a servlet. @@ -88,7 +88,7 @@ public void contextDestroyed(ServletContextEvent sce) { // see https://docs.camunda.org/manual/latest/reference/rest/overview/authentication/ FilterHolder filterHolder = new FilterHolder(ProcessEngineAuthenticationFilter.class); filterHolder.setInitParameter("authentication-provider", authenticationProvider); - restServletContextHandler.addFilter(filterHolder, "/*", EnumSet.of(REQUEST)); + restServletContextHandler.addFilter(filterHolder, "/*", EnumSet.of(DispatcherType.REQUEST)); log.debug("REST API - Authentication enabled with authentication-provider {}", authenticationProvider); } diff --git a/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/webapp/JettyServerCustomizerRuntimeWebapp.java b/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/webapp/JettyServerCustomizerRuntimeWebapp.java index c2b74aa0..458a2c3c 100644 --- a/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/webapp/JettyServerCustomizerRuntimeWebapp.java +++ b/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/webapp/JettyServerCustomizerRuntimeWebapp.java @@ -48,7 +48,6 @@ import java.util.Map; import static java.util.Collections.singletonMap; -import static javax.servlet.DispatcherType.REQUEST; /** * Using Micronaut Servlet with Jetty to run the REST API/Webapps as a servlet. @@ -171,7 +170,7 @@ public void execute() throws Exception { static class ServletContextInitializedListener implements ServletContextListener { private static final Logger log = LoggerFactory.getLogger(ServletContextInitializedListener.class); - protected static final EnumSet DISPATCHER_TYPES = EnumSet.of(REQUEST); + protected static final EnumSet DISPATCHER_TYPES = EnumSet.of(DispatcherType.REQUEST); protected static ServletContext servletContext; diff --git a/micronaut-camunda-bpm-feature/transactional-test-data-jdbc/build.gradle b/micronaut-camunda-bpm-feature/transactional-test-data-jdbc/build.gradle index aeee6f95..8d92b2fe 100644 --- a/micronaut-camunda-bpm-feature/transactional-test-data-jdbc/build.gradle +++ b/micronaut-camunda-bpm-feature/transactional-test-data-jdbc/build.gradle @@ -18,7 +18,7 @@ dependencies { testImplementation(project(":micronaut-camunda-bpm-feature").sourceSets.test.output) testRuntimeOnly("com.h2database:h2") - kaptTest(platform("io.micronaut:micronaut-bom:$micronautVersion")) + kaptTest(platform("io.micronaut.platform:micronaut-platform:$micronautVersion")) kaptTest("io.micronaut.data:micronaut-data-processor") kaptTest("io.micronaut:micronaut-inject-java:$micronautVersion") @@ -28,13 +28,13 @@ dependencies { } java { - sourceCompatibility = JavaVersion.toVersion("1.8") + sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion) } tasks { compileTestKotlin { kotlinOptions { - jvmTarget = "1.8" + jvmTarget = javaLanguageVersion } } } \ No newline at end of file