From 01b17656588b080d03f2bf762646c48471d511d5 Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Tue, 5 Mar 2024 19:13:36 +0100 Subject: [PATCH] kie-issues#960: Upgrade `kie-tools` to Java 17, Maven 3.9.6, and Quarkus 3 (#2182) --- .ci/jenkins/Jenkinsfile.staging-build | 27 +----- .ci/kie-tools-ci-build.Dockerfile | 12 +-- .github/actions/setup-env/action.yml | 6 +- .github/workflows/ci_build.yml | 13 +-- README.md | 4 +- .../pfly/tab/TabPanelWithDropdownsTest.java | 4 +- .../dashbuilder-runtime-client/pom.xml | 9 +- packages/dashbuilder/pom.xml | 10 +- .../dev-deployment-base-image/Containerfile | 13 ++- packages/dev-deployment-base-image/README.md | 2 +- .../dev-deployment-base-image/env/index.js | 2 +- .../Containerfile | 10 +- .../README.md | 10 ++ .../pom.xml | 50 +++++++--- .../package.json | 4 +- packages/extended-services-java/pom.xml | 40 +++++++- .../main/java/org/kie/tools/PingResource.java | 12 +-- .../main/java/org/kie/tools/PingResponse.java | 3 +- .../java/org/kie/tools/PingResourceTest.java | 5 +- .../java/org/kie/tools/PingResponseTest.java | 5 +- packages/extended-services/package.json | 2 +- .../kie-sandbox-distribution/package.json | 5 +- .../integrationTest.test.js.snap | 46 +++++++-- .../tests/integrationTest.test.js | 12 ++- .../Containerfile | 8 +- packages/kn-plugin-workflow/package.json | 2 +- .../kogitoQuarkusBlankApp/DeploymentYaml.ts | 6 ++ packages/root-env/env/index.js | 4 +- .../Containerfile | 8 +- .../env/index.js | 2 +- .../env/index.js | 2 +- .../env/index.js | 4 +- .../pom.xml | 37 ++++++- .../main/java/org/kie/kogito/AppStartup.java | 6 +- .../org/kie/kogito/HotReloadResource.java | 16 ++-- .../kogito/StaticContentCachingFilter.java | 4 +- .../kogito/health/LivenessHealthCheck.java | 2 +- .../kogito/health/ReadinessHealthCheck.java | 2 +- .../kie/kogito/health/StartupHealthCheck.java | 2 +- .../kie/kogito/service/FileServiceImpl.java | 2 +- .../kie/kogito/service/UploadServiceImpl.java | 4 +- .../kie/kogito/service/ZipServiceImpl.java | 2 +- .../Containerfile | 8 +- .../env/index.js | 2 +- .../pom.xml | 40 ++++---- .../sw/definition/DefinitionTests.java | 6 +- .../client/selenium/SWEditorSeleniumBase.java | 6 +- .../stunner-editors/errai-reflections/pom.xml | 7 -- .../editors/contextmenu/ContextMenuView.java | 14 ++- .../client/editors/drd/DRDContextMenu.java | 8 +- .../toolbox/DMNEditDRDToolboxActionTest.java | 12 --- .../contextmenu/ContextMenuViewTest.java | 15 +-- .../editors/drd/DRDContextMenuTest.java | 22 +---- .../client/common/DMNDesignerBaseIT.java | 4 +- .../client/common/wait/WaitUtils.java | 4 +- .../impl/SessionPresenterViewTest.java | 7 +- .../fields/model/AssignmentBaseTest.java | 19 ---- .../BPMNDesignerKogitoSeleniumIT.java | 7 +- .../client/selenium/JsCanvasDriver.java | 8 +- packages/stunner-editors/pom.xml | 96 +++++++++++++++---- .../pfly/tab/TabPanelWithDropdownsTest.java | 4 +- .../pom.xml | 2 +- .../pom.xml | 6 +- pnpm-lock.yaml | 57 ++--------- repo/build-dependencies-versions.json | 4 +- 65 files changed, 433 insertions(+), 344 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.staging-build b/.ci/jenkins/Jenkinsfile.staging-build index 5b9d6df580d..5f5ac836221 100644 --- a/.ci/jenkins/Jenkinsfile.staging-build +++ b/.ci/jenkins/Jenkinsfile.staging-build @@ -626,23 +626,25 @@ pipeline { } } - stage('Build (dev-deployment-base-image)') { + stage('Build (dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app-image)') { steps { dir('kie-tools') { script { buildDevDeploymentBaseImage() + buildDevDeploymentKogitoQuarkusBlankAppImage() } } } } - stage('STAGING: Push dev-deployment-base-image to quay.io') { + stage('STAGING: Push dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app-image to quay.io') { when { expression { !params.DRY_RUN } } steps { script { pushDevDeploymentBaseImageToQuay() + pushDevDeploymentKogitoQuarkusBlankAppImageToQuay() } } } @@ -668,27 +670,6 @@ pipeline { } } - stage('Build (dev-deployment-kogito-quarkus-blank-app-image)') { - steps { - dir('kie-tools') { - script { - buildDevDeploymentKogitoQuarkusBlankAppImage() - } - } - } - } - - stage('STAGING: Push dev-deployment-kogito-quarkus-blank-app-image to quay.io') { - when { - expression { !params.DRY_RUN } - } - steps { - script { - pushDevDeploymentKogitoQuarkusBlankAppImageToQuay() - } - } - } - stage('Build (serverless-logic-web-tools-base-builder-image)') { steps { dir('kie-tools') { diff --git a/.ci/kie-tools-ci-build.Dockerfile b/.ci/kie-tools-ci-build.Dockerfile index 882285505da..dc68123d9d2 100644 --- a/.ci/kie-tools-ci-build.Dockerfile +++ b/.ci/kie-tools-ci-build.Dockerfile @@ -23,7 +23,7 @@ libxi6 \ libnss3 \ libgconf-2-4 \ libpci-dev \ -openjdk-11-jdk \ +openjdk-17-jdk \ git \ jq \ vim \ @@ -44,7 +44,7 @@ RUN wget -O /tmp/firefox-latest.tar.bz2 "https://download.mozilla.org/?product=f # Install chromedriver RUN CHROME_VERSION=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json | jq -r .channels.Stable.version) && \ - wget -O /tmp/chromedriver-linux64.zip https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_VERSION/linux64/chromedriver-linux64.zip && \ + wget -O /tmp/chromedriver-linux64.zip https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chromedriver-linux64.zip && \ unzip /tmp/chromedriver-linux64.zip -d /tmp && mv /tmp/chromedriver-linux64/chromedriver /usr/bin/ && \ rm /tmp/chromedriver-linux64.zip @@ -75,9 +75,9 @@ RUN bash -c 'source $HOME/.nvm/nvm.sh && \ npm install -g pnpm@8.7.0' # Maven setup -RUN wget https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz -P /tmp && \ - sudo tar xzf /tmp/apache-maven-3.8.6-bin.tar.gz -C /opt && rm /tmp/apache-maven-3.8.6-bin.tar.gz && \ - sudo ln -s /opt/apache-maven-3.8.6 /opt/maven && \ +RUN wget https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -P /tmp && \ + sudo tar xzf /tmp/apache-maven-3.9.6-bin.tar.gz -C /opt && rm /tmp/apache-maven-3.9.6-bin.tar.gz && \ + sudo ln -s /opt/apache-maven-3.9.6 /opt/maven && \ echo 'export M2_HOME=/opt/maven' | sudo tee -a /etc/profile.d/maven.sh && \ echo 'export MAVEN_HOME=${M2_HOME}' | sudo tee -a /etc/profile.d/maven.sh && \ echo 'export PATH=${M2_HOME}/bin:${PATH}' | sudo tee -a /etc/profile.d/maven.sh && \ @@ -106,7 +106,7 @@ RUN wget https://get.helm.sh/helm-v3.13.3-linux-amd64.tar.gz -P /tmp && \ sudo tar -C /usr/bin/ -zxvf /tmp/helm-v3.13.3-linux-amd64.tar.gz linux-amd64/helm --strip-components 1 && rm /tmp/helm-v3.13.3-linux-amd64.tar.gz # Env vars -ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" +ENV JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" ENV DISPLAY=":99" ENV NODE_OPTIONS="--max_old_space_size=4096" diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml index bdbc9172d95..95cc66b252f 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup-env/action.yml @@ -52,10 +52,10 @@ runs: with: node-version: 18.14.0 - - name: "Setup JDK 11" + - name: "Setup JDK 17" uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: "zulu" - name: "Set up GOLANG 1.21.5" @@ -66,7 +66,7 @@ runs: - name: "Set up Maven" uses: stCarolas/setup-maven@v4.5 with: - maven-version: 3.8.6 + maven-version: 3.9.6 - name: Setup docker (macOS only) if: runner.os == 'macOS' diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 944bbfb9595..dd4fddb6d93 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -97,12 +97,13 @@ jobs: START_SERVER_AND_TEST_INSECURE: "true" NODE_OPTIONS: "--max_old_space_size=4096" run: >- - pnpm - -F='!@kie-tools/serverless-logic-web-tools-swf-dev-mode-image' + pnpm + -F='!@kie-tools/serverless-logic-web-tools-swf-dev-mode-image' -F='!@kie-tools/dev-deployment-base-image' + -F='!@kie-tools/dev-deployment-kogito-quarkus-blank-app-image' -F='!@kie-tools/dev-deployment-dmn-form-webapp-image' - -F='!@kie-tools/serverless-logic-web-tools-base-builder-image' - -F='!@kie-tools/dashbuilder-viewer-image' + -F='!@kie-tools/serverless-logic-web-tools-base-builder-image' + -F='!@kie-tools/dashbuilder-viewer-image' -r --workspace-concurrency=1 build:prod - name: "FULL → Build → serverless-logic-web-tools-swf-dev-mode-image" @@ -122,7 +123,7 @@ jobs: echo "Build @kie-tools/serverless-logic-web-tools-swf-dev-mode-image" pnpm -F @kie-tools/serverless-logic-web-tools-swf-dev-mode-image... --workspace-concurrency=1 build:prod - - name: "FULL → Build → dev-deployment-base-image" + - name: "FULL → Build → dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app" if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' env: KIE_TOOLS_BUILD__runTests: "true" @@ -137,7 +138,7 @@ jobs: podman system prune --all --force fi echo "Build @kie-tools/dev-deployment-base-image" - pnpm -F @kie-tools/dev-deployment-base-image... --workspace-concurrency=1 build:prod + pnpm -F @kie-tools/dev-deployment-base-image... -F @kie-tools/dev-deployment-kogito-quarkus-blank-app... --workspace-concurrency=1 build:prod - name: "FULL → Build → dev-deployment-dmn-form-webapp-image" if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' diff --git a/README.md b/README.md index e06412ca67e..9c9d76210bc 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ To start building the Apache KIE Tools project, you're going to need: - Node `18` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_ - pnpm `8.7.0` _(To install, follow these instructions: https://pnpm.io/installation)_ -- Maven `3.8.6` -- Java `11` +- Maven `3.9.6` +- Java `17` - Go `1.21.5` _(To install, follow these instructions: https://go.dev/doc/install)_ - Helm `3.13.3` _(To install, follow these instructions: https://helm.sh/docs/intro/install/)_ diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java index e27b3025f32..ec730a9d6fe 100644 --- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java +++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java @@ -129,8 +129,8 @@ public void testInsertTabAndContent() { final TabPane tabContentPane = mock(TabPane.class); final NavTabs tabBar = mock(NavTabs.class); final TabContent tabContent = mock(TabContent.class); - final Set allContentTabs = spy(new HashSet<>()); - final Set activatableWidgets = spy(new HashSet<>()); + final Set allContentTabs = mock(Set.class); + final Set activatableWidgets = mock(Set.class); doReturn(tabWidget).when(tab).getTabWidget(); doReturn(tabContentPane).when(tab).getContentPane(); diff --git a/packages/dashbuilder/dashbuilder-runtime-parent/dashbuilder-runtime-client/pom.xml b/packages/dashbuilder/dashbuilder-runtime-parent/dashbuilder-runtime-client/pom.xml index db9566d743d..c85da13486d 100644 --- a/packages/dashbuilder/dashbuilder-runtime-parent/dashbuilder-runtime-client/pom.xml +++ b/packages/dashbuilder/dashbuilder-runtime-parent/dashbuilder-runtime-client/pom.xml @@ -407,7 +407,14 @@ -Ddashbuilder.kieserver.serverTemplate.sample-server.password=kieserver1! -Ddashbuilder.kieserver.defaultServerTemplate=default -Ddashbuilder.kieserver.serverTemplate.sample-server.replace_query=true - -Ddashbuilder.dev=true + -Ddashbuilder.dev=true + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.lang.reflect=ALL-UNNAMED + --add-opens java.base/java.time=ALL-UNNAMED + --add-opens java.base/java.time.format=ALL-UNNAMED + --add-opens java.base/java.text=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + false diff --git a/packages/dashbuilder/pom.xml b/packages/dashbuilder/pom.xml index cc440d605c5..0c3482857b3 100644 --- a/packages/dashbuilder/pom.xml +++ b/packages/dashbuilder/pom.xml @@ -58,7 +58,7 @@ 1.0.0.GA - 4.13.1 + 4.13.2 3.14.0 3.6.0 7.59.0.Final @@ -78,7 +78,7 @@ 4.1.59.Final 1.1.0 3.3.3 - 2.3.30 + 2.3.32 1.2.2 1.0.0 2.0.0 @@ -100,10 +100,10 @@ 2.22.2 ${version.surefire.plugin} 3.0.0 - 2.22.2 + 3.2.5 3.0.0-M3 3.1.0 - 3.8.1 + 3.12.1 3.2.0 3.2.3 3.1.1 @@ -112,6 +112,7 @@ 3.8.2 1.8 3.0.0 + 3.1.2 java - 3.1.2 diff --git a/packages/dev-deployment-base-image/Containerfile b/packages/dev-deployment-base-image/Containerfile index ef4463e3a80..d8a444c002b 100644 --- a/packages/dev-deployment-base-image/Containerfile +++ b/packages/dev-deployment-base-image/Containerfile @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -# Defaults to registry.access.redhat.com/ubi9/openjdk-11 (check env/index.js) +# Defaults to registry.access.redhat.com/ubi9/openjdk-17 (check env/index.js) ARG BUILDER_IMAGE_ARG FROM --platform=linux/amd64 ${BUILDER_IMAGE_ARG} @@ -23,16 +23,21 @@ FROM --platform=linux/amd64 ${BUILDER_IMAGE_ARG} ENV DEV_DEPLOYMENT__UPLOAD_SERVICE_EXTRACT_TO_DIR=$HOME/app ENV DEV_DEPLOYMENT__UPLOAD_SERVICE_PORT=8080 -USER 1000 +RUN mkdir -p -m 777 $HOME/app && mkdir -p -m 777 /tmp/app -RUN mkdir -p -m 777 $HOME/app +COPY dist-dev/dev-deployment-upload-service /usr/local/bin -COPY --chown=1000:1000 dist-dev/dev-deployment-upload-service /usr/local/bin +USER root + +RUN chgrp -R 0 $HOME/app && \ + chmod -R 777 $HOME/app WORKDIR $HOME/app/ EXPOSE 8080 +USER 185 + ENTRYPOINT ["/bin/bash", "-c"] CMD ["dev-deployment-upload-service && pwd && ls -la"] diff --git a/packages/dev-deployment-base-image/README.md b/packages/dev-deployment-base-image/README.md index ef964fbe3ab..30c0e6c4fb4 100644 --- a/packages/dev-deployment-base-image/README.md +++ b/packages/dev-deployment-base-image/README.md @@ -4,7 +4,7 @@ Docker image with Java and Maven, as well as the dev-deployment-upload-service b ## Build arguments -- `BUILDER_IMAGE_ARG`: The base image used for building this image (defaults to `registry.access.redhat.com/ubi9/openjdk-11:1.17`). +- `BUILDER_IMAGE_ARG`: The base image used for building this image (defaults to `registry.access.redhat.com/ubi9/openjdk-17:1.18`). ## Environment variables diff --git a/packages/dev-deployment-base-image/env/index.js b/packages/dev-deployment-base-image/env/index.js index 49f4a819153..3f8b0d48b56 100644 --- a/packages/dev-deployment-base-image/env/index.js +++ b/packages/dev-deployment-base-image/env/index.js @@ -22,7 +22,7 @@ const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/b module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ DEV_DEPLOYMENT_BASE_IMAGE__builderImage: { - default: "registry.access.redhat.com/ubi9/openjdk-11:1.17", + default: "registry.access.redhat.com/ubi9/openjdk-17:1.18", description: "The image used in the FROM import.", }, DEV_DEPLOYMENT_BASE_IMAGE__registry: { diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile b/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile index 02c9c48fe24..7612658158b 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile @@ -24,15 +24,15 @@ ENV ROOT_PATH="" ENV DEV_DEPLOYMENT__UPLOAD_SERVICE_EXTRACT_TO_DIR=$HOME/app/src/main/resources ENV DEV_DEPLOYMENT__UPLOAD_SERVICE_PORT=8080 -USER 1000 +COPY --chown=185:185 dist-dev/quarkus-app $HOME/app/ -COPY --chown=1000:1000 --chmod=777 dist-dev/quarkus-app $HOME/app/ +RUN ./mvnw dependency:go-offline -Dmaven.repo.local=/tmp/kogito/.m2/repository && ./mvnw clean package -B -ntp -Dmaven.test.skip -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH} \ + && chgrp -R 0 $HOME/app && chmod -R g=u $HOME/app && chgrp -R 0 /tmp/kogito && chmod -R g=u /tmp/kogito -RUN ./mvnw clean package -B -ntp -Dmaven.test.skip -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH} \ - && chmod -R 777 /tmp/kogito/ && chmod -R 777 $HOME/app +USER 185 EXPOSE 8080 ENTRYPOINT ["/bin/bash", "-c"] -CMD ["dev-deployment-upload-service && ./mvnw quarkus:dev -Ddebug=false -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH}"] +CMD ["dev-deployment-upload-service && cp -r $HOME/app/. /tmp/app && cd /tmp/app && ./mvnw quarkus:dev -Ddebug=false -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH}"] diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/README.md b/packages/dev-deployment-kogito-quarkus-blank-app-image/README.md index 0aa0317d790..334169ca607 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/README.md +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/README.md @@ -23,3 +23,13 @@ These files can decisions or processes, all of them will be used as resources fo ### Optional - `DEV_DEPLOYMENT__UPLOAD_SERVICE_ROOT_PATH`: If the Upload Service is not running in the root path of the URL, this variable should be specified. (Usually follows the same value as `ROOT_PATH`). + +## Test locally + +Run the image with: + +- `docker run -p 8080:8080 -e DEV_DEPLOYMENT__UPLOAD_SERVICE_API_KEY=123 quay.io/kie-tools/dev-deployment-kogito-quarkus-blank-app-image:latest` + +Then upload a zip file containing the resources (DMN, BPMN, etc) + +- `curl -X POST -H "Content-Type: multipart/form-data" -F "myFile=@" http://localhost:8080/upload?apiKey=123` diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index 64b8a38c345..c67a6f58ec3 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -27,15 +27,45 @@ dev-deployment-kogito-quarkus-blank-app ${revision} + + + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + + + apache-public-repository-group + Apache Public Repository Group + https://repository.apache.org/content/groups/public/ + + true + never + + + true + daily + + + + - 3.8.1 + 3.12.1 true - 11 - 11 + 17 + 17 UTF-8 UTF-8 - 3.0.0-M5 - 4.13.1 + 3.2.5 + 4.13.2 @@ -48,18 +78,16 @@ import - io.quarkus.platform - quarkus-kogito-bom - ${quarkus.platform.version} + org.kie.kogito + kogito-kie-bom + ${version.org.kie.kogito} pom import org.kie.kogito - kogito-kie-bom + kogito-quarkus ${version.org.kie.kogito} - pom - import diff --git a/packages/dev-deployment-upload-service/package.json b/packages/dev-deployment-upload-service/package.json index e353539ea45..95afd3e580b 100644 --- a/packages/dev-deployment-upload-service/package.json +++ b/packages/dev-deployment-upload-service/package.json @@ -29,7 +29,9 @@ "start": "make start", "start-test-servers": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"node scripts/runTestServers.js\"", "stop-test-servers": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"node scripts/runTestServers.js --cleanup\"", - "test": "run-script-if --bool \"$(build-env containerImages.build)\" --bool \"$(build-env tests.run)\" --ignore-errors \"$(build-env tests.ignoreFailures)\" --then \"jest --verbose --silent=false\"" + "test": "run-script-os", + "test:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --bool \"$(build-env tests.run)\" --ignore-errors \"$(build-env tests.ignoreFailures)\" --then \"jest --verbose --silent=false\"", + "test:win32:darwin": "echo 'Not supported'" }, "devDependencies": { "@kie-tools/root-env": "workspace:*", diff --git a/packages/extended-services-java/pom.xml b/packages/extended-services-java/pom.xml index 16d7a067512..8027e91ee23 100644 --- a/packages/extended-services-java/pom.xml +++ b/packages/extended-services-java/pom.xml @@ -53,15 +53,45 @@ + + + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + + + apache-public-repository-group + Apache Public Repository Group + https://repository.apache.org/content/groups/public/ + + true + never + + + true + daily + + + + - 3.8.1 + 3.12.1 true - 11 - 11 + 17 + 17 UTF-8 UTF-8 - 3.0.0-M5 - 4.13.1 + 3.2.5 + 4.13.2 diff --git a/packages/extended-services-java/src/main/java/org/kie/tools/PingResource.java b/packages/extended-services-java/src/main/java/org/kie/tools/PingResource.java index 5187b49d274..e7893568981 100644 --- a/packages/extended-services-java/src/main/java/org/kie/tools/PingResource.java +++ b/packages/extended-services-java/src/main/java/org/kie/tools/PingResource.java @@ -19,12 +19,12 @@ package org.kie.tools; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; @Path("/ping") public class PingResource { diff --git a/packages/extended-services-java/src/main/java/org/kie/tools/PingResponse.java b/packages/extended-services-java/src/main/java/org/kie/tools/PingResponse.java index dc6208f6c9a..54e3168b4b1 100644 --- a/packages/extended-services-java/src/main/java/org/kie/tools/PingResponse.java +++ b/packages/extended-services-java/src/main/java/org/kie/tools/PingResponse.java @@ -23,8 +23,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import org.eclipse.microprofile.config.inject.ConfigProperty; - -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped @JsonPropertyOrder({ "version", "started" }) diff --git a/packages/extended-services-java/src/test/java/org/kie/tools/PingResourceTest.java b/packages/extended-services-java/src/test/java/org/kie/tools/PingResourceTest.java index 7734728d7fa..a16f05500c3 100644 --- a/packages/extended-services-java/src/test/java/org/kie/tools/PingResourceTest.java +++ b/packages/extended-services-java/src/test/java/org/kie/tools/PingResourceTest.java @@ -21,11 +21,8 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; - import org.eclipse.microprofile.config.inject.ConfigProperty; import org.junit.jupiter.api.Test; - - import javax.inject.Inject; - + import static io.restassured.RestAssured.given; import static org.hamcrest.Matchers.*; diff --git a/packages/extended-services-java/src/test/java/org/kie/tools/PingResponseTest.java b/packages/extended-services-java/src/test/java/org/kie/tools/PingResponseTest.java index e4395d0daac..17885e1fc13 100644 --- a/packages/extended-services-java/src/test/java/org/kie/tools/PingResponseTest.java +++ b/packages/extended-services-java/src/test/java/org/kie/tools/PingResponseTest.java @@ -20,10 +20,9 @@ package org.kie.tools; import io.quarkus.test.junit.QuarkusTest; - import org.eclipse.microprofile.config.inject.ConfigProperty; + import jakarta.inject.Inject; import org.junit.jupiter.api.Test; - import javax.inject.Inject; - + import static org.junit.jupiter.api.Assertions.assertEquals; @QuarkusTest diff --git a/packages/extended-services/package.json b/packages/extended-services/package.json index 92477a9bbcf..0311d431b1f 100644 --- a/packages/extended-services/package.json +++ b/packages/extended-services/package.json @@ -40,7 +40,7 @@ "start": "cross-env ENV=dev make start" }, "dependencies": { - "@kie-tools/jitexecutor-native": "1.44.1-Final" + "@kie-tools/jitexecutor-native": "999.0.0-20240218-SNAPSHOT" }, "devDependencies": { "@kie-tools/root-env": "workspace:*", diff --git a/packages/kie-sandbox-distribution/package.json b/packages/kie-sandbox-distribution/package.json index 5e4f20a821e..35158cf2cce 100644 --- a/packages/kie-sandbox-distribution/package.json +++ b/packages/kie-sandbox-distribution/package.json @@ -24,7 +24,7 @@ "install": "pnpm docker:create-env-file", "test": "run-script-os", "test:darwin:win32": "echo 'Testing kie-sandbox-distribution not supported'", - "test:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --bool \"$(build-env tests.run)\" --ignore-errors \"$(build-env tests.ignoreFailures)\" --then \"pnpm docker:start-no-pull\" \"sleep 240\" \"jest --silent --verbose\" \"pnpm docker:stop\"" + "test:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --bool \"$(build-env tests.run)\" --ignore-errors \"$(build-env tests.ignoreFailures)\" --then \"jest --verbose\"" }, "dependencies": { "@kie-tools/cors-proxy-image": "workspace:*", @@ -39,6 +39,7 @@ "node-fetch": "^3.3.1", "rimraf": "^3.0.2", "run-script-os": "^1.1.6", - "typescript": "^4.6.2" + "typescript": "^4.6.2", + "wait-on": "^7.2.0" } } \ No newline at end of file diff --git a/packages/kie-sandbox-distribution/tests/__snapshots__/integrationTest.test.js.snap b/packages/kie-sandbox-distribution/tests/__snapshots__/integrationTest.test.js.snap index 64cf03fa6f8..03df213aace 100644 --- a/packages/kie-sandbox-distribution/tests/__snapshots__/integrationTest.test.js.snap +++ b/packages/kie-sandbox-distribution/tests/__snapshots__/integrationTest.test.js.snap @@ -12,25 +12,51 @@ exports[`Test built images individually cors-proxy homepage 1`] = ` `; exports[`Test built images individually extended-services homepage 1`] = ` -" +" + - - + + + + - - Demo system
- -" + +" `; diff --git a/packages/kie-sandbox-distribution/tests/integrationTest.test.js b/packages/kie-sandbox-distribution/tests/integrationTest.test.js index 45b1932c7e5..798927b7d2d 100644 --- a/packages/kie-sandbox-distribution/tests/integrationTest.test.js +++ b/packages/kie-sandbox-distribution/tests/integrationTest.test.js @@ -17,13 +17,23 @@ * under the License. */ +const { execSync } = require("child_process"); const kieSandboxDistributionEnv = require("../env"); const env = kieSandboxDistributionEnv.env; const kieSandboxUrl = `http://127.0.0.1:${env.kieSandboxDistribution.kieSandbox.exposedPort}`; const corsProxyUrl = `http://127.0.0.1:${env.kieSandboxDistribution.corsProxy.exposedPort}`; const extendedServicesUrl = `http://127.0.0.1:${env.kieSandboxDistribution.extendedServices.exposedPort}`; -describe("Test built images individually", async () => { +describe("Test built images individually", () => { + beforeAll(() => { + execSync( + `pnpm docker:start-no-pull && wait-on -t 5m ${extendedServicesUrl}/ping && wait-on -t 5m ${corsProxyUrl}/ping && wait-on -t 5m ${kieSandboxUrl}`, + { stdio: "inherit" } + ); + }); + afterAll(() => { + execSync(`pnpm docker:stop`, { stdio: "inherit" }); + }); it("cors-proxy homepage", async () => { expect(await (await fetch(corsProxyUrl)).text()).toMatchSnapshot(); }); diff --git a/packages/kie-sandbox-extended-services-image/Containerfile b/packages/kie-sandbox-extended-services-image/Containerfile index c56b32f831a..2a0c5159edd 100644 --- a/packages/kie-sandbox-extended-services-image/Containerfile +++ b/packages/kie-sandbox-extended-services-image/Containerfile @@ -5,17 +5,17 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. +# under the License. -FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-11-runtime:1.16-3 +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.18 ARG EXTENDED_SERVICES_DEFAULT_HOST ARG EXTENDED_SERVICES_DEFAULT_PORT diff --git a/packages/kn-plugin-workflow/package.json b/packages/kn-plugin-workflow/package.json index 64716b531a4..7137755a3d3 100644 --- a/packages/kn-plugin-workflow/package.json +++ b/packages/kn-plugin-workflow/package.json @@ -22,7 +22,7 @@ "build:darwin:arm": "pnpm setup:env make build-darwin-arm64", "build:dev": "rimraf dist && pnpm build", "build:linux": "pnpm setup:env make build-linux-amd64", - "build:prod": "rimraf dist && run-script-os && pnpm test && pnpm test:e2e", + "build:prod": "rimraf dist && run-script-os && pnpm test", "build:prod:darwin": "rimraf dist && pnpm setup:env make build-all", "build:prod:linux": "rimraf dist && pnpm setup:env make build-all", "build:prod:win32": "rimraf dist && pnpm setup:env:win32 make build-all", diff --git a/packages/online-editor/src/devDeployments/services/deploymentOptions/kogitoQuarkusBlankApp/DeploymentYaml.ts b/packages/online-editor/src/devDeployments/services/deploymentOptions/kogitoQuarkusBlankApp/DeploymentYaml.ts index 2095e2cf6d0..b466859382c 100644 --- a/packages/online-editor/src/devDeployments/services/deploymentOptions/kogitoQuarkusBlankApp/DeploymentYaml.ts +++ b/packages/online-editor/src/devDeployments/services/deploymentOptions/kogitoQuarkusBlankApp/DeploymentYaml.ts @@ -43,6 +43,9 @@ spec: app: \${{ devDeployment.uniqueName }} deploymentconfig: \${{ devDeployment.uniqueName }} spec: + volumes: + - name: \${{ devDeployment.uniqueName }}-volume + emptyDir: {} containers: - name: \${{ devDeployment.uniqueName }} image: ${args.kogitoQuarkusBlankAppImageUrl} @@ -53,5 +56,8 @@ spec: env: - name: DEV_DEPLOYMENT__UPLOAD_SERVICE_API_KEY value: \${{ devDeployment.uploadService.apiKey }} + volumeMounts: + - mountPath: /tmp/app + name: \${{ devDeployment.uniqueName }}-volume `; } diff --git a/packages/root-env/env/index.js b/packages/root-env/env/index.js index 3ae77927d82..3e26c173707 100644 --- a/packages/root-env/env/index.js +++ b/packages/root-env/env/index.js @@ -51,11 +51,11 @@ module.exports = composeEnv([], { description: "Enables/disables building example packages during the build.", }, QUARKUS_PLATFORM_version: { - default: "2.16.11.Final", + default: "3.2.9.Final", description: "Quarkus version to be used on dependency declaration.", }, KOGITO_RUNTIME_version: { - default: "1.44.1.Final", + default: "999-20240218-SNAPSHOT", description: "Kogito version to be used on dependency declaration.", }, }), diff --git a/packages/serverless-logic-web-tools-base-builder-image/Containerfile b/packages/serverless-logic-web-tools-base-builder-image/Containerfile index bba2d2e03cb..d364f235805 100644 --- a/packages/serverless-logic-web-tools-base-builder-image/Containerfile +++ b/packages/serverless-logic-web-tools-base-builder-image/Containerfile @@ -5,19 +5,19 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. +# under the License. ARG KOGITO_IMAGE_TAG -FROM --platform=linux/amd64 quay.io/kiegroup/kogito-base-builder:$KOGITO_IMAGE_TAG +FROM --platform=linux/amd64 quay.io/kiegroup/kogito-base-builder-nightly:$KOGITO_IMAGE_TAG ARG KUBECTL_VERSION diff --git a/packages/serverless-logic-web-tools-base-builder-image/env/index.js b/packages/serverless-logic-web-tools-base-builder-image/env/index.js index cd1b6c99c7f..5ead2bbc325 100644 --- a/packages/serverless-logic-web-tools-base-builder-image/env/index.js +++ b/packages/serverless-logic-web-tools-base-builder-image/env/index.js @@ -32,7 +32,7 @@ module.exports = composeEnv( description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: { - default: "1.42", + default: "main-2024-02-18", description: "", }, }), diff --git a/packages/serverless-logic-web-tools-swf-builder-image/env/index.js b/packages/serverless-logic-web-tools-swf-builder-image/env/index.js index b805517a6d2..0ebb0de86a8 100644 --- a/packages/serverless-logic-web-tools-swf-builder-image/env/index.js +++ b/packages/serverless-logic-web-tools-swf-builder-image/env/index.js @@ -28,7 +28,7 @@ module.exports = composeEnv( description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderKogitoImageTag: { - default: "1.42", + default: "latest", description: "", }, }), diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/env/index.js b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/env/index.js index 78a072250de..d9af52fe321 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/env/index.js +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/env/index.js @@ -22,11 +22,11 @@ const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/b module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ SERVERLESS_LOGIC_WEB_TOOLS__quarkusPlatformVersion: { - default: "2.16.9.Final", + default: "3.2.9.Final", description: "Quarkus platform version", }, SERVERLESS_LOGIC_WEB_TOOLS__kogitoVersion: { - default: "1.42.0.Final", + default: "999-20240218-SNAPSHOT", description: "Kogito version", }, }), diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml index 7e29737a666..bf02272e71d 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml @@ -28,22 +28,49 @@ ${revision} - 3.8.1 + 3.12.1 false - 11 + 17 UTF-8 UTF-8 quarkus-bom - io.quarkus.platform + io.quarkus org.kie.kogito kogito-bom - 2.1.12 + 2.1.20 1.24.0 1.14.2 - 3.0.0-M7 + 3.2.5 + + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + + + apache-public-repository-group + Apache Public Repository Group + https://repository.apache.org/content/groups/public/ + + true + never + + + true + daily + + jboss-public-repository-group JBoss Public Repository Group diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/AppStartup.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/AppStartup.java index 098379795b1..b8261afdf94 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/AppStartup.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/AppStartup.java @@ -23,9 +23,9 @@ import java.io.File; import java.io.IOException; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import io.quarkus.runtime.Startup; import org.apache.commons.io.FileUtils; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/HotReloadResource.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/HotReloadResource.java index 3515cea79bb..73e91a6b24f 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/HotReloadResource.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/HotReloadResource.java @@ -26,14 +26,14 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.json.Json; -import javax.json.JsonObject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.jboss.logging.Logger; import org.jboss.resteasy.annotations.providers.multipart.MultipartForm; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/StaticContentCachingFilter.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/StaticContentCachingFilter.java index 4a608550a2a..a6531e1d752 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/StaticContentCachingFilter.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/StaticContentCachingFilter.java @@ -22,8 +22,8 @@ import java.util.regex.Pattern; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import io.quarkus.vertx.http.runtime.filters.Filters; import io.vertx.core.Handler; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/LivenessHealthCheck.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/LivenessHealthCheck.java index f3797227760..4df7dd3dc44 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/LivenessHealthCheck.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/LivenessHealthCheck.java @@ -20,7 +20,7 @@ package org.kie.kogito.health; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/ReadinessHealthCheck.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/ReadinessHealthCheck.java index 6ef19df9d3d..1d6a2eda5dc 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/ReadinessHealthCheck.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/ReadinessHealthCheck.java @@ -20,7 +20,7 @@ package org.kie.kogito.health; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/StartupHealthCheck.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/StartupHealthCheck.java index aa88e071129..f3762c2c7e4 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/StartupHealthCheck.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/health/StartupHealthCheck.java @@ -20,7 +20,7 @@ package org.kie.kogito.health; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/FileServiceImpl.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/FileServiceImpl.java index d5d1a8c320d..6903a593364 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/FileServiceImpl.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/FileServiceImpl.java @@ -36,7 +36,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.commons.io.FileUtils; import org.jboss.logging.Logger; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/UploadServiceImpl.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/UploadServiceImpl.java index 87e34c49461..b0afa091762 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/UploadServiceImpl.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/UploadServiceImpl.java @@ -31,8 +31,8 @@ import java.util.function.Function; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.jboss.logging.Logger; import org.kie.kogito.FileStructureConstants; diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/ZipServiceImpl.java b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/ZipServiceImpl.java index acbec3a27a2..7e2bd798476 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/ZipServiceImpl.java +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/java/org/kie/kogito/service/ZipServiceImpl.java @@ -29,7 +29,7 @@ import java.util.Enumeration; import java.util.List; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipFile; diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile b/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile index 5cb7f507ffe..3dd710cbaff 100644 --- a/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile @@ -5,19 +5,19 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. +# under the License. ARG KOGITO_IMAGE_TAG -FROM --platform=linux/amd64 quay.io/kiegroup/kogito-base-builder:$KOGITO_IMAGE_TAG +FROM --platform=linux/amd64 quay.io/kiegroup/kogito-base-builder-nightly:$KOGITO_IMAGE_TAG ENV PATH="${PATH}:/usr/share/maven/bin" diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js b/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js index b7a9de4268f..052b9572e02 100644 --- a/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js @@ -28,7 +28,7 @@ module.exports = composeEnv( description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeKogitoImageTag: { - default: "1.42", + default: "main-2024-02-18", description: "", }, }), diff --git a/packages/serverless-workflow-diagram-editor/pom.xml b/packages/serverless-workflow-diagram-editor/pom.xml index 7bf01c54b15..8df5ad70ec7 100644 --- a/packages/serverless-workflow-diagram-editor/pom.xml +++ b/packages/serverless-workflow-diagram-editor/pom.xml @@ -209,8 +209,8 @@ 8.29 - 1.8 - 1.8 + 8 + 8 ${maven.compiler.target} ${maven.compiler.source} UTF-8 @@ -227,25 +227,25 @@ 3.3.0 3.2.0 3.1.0 - 3.10.1 + 3.12.1 3.3.0 2.8.2 3.1.0 ${version.surefire.plugin} 2.5.2 - 0.8.5 + 0.8.11 3.1.0 1.5 3.0.1 1.3 1.5.2 - 3.1.0 + 3.2.0 3.2.1 3.7.1 3.1.8 3.9.1.2184 3.0.1 - 2.22.2 + 3.2.5 3.2.2 2.3.0 0.21.0 @@ -264,7 +264,7 @@ 1.7.4 1.3.2 2.0.SP1 - 1.10.3 + 1.14.12 0.9.21 4.8.2 1.1.12 @@ -273,11 +273,11 @@ 2.3 1.0 2.9.0 - 2.3.31 + 2.3.32 3.0.0 4.0 3.26.0-GA - 3.13.0 + 4.18.1 2.3.5 2.0.0 0.4.1 - 5.5.3 + 5.7.0 4.13.2 3.22.0 1.1.9 @@ -312,14 +312,10 @@ - - org.jboss.arquillian.selenium - selenium-bom - ${version.org.jboss.arquillian.selenium} - pom - import + org.seleniumhq.selenium + selenium-java + ${version.org.seleniumhq.selenium} @@ -1638,7 +1634,15 @@ org/drools/workbench/**/*IntegrationTest.java org/drools/workbench/**/*IT.java - -Dfile.encoding=${project.build.sourceEncoding} + + -Dfile.encoding=${project.build.sourceEncoding} + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.lang.reflect=ALL-UNNAMED + --add-opens java.base/java.time=ALL-UNNAMED + --add-opens java.base/java.time.format=ALL-UNNAMED + --add-opens java.base/java.text=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + diff --git a/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-api/src/test/java/org/kie/workbench/common/stunner/sw/definition/DefinitionTests.java b/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-api/src/test/java/org/kie/workbench/common/stunner/sw/definition/DefinitionTests.java index 35d4b46adae..b8b42c11a99 100644 --- a/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-api/src/test/java/org/kie/workbench/common/stunner/sw/definition/DefinitionTests.java +++ b/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-api/src/test/java/org/kie/workbench/common/stunner/sw/definition/DefinitionTests.java @@ -70,8 +70,6 @@ public class DefinitionTests { private static final String DIAGRAM_PANEL = "root-container"; private static final String CANVAS_PANEL = "canvas-panel"; - private static final Boolean HEADLESS = Boolean.valueOf(System.getProperty("org.kie.sw.editor.browser.headless")); - /** * Selenium web driver */ @@ -85,7 +83,7 @@ public static void setupClass() { @Before public void openSWEditor() { final FirefoxOptions firefoxOptions = new FirefoxOptions(); - firefoxOptions.setHeadless(HEADLESS); + firefoxOptions.addArguments("--headless"); driver = new FirefoxDriver(firefoxOptions); driver.manage().window().maximize(); @@ -340,6 +338,6 @@ private ExpectedCondition element(final String xpathLocator, final S } private WebDriverWait waitOperation() { - return new WebDriverWait(driver, Duration.ofSeconds(2).getSeconds()); + return new WebDriverWait(driver, Duration.ofSeconds(2)); } } diff --git a/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-kogito-app/src/test/java/org/kie/workbench/common/stunner/sw/client/selenium/SWEditorSeleniumBase.java b/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-kogito-app/src/test/java/org/kie/workbench/common/stunner/sw/client/selenium/SWEditorSeleniumBase.java index 70040770fa6..155d7bbbaab 100644 --- a/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-kogito-app/src/test/java/org/kie/workbench/common/stunner/sw/client/selenium/SWEditorSeleniumBase.java +++ b/packages/serverless-workflow-diagram-editor/sw-editor/sw-editor-kogito-app/src/test/java/org/kie/workbench/common/stunner/sw/client/selenium/SWEditorSeleniumBase.java @@ -64,8 +64,6 @@ public class SWEditorSeleniumBase { private static final String DIAGRAM_PANEL = "root-container"; protected static final String CANVAS_PANEL = "canvas-panel"; - private static final Boolean HEADLESS = Boolean.valueOf(System.getProperty("org.kie.sw.editor.browser.headless")); - /** * Selenium web driver */ @@ -85,7 +83,7 @@ public void openSWEditor() { .usingAnyFreePort() .build(); ChromeOptions options = new ChromeOptions() - .setHeadless(HEADLESS); + .addArguments("--headless");; driver = new ChromeDriver(service, options); driver.manage().window().maximize(); @@ -147,6 +145,6 @@ protected ExpectedCondition element(final String xpathLocator, final } protected WebDriverWait waitOperation() { - return new WebDriverWait(driver, Duration.ofSeconds(10).getSeconds()); + return new WebDriverWait(driver, Duration.ofSeconds(10)); } } diff --git a/packages/stunner-editors/errai-reflections/pom.xml b/packages/stunner-editors/errai-reflections/pom.xml index 04281375ee5..bea0ab861d4 100644 --- a/packages/stunner-editors/errai-reflections/pom.xml +++ b/packages/stunner-editors/errai-reflections/pom.xml @@ -82,13 +82,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - UTF-8 - - org.apache.maven.plugins maven-surefire-plugin diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuView.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuView.java index d164d04f35f..71b3c9a4ab2 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuView.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuView.java @@ -31,6 +31,7 @@ import elemental2.dom.Element; import elemental2.dom.Event; import elemental2.dom.EventListener; +import elemental2.dom.HTMLDocument; import jsinterop.base.Js; import jsinterop.base.JsArrayLike; import org.jboss.errai.ui.shared.api.annotations.DataField; @@ -59,10 +60,10 @@ public void init(final ContextMenu presenter) { @PreDestroy private void removeDOMEventListeners() { - DomGlobal.document.removeEventListener(BrowserEvents.MOUSEDOWN, + getDocument().removeEventListener(BrowserEvents.MOUSEDOWN, hideContextMenuHandler, false); - DomGlobal.document.removeEventListener(BrowserEvents.MOUSEWHEEL, + getDocument().removeEventListener(BrowserEvents.MOUSEWHEEL, hideContextMenuHandler, false); } @@ -72,10 +73,10 @@ public void show() { listSelector.bind(this, 0, 0); listSelector.show(); - DomGlobal.document.addEventListener(BrowserEvents.MOUSEDOWN, + getDocument().addEventListener(BrowserEvents.MOUSEDOWN, hideContextMenuHandler, false); - DomGlobal.document.addEventListener(BrowserEvents.MOUSEWHEEL, + getDocument().addEventListener(BrowserEvents.MOUSEWHEEL, hideContextMenuHandler, false); } @@ -125,4 +126,9 @@ public void onItemSelected(final ListSelectorItem item) { ((ListSelectorTextItem) item).getCommand().execute(); hide(); } + + /* Indirection required by unit tests */ + protected HTMLDocument getDocument() { + return DomGlobal.document; + } } diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenu.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenu.java index 8cdc2d322a6..8ad00b4493f 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenu.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenu.java @@ -27,6 +27,7 @@ import javax.inject.Inject; import elemental2.dom.DomGlobal; +import elemental2.dom.HTMLBodyElement; import elemental2.dom.HTMLElement; import org.kie.workbench.common.dmn.api.property.dmn.Id; import org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramTuple; @@ -71,7 +72,12 @@ public void appendContextMenuToTheDOM(final double x, final double y) { contextMenuElement.style.position = "absolute"; contextMenuElement.style.left = x + "px"; contextMenuElement.style.top = y + "px"; - DomGlobal.document.body.appendChild(contextMenuElement); + getDocumentBody().appendChild(contextMenuElement); + } + + /* Indirection required by unit tests */ + protected HTMLBodyElement getDocumentBody() { + return DomGlobal.document.body; } public void show(final Collection, Edge>> selectedNodes) { diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/canvas/controls/toolbox/DMNEditDRDToolboxActionTest.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/canvas/controls/toolbox/DMNEditDRDToolboxActionTest.java index ab1a678d6c7..4b4fd79d3cb 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/canvas/controls/toolbox/DMNEditDRDToolboxActionTest.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/canvas/controls/toolbox/DMNEditDRDToolboxActionTest.java @@ -19,13 +19,10 @@ package org.kie.workbench.common.dmn.client.canvas.controls.toolbox; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; import java.util.Collection; import com.google.gwtmockito.GwtMockitoTestRunner; import elemental2.dom.CSSStyleDeclaration; -import elemental2.dom.DomGlobal; import elemental2.dom.HTMLBodyElement; import elemental2.dom.HTMLDocument; import elemental2.dom.HTMLElement; @@ -100,15 +97,6 @@ public void testOnMouseClick() throws NoSuchFieldException, IllegalAccessExcepti final HTMLDocument htmlDocument = new HTMLDocument(); htmlDocument.body = new HTMLBodyElement(); - final Field field = DomGlobal.class.getDeclaredField("document"); - field.setAccessible(true); - - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); - - field.set(DomGlobal.class, htmlDocument); - when(drdContextMenu.getElement()).thenReturn(htmlElement); dmnEditDRDToolboxAction.onMouseClick(canvasHandler, UUID, mouseClickEvent); diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuViewTest.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuViewTest.java index a2499ced185..5fb3f5c8e89 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuViewTest.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/contextmenu/ContextMenuViewTest.java @@ -19,14 +19,11 @@ package org.kie.workbench.common.dmn.client.editors.contextmenu; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.List; import elemental2.core.JsArray; -import elemental2.dom.DomGlobal; import elemental2.dom.Element; import elemental2.dom.Event; import elemental2.dom.EventTarget; @@ -58,17 +55,11 @@ public class ContextMenuViewTest { public void setUp() throws NoSuchFieldException, IllegalAccessException { presenter = mock(ContextMenu.class); listSelector = mock(ListSelector.class); - final Field field = DomGlobal.class.getDeclaredField("document"); - field.setAccessible(true); - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); - - field.set(DomGlobal.class, mock(HTMLDocument.class)); - - contextMenuView = new ContextMenuView(listSelector); + contextMenuView = spy(new ContextMenuView(listSelector)); contextMenuView.init(presenter); + + doReturn(mock(HTMLDocument.class)).when(contextMenuView).getDocument(); } @Test diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenuTest.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenuTest.java index c77d2378735..df853d67ab3 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenuTest.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/drd/DRDContextMenuTest.java @@ -20,7 +20,6 @@ package org.kie.workbench.common.dmn.client.editors.drd; import java.lang.reflect.Field; -import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -29,7 +28,6 @@ import com.google.gwtmockito.GwtMockitoTestRunner; import elemental2.dom.CSSStyleDeclaration; -import elemental2.dom.DomGlobal; import elemental2.dom.HTMLBodyElement; import elemental2.dom.HTMLDocument; import elemental2.dom.HTMLElement; @@ -53,8 +51,10 @@ import static org.kie.workbench.common.dmn.client.editors.drd.DRDContextMenu.DRDACTIONS_CONTEXT_MENU_TITLE; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.powermock.api.mockito.PowerMockito.when; @@ -93,7 +93,7 @@ public class DRDContextMenuTest { @Before public void setUp() { - drdContextMenu = new DRDContextMenu(contextMenu, translationService, drdContextMenuService, dmnDiagramsSession); + drdContextMenu = spy(new DRDContextMenu(contextMenu, translationService, drdContextMenuService, dmnDiagramsSession)); } @Test @@ -139,26 +139,14 @@ public void testContextMenuHandler() { @Test public void testAppendContextMenuToTheDOM() throws NoSuchFieldException, IllegalAccessException { when(contextMenu.getElement()).thenReturn(element); + doReturn(body).when(drdContextMenu).getDocumentBody(); final Field field = HTMLElement.class.getDeclaredField("style"); field.setAccessible(true); field.set(element, styleDeclaration); - final Field field2 = DomGlobal.class.getDeclaredField("document"); - field2.setAccessible(true); - - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field2, field2.getModifiers() & ~Modifier.FINAL); - - field2.set(DomGlobal.class, htmlDocument); - - final Field field3 = HTMLDocument.class.getDeclaredField("body"); - field3.setAccessible(true); - field3.set(htmlDocument, body); - drdContextMenu.appendContextMenuToTheDOM(10, 10); - verify(body).appendChild(Mockito.any()); + verify(body).appendChild(Mockito.any()); } } diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/DMNDesignerBaseIT.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/DMNDesignerBaseIT.java index f5d49b43ff3..c0c5a4d6738 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/DMNDesignerBaseIT.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/DMNDesignerBaseIT.java @@ -87,8 +87,6 @@ public class DMNDesignerBaseIT { private static final String INDEX_HTML_PATH = "file:///" + new File(INDEX_HTML).getAbsolutePath(); - private static final Boolean HEADLESS = Boolean.valueOf(System.getProperty("org.kie.dmn.kogito.browser.headless")); - private static final String SCREENSHOTS_DIR = System.getProperty("org.kie.dmn.kogito.screenshots.dir"); private WebDriver driver; @@ -118,7 +116,7 @@ public void openDMNDesigner() { private FirefoxOptions getFirefoxOptions() { final FirefoxOptions firefoxOptions = new FirefoxOptions(); - firefoxOptions.setHeadless(HEADLESS); + firefoxOptions.addArguments("--headless"); return firefoxOptions; } diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/wait/WaitUtils.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/wait/WaitUtils.java index 723ddc20aad..cb312b0f27a 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/wait/WaitUtils.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/common/wait/WaitUtils.java @@ -34,14 +34,14 @@ public class WaitUtils { - private WebDriver driver; + private final WebDriver driver; public WaitUtils(final WebDriver driver) { this.driver = driver; } private WebDriverWait waitOperation() { - return new WebDriverWait(driver, Duration.ofSeconds(10).getSeconds()); + return new WebDriverWait(driver, Duration.ofSeconds(10)); } public WebElement waitUntilElementIsVisible(final DMNDesignerLocator elementLocator, diff --git a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets/src/test/java/org/kie/workbench/common/stunner/client/widgets/presenters/session/impl/SessionPresenterViewTest.java b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets/src/test/java/org/kie/workbench/common/stunner/client/widgets/presenters/session/impl/SessionPresenterViewTest.java index 182c196b27b..1e8938bdc4c 100644 --- a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets/src/test/java/org/kie/workbench/common/stunner/client/widgets/presenters/session/impl/SessionPresenterViewTest.java +++ b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets/src/test/java/org/kie/workbench/common/stunner/client/widgets/presenters/session/impl/SessionPresenterViewTest.java @@ -21,7 +21,6 @@ package org.kie.workbench.common.stunner.client.widgets.presenters.session.impl; import java.lang.reflect.Field; -import java.lang.reflect.Modifier; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style; @@ -187,11 +186,7 @@ private static void setFinal(Object instance, Field field, Object newValue) throws Exception { field.setAccessible(true); - // remove final modifier from field - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, - field.getModifiers() & ~Modifier.FINAL); + field.set(instance, newValue); } diff --git a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/test/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/model/AssignmentBaseTest.java b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/test/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/model/AssignmentBaseTest.java index 05471881e04..edbf055e2eb 100644 --- a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/test/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/model/AssignmentBaseTest.java +++ b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/test/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/model/AssignmentBaseTest.java @@ -21,16 +21,12 @@ package org.kie.workbench.common.stunner.bpmn.client.forms.fields.model; import java.io.UnsupportedEncodingException; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; import java.net.URLDecoder; import java.net.URLEncoder; import com.google.gwt.junit.GWTMockUtilities; -import org.kie.workbench.common.stunner.bpmn.client.forms.fields.i18n.StunnerFormsClientFieldsConstants; import org.kie.workbench.common.stunner.bpmn.client.forms.util.StringUtils; import org.kie.workbench.common.stunner.bpmn.client.forms.util.URL; -import org.mockito.stubbing.Answer; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; @@ -42,11 +38,6 @@ public void setUp() throws Exception { // Prevent runtime GWT.create() error at DesignerEditorConstants.INSTANCE GWTMockUtilities.disarm(); // MockDesignerEditorConstants replaces DesignerEditorConstants.INSTANCE - final Answer answer = invocation -> invocation.getMethod().getName(); - final StunnerFormsClientFieldsConstants constants = mock(StunnerFormsClientFieldsConstants.class, - answer); - setFinalStaticField(StunnerFormsClientFieldsConstants.class.getDeclaredField("CONSTANTS"), - constants); // Prevent GWT calls in StringUtils URL url = mock(URL.class); @@ -99,14 +90,4 @@ public String urlDecode(String s) { } } - private void setFinalStaticField(Field field, - Object newValue) throws Exception { - field.setAccessible(true); - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, - field.getModifiers() & ~Modifier.FINAL); - field.set(null, - newValue); - } } diff --git a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/src/test/java/org/kie/workbench/common/stunner/kogito/client/selenium/BPMNDesignerKogitoSeleniumIT.java b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/src/test/java/org/kie/workbench/common/stunner/kogito/client/selenium/BPMNDesignerKogitoSeleniumIT.java index 91fede92c43..6970f970dd8 100644 --- a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/src/test/java/org/kie/workbench/common/stunner/kogito/client/selenium/BPMNDesignerKogitoSeleniumIT.java +++ b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/src/test/java/org/kie/workbench/common/stunner/kogito/client/selenium/BPMNDesignerKogitoSeleniumIT.java @@ -73,10 +73,7 @@ public class BPMNDesignerKogitoSeleniumIT { private static final String DIAGRAM_EXPLORER_EXPANDED = "expanded-docks-bar-E"; private static final String DIAGRAM_PANEL = "qe-static-workbench-panel-view"; private static final String EDITOR_CONTENT_HAS_NOT_BEEN_SET_HEADING = "//h1[@data-i18n-key='Editor_content_has_not_been_set.']"; - private static final String ERROR_MODAL_DIALOG = "//div[@class='modal-dialog']"; - private static final String ERROR_MODAL_BODY = "//div[@class='modal-body']"; private static final String PROCESS_NODE = "//div[@data-field='explorerPanelBody']//a[text()='%s']"; - private static final Boolean HEADLESS = Boolean.valueOf(System.getProperty("org.kie.bpmn.kogito.browser.headless")); private static final String SCREENSHOTS_DIR = System.getProperty("org.kie.bpmn.kogito.screenshots.dir"); /** @@ -102,7 +99,7 @@ public static void setupClass() { @Before public void openBPMNDesigner() { final FirefoxOptions firefoxOptions = new FirefoxOptions(); - firefoxOptions.setHeadless(HEADLESS); + firefoxOptions.addArguments("--headless"); driver = new FirefoxDriver(firefoxOptions); driver.manage().window().maximize(); @@ -300,6 +297,6 @@ private ExpectedCondition element(final String xpathLocator, final S } private WebDriverWait waitOperation() { - return new WebDriverWait(driver, Duration.ofSeconds(10).getSeconds()); + return new WebDriverWait(driver, Duration.ofSeconds(10)); } } diff --git a/packages/stunner-editors/lienzo-webapp/src/test/java/org/kie/lienzo/client/selenium/JsCanvasDriver.java b/packages/stunner-editors/lienzo-webapp/src/test/java/org/kie/lienzo/client/selenium/JsCanvasDriver.java index 3c253e7af0c..57847aa51c6 100644 --- a/packages/stunner-editors/lienzo-webapp/src/test/java/org/kie/lienzo/client/selenium/JsCanvasDriver.java +++ b/packages/stunner-editors/lienzo-webapp/src/test/java/org/kie/lienzo/client/selenium/JsCanvasDriver.java @@ -34,8 +34,6 @@ public class JsCanvasDriver extends JsCanvasExecutor { private static final String INDEX_HTML = "target/lienzo-webapp-0.0.0/LienzoShowcase.html"; private static final String INDEX_HTML_PATH = "file:///" + new File(INDEX_HTML).getAbsolutePath(); - private static final boolean HEADLESS = false; - private final WebDriver driver; // TODO: Refactor/remove use of loadTimeMillis by using selenium until conditions private long loadTimeMillis = 1000; @@ -56,7 +54,7 @@ public static JsCanvasDriver build() { public static JsCanvasDriver build(String url) { final FirefoxOptions firefoxOptions = new FirefoxOptions(); - firefoxOptions.setHeadless(HEADLESS); + firefoxOptions.addArguments("--headless"); WebDriver driver = new FirefoxDriver(firefoxOptions); driver.manage().window().maximize(); driver.get(url); @@ -80,10 +78,10 @@ public void closeTest() { } private WebDriverWait waitOperation(long seconds) { - return new WebDriverWait(driver, Duration.ofSeconds(seconds).getSeconds()); + return new WebDriverWait(driver, Duration.ofSeconds(seconds)); } private WebDriverWait waitAppLoaded() { - return new WebDriverWait(driver, Duration.ofSeconds(5).getSeconds()); + return new WebDriverWait(driver, Duration.ofSeconds(5)); } } diff --git a/packages/stunner-editors/pom.xml b/packages/stunner-editors/pom.xml index e1273052e33..f23c3ef603e 100644 --- a/packages/stunner-editors/pom.xml +++ b/packages/stunner-editors/pom.xml @@ -66,6 +66,33 @@ + + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + + + apache-public-repository-group + Apache Public Repository Group + https://repository.apache.org/content/groups/public/ + + true + never + + + true + daily + + jboss JBoss Public Repo @@ -124,6 +151,33 @@ + + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + + + apache-public-repository-group + Apache Public Repository Group + https://repository.apache.org/content/groups/public/ + + true + never + + + true + daily + + jboss JBoss Public Repo @@ -231,8 +285,8 @@ 8.29 - 1.8 - 1.8 + 8 + 8 ${maven.compiler.target} ${maven.compiler.source} UTF-8 @@ -249,30 +303,30 @@ 3.3.0 3.2.0 3.1.0 - 3.10.1 + 3.12.1 3.3.0 2.8.2 3.1.0 ${version.surefire.plugin} 2.5.2 - 0.8.5 + 0.8.11 3.1.0 1.5 0.15.1 1.3 1.5.2 - 3.1.0 + 3.2.0 3.2.1 3.7.1 3.1.8 3.9.1.2184 3.0.1 - 2.22.2 + 3.2.5 3.2.2 2.3.0 - 8.44.0.Final + 999-20240218-SNAPSHOT 1.3.0 @@ -287,20 +341,20 @@ 1.7.4 1.3.2 2.0.SP1 - 1.10.3 + 1.14.12 0.9.21 1.8.2 1.4 2.3 1.0 2.9.0 - 2.3.31 + 2.3.32 3.0.0 4.0 1.0.1 1.0.2 3.26.0-GA - 3.13.0 + 4.18.1 2.3.5 2.0.0 1.3 - 5.5.3 + 5.7.0 4.13.2 3.22.0 1.1.9 @@ -330,14 +384,10 @@ import - - org.jboss.arquillian.selenium - selenium-bom - ${version.org.jboss.arquillian.selenium} - pom - import + org.seleniumhq.selenium + selenium-java + ${version.org.seleniumhq.selenium} @@ -1516,7 +1566,15 @@ org/drools/workbench/**/*IntegrationTest.java org/drools/workbench/**/*IT.java - -Dfile.encoding=${project.build.sourceEncoding} + + -Dfile.encoding=${project.build.sourceEncoding} + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.lang.reflect=ALL-UNNAMED + --add-opens java.base/java.time=ALL-UNNAMED + --add-opens java.base/java.time.format=ALL-UNNAMED + --add-opens java.base/java.text=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + diff --git a/packages/stunner-editors/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java b/packages/stunner-editors/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java index 13df2a0ec3a..1f7e7f4ee0e 100644 --- a/packages/stunner-editors/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java +++ b/packages/stunner-editors/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/test/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdownsTest.java @@ -129,8 +129,8 @@ public void testInsertTabAndContent() { final TabPane tabContentPane = mock(TabPane.class); final NavTabs tabBar = mock(NavTabs.class); final TabContent tabContent = mock(TabContent.class); - final Set allContentTabs = spy(new HashSet<>()); - final Set activatableWidgets = spy(new HashSet<>()); + final Set allContentTabs = mock(Set.class); + final Set activatableWidgets = mock(Set.class); doReturn(tabWidget).when(tab).getTabWidget(); doReturn(tabContentPane).when(tab).getContentPane(); diff --git a/packages/vscode-java-code-completion-extension-plugin/pom.xml b/packages/vscode-java-code-completion-extension-plugin/pom.xml index 50c87b74ab5..0c2aaa8b2ee 100644 --- a/packages/vscode-java-code-completion-extension-plugin/pom.xml +++ b/packages/vscode-java-code-completion-extension-plugin/pom.xml @@ -46,7 +46,7 @@ -Xmx512m ${tycho.test.platformArgs} - 0.8.5 + 0.8.11 org.eclipse.jdt.ls.* reuseReports ${project.build.directory}/jacoco.exec diff --git a/packages/vscode-java-code-completion-extension-plugin/vscode-java-code-completion-extension-plugin-core/pom.xml b/packages/vscode-java-code-completion-extension-plugin/vscode-java-code-completion-extension-plugin-core/pom.xml index c8c78295c08..f81f92c0944 100644 --- a/packages/vscode-java-code-completion-extension-plugin/vscode-java-code-completion-extension-plugin-core/pom.xml +++ b/packages/vscode-java-code-completion-extension-plugin/vscode-java-code-completion-extension-plugin-core/pom.xml @@ -17,9 +17,9 @@ 2.3.32 - 3.23.1 - 5.9.1 - 4.8.0 + 3.25.3 + 5.10.2 + 4.11.0 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d7e12d7b12..3dea46698d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4200,8 +4200,8 @@ importers: packages/extended-services: dependencies: "@kie-tools/jitexecutor-native": - specifier: 1.44.1-Final - version: 1.44.1-Final + specifier: 999.0.0-20240218-SNAPSHOT + version: 999.0.0-20240218-SNAPSHOT devDependencies: "@kie-tools/root-env": specifier: workspace:* @@ -5660,6 +5660,9 @@ importers: typescript: specifier: ^4.6.2 version: 4.8.4 + wait-on: + specifier: ^7.2.0 + version: 7.2.0 packages/kie-sandbox-extended-services-image: dependencies: @@ -20746,23 +20749,11 @@ packages: graphql: 14.3.1 dev: true - /@hapi/hoek@9.1.0: - resolution: - { integrity: sha512-i9YbZPN3QgfighY/1X1Pu118VUz2Fmmhd6b2n0/O8YVgGGfw0FbUYoA97k7FkpGJ+pLCFEDLUmAPPV4D1kpeFw== } - dev: true - /@hapi/hoek@9.3.0: resolution: { integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== } dev: true - /@hapi/topo@5.0.0: - resolution: - { integrity: sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw== } - dependencies: - "@hapi/hoek": 9.1.0 - dev: true - /@hapi/topo@5.1.0: resolution: { integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== } @@ -21231,9 +21222,9 @@ packages: { integrity: sha512-dxmfwq2F+yxawuGrVVRGmTeZHTqRHa79Vp4FX2KEXHAA9AgK1aaVz8mxZxXYFs2ycfp30NjWvhZCOIRbIKTjAQ== } dev: false - /@kie-tools/jitexecutor-native@1.44.1-Final: + /@kie-tools/jitexecutor-native@999.0.0-20240218-SNAPSHOT: resolution: - { integrity: sha512-yf03B3gV7c3VATLKBmcZ2gavc8JyhCEarqsxIy8JhyF8sCTRIPLkFYIbLnW9kosucO36zLrggDZHzY3navC7GA== } + { integrity: sha512-sZiFV1tBngSZy6ksD0eue9T3JA4K+lfPNrtiQT9CjumwTlefPlPNNOhKXpsjt/LLyybRfJzFg01R2R3VVCWX2w== } dev: false /@koa/cors@3.4.3: @@ -23836,13 +23827,6 @@ packages: js-yaml: 4.1.0 dev: false - /@sideway/address@4.1.0: - resolution: - { integrity: sha512-wAH/JYRXeIFQRsxerIuLjgUu2Xszam+O5xKeatJ4oudShOOirfmsQ1D6LL54XOU2tizpCYku+s1wmU0SYdpoSA== } - dependencies: - "@hapi/hoek": 9.1.0 - dev: true - /@sideway/address@4.1.4: resolution: { integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== } @@ -23850,11 +23834,6 @@ packages: "@hapi/hoek": 9.3.0 dev: true - /@sideway/formula@3.0.0: - resolution: - { integrity: sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== } - dev: true - /@sideway/formula@3.0.1: resolution: { integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== } @@ -38256,17 +38235,6 @@ packages: "@sideway/pinpoint": 2.0.0 dev: true - /joi@17.4.0: - resolution: - { integrity: sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg== } - dependencies: - "@hapi/hoek": 9.1.0 - "@hapi/topo": 5.0.0 - "@sideway/address": 4.1.0 - "@sideway/formula": 3.0.0 - "@sideway/pinpoint": 2.0.0 - dev: true - /jose@4.14.6: resolution: { integrity: sha512-EqJPEUlZD0/CSUMubKtMaYUOtWe91tZXTWMJZoKSbLk+KtdhNdcvppH8lA9XwVu2V4Ailvsj0GBZJ2ZwDjfesQ== } @@ -39186,7 +39154,7 @@ packages: log-update: 4.0.0 p-map: 4.0.0 rfdc: 1.3.0 - rxjs: 7.5.6 + rxjs: 7.8.1 through: 2.3.8 wrap-ansi: 7.0.0 dev: true @@ -44588,13 +44556,6 @@ packages: dependencies: tslib: 2.3.1 - /rxjs@7.5.6: - resolution: - { integrity: sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== } - dependencies: - tslib: 2.6.2 - dev: true - /rxjs@7.8.1: resolution: { integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== } @@ -48157,7 +48118,7 @@ packages: hasBin: true dependencies: axios: 0.21.4(debug@4.3.1) - joi: 17.4.0 + joi: 17.12.0 lodash: 4.17.21 minimist: 1.2.8 rxjs: 6.6.7 diff --git a/repo/build-dependencies-versions.json b/repo/build-dependencies-versions.json index e52fac5ed24..3b7e9efc407 100644 --- a/repo/build-dependencies-versions.json +++ b/repo/build-dependencies-versions.json @@ -1,7 +1,7 @@ { "go": "1.21.5", - "java": "11", - "maven": "3.8.6", + "java": "17", + "maven": "3.9.6", "node": "18.14.0", "pnpm": "8.7.0" }