From 3a570f58eecea577f75618e7fa0604d3538027c7 Mon Sep 17 00:00:00 2001 From: Domenico Sibilio Date: Tue, 2 Aug 2022 12:34:28 +0200 Subject: [PATCH] ACS-3347 Upgrade to Java 17 (#1486) --- .travis.yml | 6 +++--- scripts/travis/build.sh | 9 ++++++++- tests/tas-integration/pom.xml | 2 ++ tests/tas-restapi/pom.xml | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 624277137..64526b44a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ --- dist: xenial language: java -jdk: openjdk11 +jdk: openjdk17 services: - docker @@ -29,8 +29,8 @@ env: - TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts - TAS_ENVIRONMENT=./tests/environment # Release version has to start with real version (7.3.0-....) for the docker image to build successfully. - - RELEASE_VERSION=7.3.0-A10 - - DEVELOPMENT_VERSION=7.3.0-A11-SNAPSHOT + - RELEASE_VERSION=7.3.0-A10 + - DEVELOPMENT_VERSION=7.3.0-A11-SNAPSHOT stages: - name: test diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh index 60c657f81..7de229f50 100644 --- a/scripts/travis/build.sh +++ b/scripts/travis/build.sh @@ -53,7 +53,14 @@ if [[ "${SHARE_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] && [ "${TRAVIS_BUILD_STA fi SHARE_UPSTREAM_REPO="github.com/Alfresco/alfresco-community-share.git" - +# Temporarily opening reflective access during compilation for community-share +# This could be removed once community-share will become Java 17 compliant +# (Maven plugins included e.g.: maven-war-plugin) +export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED \ +--add-opens=java.base/java.lang=ALL-UNNAMED \ +--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \ +--add-opens=java.base/java.text=ALL-UNNAMED \ +--add-opens=java.desktop/java.awt.font=ALL-UNNAMED" # Checkout the upstream share project (tag or branch; + build if the latter) if [[ "${SHARE_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then pullAndBuildSameBranchOnUpstream "${SHARE_UPSTREAM_REPO}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER ${REPO_IMAGE} -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}" diff --git a/tests/tas-integration/pom.xml b/tests/tas-integration/pom.xml index 0dd1ef1db..756c2a2c5 100644 --- a/tests/tas-integration/pom.xml +++ b/tests/tas-integration/pom.xml @@ -114,8 +114,10 @@ ${suiteXmlFile} + --illegal-access=warn + --add-opens=java.base/java.lang=ALL-UNNAMED diff --git a/tests/tas-restapi/pom.xml b/tests/tas-restapi/pom.xml index c9f00e2a1..21c09f935 100644 --- a/tests/tas-restapi/pom.xml +++ b/tests/tas-restapi/pom.xml @@ -84,8 +84,10 @@ ${suiteXmlFile} + --illegal-access=warn + --add-opens=java.base/java.lang=ALL-UNNAMED