From df724a0aab90f14fff1865dec324734a819f2ba2 Mon Sep 17 00:00:00 2001 From: Thiago Lugli Date: Wed, 24 Apr 2024 01:36:04 -0300 Subject: [PATCH] NO-ISSUE: Fix Maven Wrapper version and install tar/gzip to dev-deployment-base-image (#2259) --- .../dev-deployment-base-image/Containerfile | 6 ++++- .../dev-deployment-base-image/package.json | 10 ++++---- .../package.json | 14 +++++------ .../package.json | 10 ++++---- packages/yard-model/package.json | 14 +++++------ packages/yard-validator-worker/package.json | 14 +++++------ packages/yard-validator/install.js | 25 ------------------- packages/yard-validator/package.json | 13 ++-------- pnpm-lock.yaml | 4 +-- 9 files changed, 40 insertions(+), 70 deletions(-) delete mode 100644 packages/yard-validator/install.js diff --git a/packages/dev-deployment-base-image/Containerfile b/packages/dev-deployment-base-image/Containerfile index 0a45fd702ef..bbdeed39045 100644 --- a/packages/dev-deployment-base-image/Containerfile +++ b/packages/dev-deployment-base-image/Containerfile @@ -31,7 +31,11 @@ USER root ENV DEV_DEPLOYMENT__UPLOAD_SERVICE_EXTRACT_TO_DIR=$HOME_PATH/app ENV DEV_DEPLOYMENT__UPLOAD_SERVICE_PORT=8080 -RUN mkdir -p -m 777 $HOME_PATH/app && mkdir -p -m 777 /tmp/app && mkdir -p -m 777 /.m2 +RUN microdnf install -y tar-2:1.34-6.el9_1.x86_64 gzip-1.12-1.el9.x86_64 \ + && microdnf clean all \ + && mkdir -p -m 777 $HOME_PATH/app \ + && mkdir -p -m 777 /tmp/app \ + && mkdir -p -m 777 /.m2 COPY dist-dev/dev-deployment-upload-service /usr/local/bin COPY .mvn $HOME_PATH/app/.mvn diff --git a/packages/dev-deployment-base-image/package.json b/packages/dev-deployment-base-image/package.json index 2cf3a0972c1..f231599bf82 100644 --- a/packages/dev-deployment-base-image/package.json +++ b/packages/dev-deployment-base-image/package.json @@ -13,8 +13,8 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm install:mvnw\" \"pnpm image:docker:build\"", - "build:prod": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm install:mvnw\" \"pnpm image:docker:build\"", + "build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:docker:build\"", + "build:prod": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:docker:build\"", "copy-assets": "rimraf dist-dev && pnpm copy-upload-service-assets", "copy-upload-service-assets": "run-script-os", "copy-upload-service-assets:linux:darwin": "mkdir -p ./dist-dev && cp -R ../dev-deployment-upload-service/dist/dev-deployment-upload-service-linux-amd64 ./dist-dev/dev-deployment-upload-service", @@ -25,10 +25,10 @@ "create-test-image:openshift": "kie-tools--image-builder openshift -r \"$(build-env devDeploymentBaseImage.registry)\" -a \"$(build-env devDeploymentBaseImage.account)\" -n \"$(build-env devDeploymentBaseImage.name)\" -t \"$(build-env devDeploymentBaseImage.tags)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentBaseImage.builderImage)\"", "image:docker:build": "kie-tools--image-builder build -r \"$(build-env devDeploymentBaseImage.registry)\" -a \"$(build-env devDeploymentBaseImage.account)\" -n \"$(build-env devDeploymentBaseImage.name)\" -t \"$(build-env devDeploymentBaseImage.tags)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentBaseImage.builderImage)\" --build-arg USER_ID_ARG=\"$(build-env devDeploymentBaseImage.userId)\" --build-arg HOME_PATH_ARG=\"$(build-env devDeploymentBaseImage.homePath)\"", "image:podman:build": "kie-tools--image-builder build -r \"$(build-env devDeploymentBaseImage.registry)\" -a \"$(build-env devDeploymentBaseImage.account)\" -n \"$(build-env devDeploymentBaseImage.name)\" -t \"$(build-env devDeploymentBaseImage.tags)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentBaseImage.builderImage)\" --build-arg USER_ID_ARG=\"$(build-env devDeploymentBaseImage.userId)\" --build-arg HOME_PATH_ARG=\"$(build-env devDeploymentBaseImage.homePath)\" -e podman", - "install": "node install.js", + "install": "node install.js && pnpm install:mvnw", "install:mvnw": "run-script-os", - "install:mvnw:darwin:linux": "mvn wrapper:wrapper", - "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", + "install:mvnw:darwin:linux": "mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper", + "install:mvnw:win32": "pnpm powershell \"mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper\"", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, "devDependencies": { diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/package.json b/packages/dev-deployment-kogito-quarkus-blank-app/package.json index 58f2c1f1aab..e87983b9d05 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/package.json +++ b/packages/dev-deployment-kogito-quarkus-blank-app/package.json @@ -14,15 +14,15 @@ }, "scripts": { "build:dev": "run-script-os", - "build:dev:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests", - "build:dev:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests\"", + "build:dev:darwin:linux": "mvn clean install -DskipTests", + "build:dev:win32": "pnpm powershell \"mvn clean install `-DskipTests\"", "build:prod": "pnpm lint && run-script-os", - "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", - "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "install": "node install.js && pnpm install:mvnw", "install:mvnw": "run-script-os", - "install:mvnw:darwin:linux": "mvn wrapper:wrapper", - "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", + "install:mvnw:darwin:linux": "mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper", + "install:mvnw:win32": "pnpm powershell \"mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper\"", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", "quarkus:dev": "run-script-os", diff --git a/packages/vscode-java-code-completion-extension-plugin/package.json b/packages/vscode-java-code-completion-extension-plugin/package.json index 639541c2b64..6b4faa0ec93 100644 --- a/packages/vscode-java-code-completion-extension-plugin/package.json +++ b/packages/vscode-java-code-completion-extension-plugin/package.json @@ -19,12 +19,12 @@ "index.d.ts" ], "scripts": { - "build:dev": "pnpm install:mvnw && mvn clean install -DskipTests", + "build:dev": "mvn clean install -DskipTests", "build:prod": "pnpm lint && run-script-os", - "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", - "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", - "install:mvnw": "mvn wrapper:wrapper -f ./", + "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "install": "node install.js && pnpm install:mvnw", + "install:mvnw": "mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper -f ./", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/yard-model/package.json b/packages/yard-model/package.json index 6c23d04b87f..e4713c997b5 100644 --- a/packages/yard-model/package.json +++ b/packages/yard-model/package.json @@ -15,15 +15,15 @@ }, "scripts": { "build:dev": "run-script-os", - "build:dev:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests", - "build:dev:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests\"", + "build:dev:darwin:linux": "mvn clean install -DskipTests", + "build:dev:win32": "pnpm powershell \"mvn clean install `-DskipTests\"", "build:prod": "pnpm lint && run-script-os", - "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", - "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "install": "node install.js && pnpm install:mvnw", "install:mvnw": "run-script-os", - "install:mvnw:darwin:linux": "mvn wrapper:wrapper", - "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", + "install:mvnw:darwin:linux": "mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper", + "install:mvnw:win32": "pnpm powershell \"mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper\"", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/yard-validator-worker/package.json b/packages/yard-validator-worker/package.json index f5e2fc2c08d..c6a4e4fba0e 100644 --- a/packages/yard-validator-worker/package.json +++ b/packages/yard-validator-worker/package.json @@ -15,16 +15,16 @@ }, "scripts": { "build:dev": "rimraf dist && run-script-os && pnpm copy:webworker", - "build:dev:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests", - "build:dev:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests\"", + "build:dev:darwin:linux": "mvn clean install -DskipTests", + "build:dev:win32": "pnpm powershell \"mvn clean install `-DskipTests\"", "build:prod": "pnpm lint && run-script-os && pnpm copy:webworker", - "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", - "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", "copy:webworker": "copyfiles -f target/worker/yard-validator-worker/yard-validator-worker.js dist", - "install": "node install.js", + "install": "node install.js && pnpm install:mvnw", "install:mvnw": "run-script-os", - "install:mvnw:darwin:linux": "mvn wrapper:wrapper", - "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", + "install:mvnw:darwin:linux": "mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper", + "install:mvnw:win32": "pnpm powershell \"mvn -e org.apache.maven.plugins:maven-wrapper-plugin:3.3.0:wrapper\"", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/yard-validator/install.js b/packages/yard-validator/install.js deleted file mode 100644 index 4247286a3fc..00000000000 --- a/packages/yard-validator/install.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * 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. - */ - -const buildEnv = require("./env"); -const { setup } = require("@kie-tools/maven-config-setup-helper"); - -setup(` - -Drevision=${buildEnv.env.yardValidator.version} -`); diff --git a/packages/yard-validator/package.json b/packages/yard-validator/package.json index ef41d51c611..12b0324a527 100644 --- a/packages/yard-validator/package.json +++ b/packages/yard-validator/package.json @@ -17,28 +17,19 @@ "build:dev": "rimraf dist && tsc -p tsconfig.json && pnpm copy:webworker", "build:prod": "pnpm lint && tsc -p tsconfig.json && pnpm copy:webworker", "copy:webworker": "copyfiles -f node_modules/@kie-tools/yard-validator-worker/dist/yard-validator-worker.js dist", - "install": "node install.js", - "install:mvnw": "run-script-os", - "lint": "echo 'Linting'", - "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" + "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"" }, "dependencies": { "@kie-tools-core/notifications": "workspace:*", "@kie-tools/yard-validator-worker": "workspace:*" }, "devDependencies": { - "@kie-tools/maven-config-setup-helper": "workspace:*", + "@kie-tools/eslint": "workspace:*", "@kie-tools/root-env": "workspace:*", "@kie-tools/tsconfig": "workspace:*", "copyfiles": "^2.4.1", "rimraf": "^3.0.2", "run-script-os": "^1.1.6", "typescript": "^4.6.2" - }, - "kieTools": { - "requiredPreinstalledCliCommands": [ - "java", - "mvn" - ] } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae763a7fcb5..5a86b6da345 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13003,9 +13003,9 @@ importers: specifier: workspace:* version: link:../yard-validator-worker devDependencies: - "@kie-tools/maven-config-setup-helper": + "@kie-tools/eslint": specifier: workspace:* - version: link:../maven-config-setup-helper + version: link:../eslint "@kie-tools/root-env": specifier: workspace:* version: link:../root-env