This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 396c15194f4 NO-ISSUE: Enable Maven's local repo tail mechanism for
safer dependency relationship between Maven-based packages (#2905)
396c15194f4 is described below
commit 396c15194f4658da0d2d64a8065be7c0cb1d102f
Author: Tiago Bento <[email protected]>
AuthorDate: Thu Feb 13 13:36:34 2025 -0500
NO-ISSUE: Enable Maven's local repo tail mechanism for safer dependency
relationship between Maven-based packages (#2905)
---
.github/actions/setup-env/action.yml | 9 --------
.github/workflows/ci_build.yml | 9 ++++++++
.../kie-sandbox-accelerator-quarkus/install.js | 24 ++++++++++++++++++++++
.../kie-sandbox-accelerator-quarkus/package.json | 2 ++
pnpm-lock.yaml | 3 +++
5 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/.github/actions/setup-env/action.yml
b/.github/actions/setup-env/action.yml
index 9833329af27..efe9dfdd9e3 100644
--- a/.github/actions/setup-env/action.yml
+++ b/.github/actions/setup-env/action.yml
@@ -155,15 +155,6 @@ runs:
cd ${{ inputs.working_dir }}
pnpm config set network-timeout 1000000
- - name: "Setup default Maven args"
- shell: bash
- run: |
- echo "STEP: Setup default Maven args"
- cd ${{ inputs.working_dir }}
- pnpm -r exec 'bash' '-c' 'mkdir .mvn'
- pnpm -r exec 'bash' '-c' 'echo -B > .mvn/maven.config'
- pnpm -r exec 'bash' '-c' 'echo -Xmx2g > .mvn/jvm.config'
-
- name: "Install s2i pre-reqs (Ubuntu only)"
shell: bash
run: |
diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml
index 2f2a2f9e98e..0459cd1ba85 100644
--- a/.github/workflows/ci_build.yml
+++ b/.github/workflows/ci_build.yml
@@ -108,6 +108,9 @@ jobs:
- name: "Bootstrap"
if: steps.setup_build_mode.outputs.mode != 'none'
+ env:
+ MAVEN_ARGS: "-B -Puse-maven-repo-local-tail"
+ MAVEN_OPTS: "-Xmx2g"
uses: ./.github/actions/bootstrap
with:
pnpm_filter_string: ${{
steps.setup_build_mode.outputs.bootstrapPnpmFilterString }}
@@ -136,6 +139,8 @@ jobs:
DISPLAY: ":99.0"
START_SERVER_AND_TEST_INSECURE: "true"
NODE_OPTIONS: "--max_old_space_size=4096"
+ MAVEN_ARGS: "-B -Puse-maven-repo-local-tail"
+ MAVEN_OPTS: "-Xmx2g"
run: >-
eval "pnpm ${{
steps.setup_build_mode.outputs.fullBuildPnpmFilterString }}
--workspace-concurrency=1 build:prod"
@@ -145,6 +150,8 @@ jobs:
env:
KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os == 'Linux' }}
KIE_TOOLS_BUILD__buildExamples: "true"
+ MAVEN_ARGS: "-B -Puse-maven-repo-local-tail"
+ MAVEN_OPTS: "-Xmx2g"
run: |
eval "pnpm ${{
steps.setup_build_mode.outputs.upstreamPnpmFilterString }} build:dev"
@@ -161,6 +168,8 @@ jobs:
DISPLAY: ":99.0"
START_SERVER_AND_TEST_INSECURE: "true"
NODE_OPTIONS: "--max_old_space_size=4096"
+ MAVEN_ARGS: "-B -Puse-maven-repo-local-tail"
+ MAVEN_OPTS: "-Xmx2g"
run: |
eval "pnpm ${{
steps.setup_build_mode.outputs.affectedPnpmFilterString }}
--workspace-concurrency=1 build:prod"
diff --git a/packages/kie-sandbox-accelerator-quarkus/install.js
b/packages/kie-sandbox-accelerator-quarkus/install.js
new file mode 100644
index 00000000000..d8578060d94
--- /dev/null
+++ b/packages/kie-sandbox-accelerator-quarkus/install.js
@@ -0,0 +1,24 @@
+/*
+ * 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 { setupMavenConfigFile, buildTailFromPackageJsonDependencies } =
require("@kie-tools/maven-base");
+
+setupMavenConfigFile(`
+ -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
+`);
diff --git a/packages/kie-sandbox-accelerator-quarkus/package.json
b/packages/kie-sandbox-accelerator-quarkus/package.json
index ef9f103040c..1250e25d930 100644
--- a/packages/kie-sandbox-accelerator-quarkus/package.json
+++ b/packages/kie-sandbox-accelerator-quarkus/package.json
@@ -22,6 +22,7 @@
"_build-step:setup-git-repo-content": "export GIT_USER_EMAIL=\"$(git
config --get user.email)\" && export GIT_USER_NAME=\"$(git config --get
user.name)\" && mkdirp ./dist-dev/git-repo-content && cpy
'./dist/git-repo-content/**' ./dist-dev/git-repo-content && cd
./dist-dev/git-repo-content && git init --initial-branch main && git remote add
repo ../git-repo-bare.git && git config user.email \"$GIT_USER_EMAIL\" && git
config user.name \"$GIT_USER_NAME\" && git add . && git commit -m 'S [...]
"build:dev": "pnpm run _build",
"build:prod": "pnpm run _build && pnpm run test",
+ "install": "node install.js",
"start": "node dev-server/server.mjs $(build-env
kieSandboxAcceleratorQuarkus.dev.port) ./dist-dev",
"test": "run-script-os",
"test:darwin:linux": "run-script-if --ignore-errors \"$(build-env
tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"rimraf
./dist-tests\" \"cp -r ./dist ./dist-tests\" \"cp ./tests/models/empty.bpmn
./dist-tests/git-repo-content/src/main/resources\" \"mvn -f
./dist-tests/git-repo-content clean package\" --finally \"rimraf
./dist-tests\"",
@@ -31,6 +32,7 @@
"@kie-tools/jbpm-quarkus-devui": "workspace:*"
},
"devDependencies": {
+ "@kie-tools/maven-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"cpy-cli": "^5.0.0",
"finalhandler": "^1.3.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dd1b59a55fd..909e1c37577 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6998,6 +6998,9 @@ importers:
specifier: workspace:*
version: link:../jbpm-quarkus-devui
devDependencies:
+ '@kie-tools/maven-base':
+ specifier: workspace:*
+ version: link:../maven-base
'@kie-tools/root-env':
specifier: workspace:*
version: link:../root-env
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]