diff --git a/examples/drools-process-usertasks-quarkus-example/pom.xml b/examples/drools-process-usertasks-quarkus-example/pom.xml index 580a1a03ca8..4b3b51c12f3 100644 --- a/examples/drools-process-usertasks-quarkus-example/pom.xml +++ b/examples/drools-process-usertasks-quarkus-example/pom.xml @@ -29,7 +29,10 @@ ${revision} ./node_modules/@kie-tools/maven-base/pom.xml + drools-process-usertasks-quarkus-example + ${revision} + Kie-Tools Example :: Process with Usertasks Quarkus Kogito user tasks orchestration - Quarkus @@ -76,10 +79,10 @@ - kie-tools--maven-profile--1st-party-dependencies + include-1st-party-dependencies - ignore--kie-tools--maven-profile--1st-party-dependencies + kieTools.do-not-use-this-property.ignore1stPartyDependencies !true diff --git a/examples/jbpm-compact-architecture-example/pom.xml b/examples/jbpm-compact-architecture-example/pom.xml index bada056fa02..5833408659e 100644 --- a/examples/jbpm-compact-architecture-example/pom.xml +++ b/examples/jbpm-compact-architecture-example/pom.xml @@ -31,6 +31,8 @@ jbpm-compact-architecture-quarkus-example + ${revision} + Kie-Tools Example :: jBPM Compact Architecture Quarkus Example diff --git a/examples/sonataflow-greeting-quarkus-example/pom.xml b/examples/sonataflow-greeting-quarkus-example/pom.xml index 01422e126c2..b6a7519cb30 100644 --- a/examples/sonataflow-greeting-quarkus-example/pom.xml +++ b/examples/sonataflow-greeting-quarkus-example/pom.xml @@ -116,10 +116,10 @@ - kie-tools--maven-profile--1st-party-dependencies + include-1st-party-dependencies - ignore--kie-tools--maven-profile--1st-party-dependencies + kieTools.do-not-use-this-property.ignore1stPartyDependencies !true diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile b/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile index 37cd0daa263..9fad06ed812 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile @@ -30,7 +30,7 @@ COPY --chown=$USER_ID:$USER_ID dist-dev/quarkus-app $HOME_PATH/app/ COPY --chown=$USER_ID:$USER_ID dist-dev/settings.xml /tmp/kogito/.m2/settings.xml # Pre-populate local Maven repository for faster startup -RUN ./mvnw clean package -B --settings /tmp/kogito/.m2/settings.xml -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} \ +RUN ./mvnw clean package -B -nsu --settings /tmp/kogito/.m2/settings.xml -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_PATH/app && chmod -R g=u $HOME_PATH/app && chgrp -R 0 /tmp/kogito && chmod -R g=u /tmp/kogito && chgrp -R 0 /.m2 && chmod -R g=u /.m2 USER $USER_ID diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/install.js b/packages/dev-deployment-kogito-quarkus-blank-app-image/install.js deleted file mode 100644 index 5cdd9ad6908..00000000000 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/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 { env } = require("./env"); -const { setupMavenConfigFile } = require("@kie-tools/maven-base"); - -setupMavenConfigFile(` - -Drevision=${env.devDeploymentKogitoQuarkusBlankAppImage.version} -`); diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json b/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json index 6947f54b8a7..7ac8c1a05e2 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json @@ -28,7 +28,6 @@ "create-test-image:minikube": "kie-tools--image-builder minikube -r \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.registry)\" -a \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.account)\" -n \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.name)\" -t \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.buildTag)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentKogitoQuarkusBlankAppImage.builderImage)\" --build-arg ROOT_PATH=/", "create-test-image:openshift": "kie-tools--image-builder openshift -r \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.registry)\" -a \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.account)\" -n \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.name)\" -t \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.buildTag)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentKogitoQuarkusBlankAppImage.builderImage)\" --build-arg ROOT_PATH=/", "image:docker:build": "kie-tools--image-builder build --allowHostNetworkAccess -r \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.registry)\" -a \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.account)\" -n \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.name)\" -t \"$(build-env devDeploymentKogitoQuarkusBlankAppImage.buildTag)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentKogitoQuarkusBlankAppImage.builderImage)\" --build-arg ROOT_PATH=/", - "install": "node install.js", "m2-repo-via-http:container:kill": "(docker container kill m2-repo-via-http || true) && (docker container rm m2-repo-via-http || true)", "m2-repo-via-http:container:prepare-m2-repo-volume": "node -e 'require(`@kie-tools/maven-base`).prepareHardLinkedM2ForPackage(`./dist/tmp-m2/repository`, `./node_modules/@kie-tools/dev-deployment-kogito-quarkus-blank-app`)'", "m2-repo-via-http:container:run": "(pnpm m2-repo-via-http:container:kill || true) && pnpm m2-repo-via-http:container:prepare-m2-repo-volume && docker run -p 8888:80 --name m2-repo-via-http -v \"./dist/tmp-m2/repository:/var/www/html\" -dit $(build-env devDeploymentKogitoQuarkusBlankAppImage.dev.mavenM2RepoViaHttpImage)", diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app-image/pom.xml deleted file mode 100644 index 5a9e0af1ed2..00000000000 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 4.0.0 - org.kie.kogito - dev-deployment-kogito-quarkus-blank-app-image - ${revision} - - - - - - org.kie - kie-tools-maven-base - ${project.version} - pom - - - diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index 0452d74d125..19458d3a1e9 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -151,10 +151,10 @@ - kie-tools--maven-profile--1st-party-dependencies + include-1st-party-dependencies - ignore--kie-tools--maven-profile--1st-party-dependencies + kieTools.do-not-use-this-property.ignore1stPartyDependencies !true diff --git a/packages/maven-base/env/index.js b/packages/maven-base/env/index.js index 96c5d8d4e6f..71670217a09 100644 --- a/packages/maven-base/env/index.js +++ b/packages/maven-base/env/index.js @@ -31,6 +31,9 @@ module.exports = composeEnv([require("@kie-tools/root-env/env")], { mavenBase: { version: require("../package.json").version, }, + mvnw: { + version: "3.3.0", + }, maven: { deploy: { skip: getOrDefault(this.vars.KIE_TOOLS_BUILD__mavenDeploySkip), diff --git a/packages/maven-base/index.js b/packages/maven-base/index.js index 50122de03a3..54fa2ee5da0 100755 --- a/packages/maven-base/index.js +++ b/packages/maven-base/index.js @@ -20,13 +20,13 @@ const cp = require("child_process"); const fs = require("fs"); const path = require("path"); +const { env } = require("./env"); // Constants relative to consumer packages. const MVN_CONFIG_ORIGINAL_FILE_PATH = path.join(".mvn", "maven.config.original"); const MVN_CONFIG_FILE_PATH = path.join(".mvn", "maven.config"); // This package's constants. -const MVNW_VERSION = "3.3.0"; const EMPTY_POM_XML_PATH = path.join(__dirname, "empty-pom.xml"); const SETTINGS_XML_PATH = path.join(__dirname, "settings.xml"); @@ -43,7 +43,7 @@ const DEFAULT_LOCAL_REPO = String( }) ).trim(); -const BOOTSTRAP_CLI_ARGS = `-P'!kie-tools--maven-profile--1st-party-dependencies' --settings=${SETTINGS_XML_PATH}`; +const BOOTSTRAP_CLI_ARGS = `-P-include-1st-party-dependencies --settings=${SETTINGS_XML_PATH}`; module.exports = { /** @@ -67,9 +67,15 @@ module.exports = { installMvnw: () => { console.info(`[maven-base] Installing mvnw...`); console.time(`[maven-base] Installing mvnw...`); - cp.execSync(`mvn -e org.apache.maven.plugins:maven-wrapper-plugin:${MVNW_VERSION}:wrapper ${BOOTSTRAP_CLI_ARGS}`, { - stdio: "inherit", - }); + + const cmd = `mvn -e org.apache.maven.plugins:maven-wrapper-plugin:${env.mvnw.version}:wrapper ${BOOTSTRAP_CLI_ARGS}`; + + if (process.platform === "win32") { + cp.execSync(cmd.replaceAll(" -", " `-"), { stdio: "inherit", shell: "powershell.exe" }); + } else { + cp.execSync(cmd, { stdio: "inherit" }); + } + console.timeEnd(`[maven-base] Installing mvnw...`); }, 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 a372f6c46e1..1da3045fba5 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 @@ -140,10 +140,10 @@ - kie-tools--maven-profile--1st-party-dependencies + include-1st-party-dependencies - ignore--kie-tools--maven-profile--1st-party-dependencies + kieTools.do-not-use-this-property.ignore1stPartyDependencies !true diff --git a/packages/sonataflow-builder-image/package.json b/packages/sonataflow-builder-image/package.json index 2724f590f3e..6d26f7bf890 100644 --- a/packages/sonataflow-builder-image/package.json +++ b/packages/sonataflow-builder-image/package.json @@ -13,7 +13,7 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm copy-assets\" \"pnpm test\" \"pnpm image:build\" --finally \"pnpm m2-repo-via-http:container:kill\"", + "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm copy-assets\" \"pnpm test\" \"pnpm image:build\" --finally \"pnpm m2-repo-via-http:container:kill\" \"rimraf ./dist/tmp-m2\"", "build:dev": "pnpm build", "build:prod": "pnpm build && pnpm image:test", "copy:maven-m2-repo-via-http-image--settings-xml": "run-script-os", diff --git a/packages/sonataflow-devmode-image/package.json b/packages/sonataflow-devmode-image/package.json index f122cb9c4f4..ea6316d93ce 100644 --- a/packages/sonataflow-devmode-image/package.json +++ b/packages/sonataflow-devmode-image/package.json @@ -13,7 +13,7 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm copy-assets\" \"pnpm image:build\" --finally \"pnpm m2-repo-via-http:container:kill\"", + "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm copy-assets\" \"pnpm image:build\" --finally \"pnpm m2-repo-via-http:container:kill\" \"rimraf ./dist/tmp-m2\"", "build:dev": "pnpm build", "build:prod": "pnpm build && pnpm image:test", "copy:maven-m2-repo-via-http-image--settings-xml": "run-script-os", diff --git a/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh b/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh index 6a96ecb4f8d..12a2f50f03c 100755 --- a/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh +++ b/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh @@ -45,7 +45,7 @@ shift $# script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P) export NODE_OPTIONS="${NODE_OPTIONS} --max_old_space_size=4096" -APPS_MAVEN_OPTIONS="-Dquarkus.package.type=fast-jar -Dquarkus.build.image=false" +APPS_MAVEN_OPTIONS="-Dquarkus.package.type=fast-jar -Dquarkus.build.image=false -B" # used for all-in-one image extended_context="" diff --git a/packages/yard-validator-worker/pom.xml b/packages/yard-validator-worker/pom.xml index 26545f51ad3..4d2b3f7d498 100644 --- a/packages/yard-validator-worker/pom.xml +++ b/packages/yard-validator-worker/pom.xml @@ -67,10 +67,10 @@ - kie-tools--maven-profile--1st-party-dependencies + include-1st-party-dependencies - ignore--kie-tools--maven-profile--1st-party-dependencies + kieTools.do-not-use-this-property.ignore1stPartyDependencies !true