From 4c65ada3cd800329b76ed3d65ad599035287a779 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Mon, 18 Sep 2023 17:06:33 +0200 Subject: [PATCH] chore(project): move the source code level to Java 11 (#3691) * bump to 2.3.0 bpm-release-parent to adopt source code level change and plugin updates * ci: introduce default jdk version set to jdk-11 * remove jdk 8 profiles and update jdk 11 profiles * remove dependencies needed for jdk8 building * engine manifest: remove additional version in osgi export packages * qa: update arquillian-tomcat dependencies compatible with jdk 11 * migration tests: bump h2 to 1.4.200 version compatible with jdk 11 * update readmes camunda/camunda-bpm-platform#3690 --- .ci/daily/Jenkinsfile | 1 + .ci/main-trigger/Jenkinsfile | 1 + .ci/sidetrack/Jenkinsfile | 1 + Jenkinsfile | 15 +- clients/java/README.md | 14 +- clients/java/client/pom.xml | 25 +-- database/pom.xml | 2 +- distro/run/core/pom.xml | 13 -- distro/wildfly/pom.xml | 2 +- distro/wildfly26/pom.xml | 4 +- engine-cdi/pom.xml | 13 +- engine-plugins/spin-plugin/pom.xml | 22 +-- engine-rest/engine-rest/pom.xml | 3 +- engine-rest/pom.xml | 15 +- engine/pom.xml | 33 +--- examples/pom.xml | 14 +- javaee/ejb-client-jakarta/pom.xml | 232 ++++++++++++++-------------- parent/pom.xml | 2 + pom.xml | 3 +- qa/integration-tests-engine/pom.xml | 4 +- qa/test-old-engine/pom.xml | 4 +- qa/wildfly26-runtime/pom.xml | 4 +- spring-boot-starter/README.adoc | 16 -- webapps/pom.xml | 11 +- 24 files changed, 161 insertions(+), 293 deletions(-) diff --git a/.ci/daily/Jenkinsfile b/.ci/daily/Jenkinsfile index f46e696bec3..39992e13cdb 100644 --- a/.ci/daily/Jenkinsfile +++ b/.ci/daily/Jenkinsfile @@ -13,6 +13,7 @@ pipeline { environment { LOGGER_LOG_LEVEL = 'DEBUG' MAVEN_VERSION = 'maven-3.8-latest' + DEF_JDK_VERSION = 'jdk-11-latest' } parameters { booleanParam name: 'TRIGGERED_BY_UPSTREAM', defaultValue: false, description: 'Is the current build triggered in the scope of an upstream pipeline (pull request or default branch)' diff --git a/.ci/main-trigger/Jenkinsfile b/.ci/main-trigger/Jenkinsfile index cfc0aaa2ebe..ee290d7defb 100644 --- a/.ci/main-trigger/Jenkinsfile +++ b/.ci/main-trigger/Jenkinsfile @@ -11,6 +11,7 @@ pipeline { environment { LOGGER_LOG_LEVEL = 'DEBUG' MAVEN_VERSION = 'maven-3.8-latest' + DEF_JDK_VERSION = 'jdk-11-latest' } options { buildDiscarder(logRotator(numToKeepStr: '5')) diff --git a/.ci/sidetrack/Jenkinsfile b/.ci/sidetrack/Jenkinsfile index 0fbbab551d5..1caf22886ee 100644 --- a/.ci/sidetrack/Jenkinsfile +++ b/.ci/sidetrack/Jenkinsfile @@ -11,6 +11,7 @@ pipeline { environment { LOGGER_LOG_LEVEL = 'DEBUG' MAVEN_VERSION = 'maven-3.8-latest' + DEF_JDK_VERSION = 'jdk-11-latest' } parameters { booleanParam name: 'TRIGGERED_BY_UPSTREAM', defaultValue: false, description: 'Is the current build triggered in the scope of an upstream pipeline (pull request or default branch)' diff --git a/Jenkinsfile b/Jenkinsfile index 3b519b9375f..1bc6b693ed4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,6 +13,7 @@ pipeline { environment { LOGGER_LOG_LEVEL = 'DEBUG' MAVEN_VERSION = 'maven-3.8-latest' + DEF_JDK_VERSION = 'jdk-11-latest' } options { buildDiscarder(logRotator(numToKeepStr: '5')) @@ -50,7 +51,7 @@ pipeline { withCatch: false, withNpm: true, // we use JDK 17 to build the artifacts, as it is required for supporting Spring Boot 3 - // the compiler source and target is set to JDK 8 in the release parents + // the compiler source and target is set to JDK 11 in the release parents jdkVersion: 'jdk-17-latest') } @@ -227,7 +228,7 @@ pipeline { 'clean install -Pwildfly,postgresql,engine-integration-jakarta', runtimeStash: true, archiveStash: true, - // we need to use JDK 17 for WildFly 27+ + Spring 6 + // we need to use JDK 17 for Spring 6 jdkVersion: 'jdk-17-latest') }, postFailure: { @@ -272,7 +273,7 @@ pipeline { 'clean install -Pwildfly,postgresql,postgresql-xa,engine-integration-jakarta', runtimeStash: true, archiveStash: true, - // we need to use JDK 17 for WildFly 27+ + Spring 6 + // we need to use JDK 17 for Spring 6 jdkVersion: 'jdk-17-latest') }, postFailure: { @@ -333,9 +334,7 @@ pipeline { cambpmRunMaven('qa/', 'clean install -Pwildfly,h2,webapps-integration', runtimeStash: true, - archiveStash: true, - // we need to use JDK 11 for WildFly 27+ - jdkVersion: 'jdk-11-latest') + archiveStash: true) }, postFailure: { cambpmPublishTestResult() @@ -495,7 +494,7 @@ pipeline { 'clean install -Pwildfly-domain,h2,engine-integration-jakarta', runtimeStash: true, archiveStash: true, - // we need to use JDK 17 for WildFly 27+ + Spring 6 + // we need to use JDK 17 for Spring 6 jdkVersion: 'jdk-17-latest') }, postFailure: { @@ -518,7 +517,7 @@ pipeline { 'clean install -Pwildfly,wildfly-servlet,h2,engine-integration-jakarta', runtimeStash: true, archiveStash: true, - // we need to use JDK 17 for WildFly 27+ + Spring 6 + // we need to use JDK 17 for Spring 6 jdkVersion: 'jdk-17-latest') }, postFailure: { diff --git a/clients/java/README.md b/clients/java/README.md index 1bd3a9993cd..2e6a8d32f8b 100644 --- a/clients/java/README.md +++ b/clients/java/README.md @@ -24,8 +24,8 @@ The **Camunda External Task Client (Java)** allows to set up remote Service Task * The topic subscription can be configured with the fluent api of the [TopicSubscriptionBuilder](client/src/main/java/org/camunda/bpm/client/topic/TopicSubscriptionBuilder.java). ## Prerequisites -* Oracle Hotspot v1.8+ (JDK 8) -* Camunda BPM Platform 7.9.0+ +* Java (supported version by the used Camunda Platform 7) +* Camunda Platform 7 ## Maven coordinates The following Maven coordinate needs to be added to the projects `pom.xml`: @@ -37,16 +37,6 @@ The following Maven coordinate needs to be added to the projects `pom.xml`: ``` -### JDK 9+ Support -If you want to use a JDK higher than 1.8, please add the following dependency to the projects `pom.xml`: -```xml - - com.sun.xml.bind - jaxb-impl - 2.2.4 - -``` - ## Contributing Have a look at our [contribution guide](https://github.com/camunda/camunda-bpm-platform/blob/master/CONTRIBUTING.md) for how to contribute to this repository. diff --git a/clients/java/client/pom.xml b/clients/java/client/pom.xml index fe4300a46ca..e309e60ba5c 100644 --- a/clients/java/client/pom.xml +++ b/clients/java/client/pom.xml @@ -157,6 +157,13 @@ ${project.version} + + com.sun.xml.bind + jaxb-impl + ${version.xml.jaxb-impl} + provided + + @@ -314,22 +321,4 @@ - - - jdk-9-plus - - (1.8,) - - - - - com.sun.xml.bind - jaxb-impl - ${version.xml.jaxb-impl} - provided - - - - - diff --git a/database/pom.xml b/database/pom.xml index a7fe4dc5238..bd5cf62caaf 100644 --- a/database/pom.xml +++ b/database/pom.xml @@ -18,7 +18,7 @@ 2.1.214 - 1.4.190 + 1.4.200 19.3.0.0 1.7.6 1.1.8 diff --git a/distro/run/core/pom.xml b/distro/run/core/pom.xml index b5de3db871a..2d8456224f2 100644 --- a/distro/run/core/pom.xml +++ b/distro/run/core/pom.xml @@ -53,19 +53,6 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-rest - - - - jakarta.xml.bind - jakarta.xml.bind-api - org.springframework.boot diff --git a/distro/wildfly/pom.xml b/distro/wildfly/pom.xml index aa654c51710..a0699afaa88 100644 --- a/distro/wildfly/pom.xml +++ b/distro/wildfly/pom.xml @@ -45,7 +45,7 @@ ***************************************************************************************************** * * - * You must use at least JDK 11 to compile Camunda Platform Wildfly!!! * + * You must use at least JDK 11 to compile Camunda Platform Wildfly!!! * * * ***************************************************************************************************** diff --git a/distro/wildfly26/pom.xml b/distro/wildfly26/pom.xml index 7e515499cae..bb064959e91 100644 --- a/distro/wildfly26/pom.xml +++ b/distro/wildfly26/pom.xml @@ -41,11 +41,11 @@ - [1.8,) + [11,) ***************************************************************************************************** * * - * You must use at least JDK 1.8 to compile Camunda Platform Wildfly!!! * + * You must use at least JDK 11 to compile Camunda Platform Wildfly!!! * * * ***************************************************************************************************** diff --git a/engine-cdi/pom.xml b/engine-cdi/pom.xml index ec17267a4c5..573cc8dd053 100644 --- a/engine-cdi/pom.xml +++ b/engine-cdi/pom.xml @@ -15,18 +15,7 @@ core + jakarta - - - jdk11 - - [11,) - - - jakarta - - - - diff --git a/engine-plugins/spin-plugin/pom.xml b/engine-plugins/spin-plugin/pom.xml index 56633047e2f..8534eb23f4a 100644 --- a/engine-plugins/spin-plugin/pom.xml +++ b/engine-plugins/spin-plugin/pom.xml @@ -128,6 +128,11 @@ test + + com.sun.xml.bind + jaxb-impl + test + @@ -141,21 +146,4 @@ - - - jdk9-and-onwards - - [9,) - - - - - com.sun.xml.bind - jaxb-impl - test - - - - - diff --git a/engine-rest/engine-rest/pom.xml b/engine-rest/engine-rest/pom.xml index 333155c88b2..929e40681e9 100644 --- a/engine-rest/engine-rest/pom.xml +++ b/engine-rest/engine-rest/pom.xml @@ -40,7 +40,8 @@ jackson-jaxrs-json-provider diff --git a/engine-rest/pom.xml b/engine-rest/pom.xml index c16e30d4331..8f75df2678a 100644 --- a/engine-rest/pom.xml +++ b/engine-rest/pom.xml @@ -71,23 +71,12 @@ engine-rest + engine-rest-jakarta engine-rest-openapi engine-rest-openapi-generator assembly + assembly-jakarta docs - - - jdk11-and-onwards - - [11,) - - - engine-rest-jakarta - assembly-jakarta - - - - diff --git a/engine/pom.xml b/engine/pom.xml index 4d70d25d9a0..41d577313eb 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -348,10 +348,10 @@ !${camunda.artifact}.engine.variable.*, - ${camunda.artifact};${camunda.osgi.version};-noimport:=true, - ${camunda.artifact}.application.*;${camunda.osgi.version};-noimport:=true, - ${camunda.artifact}.container.*;${camunda.osgi.version};-noimport:=true, - ${camunda.artifact}.engine.*;${camunda.osgi.version};-noimport:=true + ${camunda.artifact}, + ${camunda.artifact}.application.*, + ${camunda.artifact}.container.*, + ${camunda.artifact}.engine.* !com.google.gson.*, @@ -898,31 +898,6 @@ - - - below-java11 - - (,11) - - - - - - maven-compiler-plugin - - - - **/Jakarta*.java - - - **/Jakarta*.java - - - - - - - diff --git a/examples/pom.xml b/examples/pom.xml index 026d7ee4b92..ea3fa9ebb20 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -94,19 +94,7 @@ invoice + invoice-jakarta - - - jdk11-and-onwards - - [11,) - - - invoice-jakarta - - - - - \ No newline at end of file diff --git a/javaee/ejb-client-jakarta/pom.xml b/javaee/ejb-client-jakarta/pom.xml index 21d4d9a8c12..08b2e679d19 100644 --- a/javaee/ejb-client-jakarta/pom.xml +++ b/javaee/ejb-client-jakarta/pom.xml @@ -62,123 +62,117 @@ - - - java11 - - [11,) - - - - - org.apache.maven.plugins - maven-resources-plugin - - - sources - generate-sources - - copy-resources - - - ${project.build.directory}/generated-sources/jakarta - - - ${basedir}/../ejb-client/src/main/java - false - - - - - - resources - generate-resources - - copy-resources - - - ${project.build.directory}/generated-resources/jakarta - - - ${basedir}/../ejb-client/src/main/resources - false - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - initialize - - properties - - - - - - org.eclipse.transformer - transformer-maven-plugin - - - transform-jakarta-sources - generate-sources - - transform - - - ${project.build.directory}/generated-sources/jakarta - - - - transform-jakarta-resources - generate-resources - - transform - - - ${project.build.directory}/generated-resources/jakarta - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.2.0 - - - add-jakarta-source - generate-sources - - add-source - - - - ${basedir}/target/generated-sources/jakarta - - - - - add-jakarta-resource - generate-resources - - add-resource - - - - ${basedir}/target/generated-resources/jakarta - - - - - - - - - + + + + + org.apache.maven.plugins + maven-resources-plugin + + + sources + generate-sources + + copy-resources + + + ${project.build.directory}/generated-sources/jakarta + + + ${basedir}/../ejb-client/src/main/java + false + + + + + + resources + generate-resources + + copy-resources + + + ${project.build.directory}/generated-resources/jakarta + + + ${basedir}/../ejb-client/src/main/resources + false + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + initialize + + properties + + + + + + org.eclipse.transformer + transformer-maven-plugin + + + transform-jakarta-sources + generate-sources + + transform + + + ${project.build.directory}/generated-sources/jakarta + + + + transform-jakarta-resources + generate-resources + + transform + + + ${project.build.directory}/generated-resources/jakarta + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + add-jakarta-source + generate-sources + + add-source + + + + ${basedir}/target/generated-sources/jakarta + + + + + add-jakarta-resource + generate-resources + + add-resource + + + + ${basedir}/target/generated-resources/jakarta + + + + + + + + diff --git a/parent/pom.xml b/parent/pom.xml index 236f602df8b..2a6714f35ff 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -107,6 +107,7 @@ Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL {maven-resources} + 5.1.9 @@ -199,6 +200,7 @@ org.apache.felix maven-bundle-plugin + ${plugin.version.maven-bundle} ${camunda.osgi.exclude.dependencies} diff --git a/pom.xml b/pom.xml index 191f1d20181..484d85c855e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.camunda camunda-bpm-release-parent - 2.2.7 + 2.3.0 @@ -33,7 +33,6 @@ 1.21.0 2.1.0 1.15.3 - 3.0.1 diff --git a/qa/integration-tests-engine/pom.xml b/qa/integration-tests-engine/pom.xml index fb3a16f84ca..8fb59a4acf3 100644 --- a/qa/integration-tests-engine/pom.xml +++ b/qa/integration-tests-engine/pom.xml @@ -526,8 +526,8 @@ org.jboss.arquillian.container - arquillian-tomcat-managed-7 - 1.0.0.CR5 + arquillian-tomcat-managed-8 + 1.1.0.Final test diff --git a/qa/test-old-engine/pom.xml b/qa/test-old-engine/pom.xml index 9047dbdbcc0..69ad775348c 100755 --- a/qa/test-old-engine/pom.xml +++ b/qa/test-old-engine/pom.xml @@ -421,7 +421,7 @@ - below-java11 + below-java11 (,11) @@ -442,7 +442,7 @@ - java11 + java11 [11,) diff --git a/qa/wildfly26-runtime/pom.xml b/qa/wildfly26-runtime/pom.xml index 594e08074b1..b094c5bf97a 100644 --- a/qa/wildfly26-runtime/pom.xml +++ b/qa/wildfly26-runtime/pom.xml @@ -156,11 +156,11 @@ - [1.8,) + [11,) ***************************************************************************************************** * * - * You must use at least JDK 1.8 to start Camunda Platform Wildfly!!! * + * You must use at least JDK 11 to start Camunda Platform Wildfly!!! * * * ***************************************************************************************************** diff --git a/spring-boot-starter/README.adoc b/spring-boot-starter/README.adoc index ffb8f37bdeb..fb58d6c4eb6 100644 --- a/spring-boot-starter/README.adoc +++ b/spring-boot-starter/README.adoc @@ -24,22 +24,6 @@ the https://github.com/camunda/camunda-bpm-examples/tree/master/spring-boot-star * https://github.com/camunda/camunda-bpm-spring-boot-starter/blob/master/.github/CONTRIBUTING.md[Contributing] - check this if you want to contribute * https://forum.camunda.org/c/spring-boot-starter[Discussion Forum] - this project has it's own sub-category at the camunda forum ... use it! -### JDK 9 and onwards -Beginning with version 3.1-alpha2, Camunda Spring Boot Starter can be used in conjunction with JDK 9 / 10. -As Hibernate is part of Camunda Spring Boot Starter it requires JAXB. However, JAXB is deactivated by default -(and marked as deprecated) in JDK 9 / 10 and removed entirely in JDK 11. Therefore, it is sensible to -re-add JAXB to your Camunda Spring Boot Starter project. - -There exist various implementations of JAXB. The following Maven coordinates represent the implementation which is -included in the JDKs up to version 10: - -```xml - - com.sun.xml.bind - jaxb-impl - -``` - ## Resources for versions older than 2.3.0 Before version 2.2.0, the project existed as a community extension. Therefore the resources were located in different paths. You can find all the links below. diff --git a/webapps/pom.xml b/webapps/pom.xml index 9b10e0f26ab..ff782600398 100644 --- a/webapps/pom.xml +++ b/webapps/pom.xml @@ -326,19 +326,10 @@ assembly + assembly-jakarta - - jdk11-and-onwards - - [11,) - - - assembly-jakarta - - - skipFrontendBuild