diff --git a/examples/drools-process-usertasks-quarkus-example/pom.xml b/examples/drools-process-usertasks-quarkus-example/pom.xml
index b481ccff1f3..580a1a03ca8 100644
--- a/examples/drools-process-usertasks-quarkus-example/pom.xml
+++ b/examples/drools-process-usertasks-quarkus-example/pom.xml
@@ -33,23 +33,7 @@
Kie-Tools Example :: Process with Usertasks Quarkus
Kogito user tasks orchestration - Quarkus
-
-
-
- org.jbpm
- jbpm-quarkus-devui-bom
- ${project.version}
- pom
- import
-
-
-
-
-
- org.jbpm
- jbpm-quarkus-devui
-
io.quarkus
quarkus-resteasy
@@ -90,6 +74,35 @@
+
+
+ kie-tools--maven-profile--1st-party-dependencies
+
+
+ ignore--kie-tools--maven-profile--1st-party-dependencies
+ !true
+
+
+
+
+
+ org.jbpm
+ jbpm-quarkus-devui-bom
+ ${project.version}
+ pom
+ import
+
+
+
+
+
+ org.jbpm
+ jbpm-quarkus-devui
+
+
+
+
+
${project.artifactId}
diff --git a/examples/jbpm-compact-architecture-example/pom.xml b/examples/jbpm-compact-architecture-example/pom.xml
index 9330db61b9e..bada056fa02 100644
--- a/examples/jbpm-compact-architecture-example/pom.xml
+++ b/examples/jbpm-compact-architecture-example/pom.xml
@@ -39,18 +39,6 @@
docker.io/apache/incubator-kie-kogito-task-console:main
-
-
-
- org.jbpm
- jbpm-quarkus-devui-bom
- ${project.version}
- pom
- import
-
-
-
-
io.quarkus
@@ -150,6 +138,17 @@
dev
+
+
+
+ org.jbpm
+ jbpm-quarkus-devui-bom
+ ${project.version}
+ pom
+ import
+
+
+
org.jbpm
diff --git a/examples/sonataflow-greeting-quarkus-example/pom.xml b/examples/sonataflow-greeting-quarkus-example/pom.xml
index ba702635898..01422e126c2 100644
--- a/examples/sonataflow-greeting-quarkus-example/pom.xml
+++ b/examples/sonataflow-greeting-quarkus-example/pom.xml
@@ -38,23 +38,7 @@
KIE Tools Example :: SonataFlow Greeting :: Quarkus
SonataFlow Example - Quarkus
-
-
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui-bom
- ${project.version}
- pom
- import
-
-
-
-
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui
-
org.apache.kie.sonataflow
sonataflow-quarkus
@@ -131,6 +115,32 @@
+
+ kie-tools--maven-profile--1st-party-dependencies
+
+
+ ignore--kie-tools--maven-profile--1st-party-dependencies
+ !true
+
+
+
+
+
+ org.apache.kie.sonataflow
+ sonataflow-quarkus-devui-bom
+ ${project.version}
+ pom
+ import
+
+
+
+
+
+ org.apache.kie.sonataflow
+ sonataflow-quarkus-devui
+
+
+
container
diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
index 69203a3e35d..69836106859 100644
--- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
+++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
@@ -83,13 +83,6 @@
pom
import
-
- org.jbpm
- jbpm-quarkus-devui-bom
- ${project.version}
- pom
- import
-
org.jbpm
jbpm-with-drools-quarkus
@@ -138,10 +131,6 @@
-
- org.jbpm
- jbpm-quarkus-devui
-
io.quarkus
quarkus-junit5
@@ -160,6 +149,35 @@
+
+
+ kie-tools--maven-profile--1st-party-dependencies
+
+
+ ignore--kie-tools--maven-profile--1st-party-dependencies
+ !true
+
+
+
+
+
+ org.jbpm
+ jbpm-quarkus-devui-bom
+ ${project.version}
+ pom
+ import
+
+
+
+
+
+ org.jbpm
+ jbpm-quarkus-devui
+
+
+
+
+
diff --git a/packages/kn-plugin-workflow/e2e-tests/helper_test.go b/packages/kn-plugin-workflow/e2e-tests/helper_test.go
index 8d45777b8c6..36376a3be27 100644
--- a/packages/kn-plugin-workflow/e2e-tests/helper_test.go
+++ b/packages/kn-plugin-workflow/e2e-tests/helper_test.go
@@ -173,6 +173,28 @@ func CleanUpAndChdirTemp(t *testing.T) {
}
}
+func WriteMavenConfigFileWithTailDirs(projectDir string) {
+ dirPath := filepath.Join(projectDir, ".mvn")
+ if _, err := os.Stat(dirPath); os.IsNotExist(err) {
+ err := os.Mkdir(dirPath, 0755) // Permissions: owner=rwx, group=rx, others=rx
+ if err != nil {
+ fmt.Printf("Error creating .mvn directory. %v", err)
+ os.Exit(1)
+ }
+ }
+
+ absolutePath, err := filepath.Abs("../../../node_modules/@kie-tools/sonataflow-quarkus-devui/dist/1st-party-m2/repository")
+ if err != nil {
+ fmt.Printf("Failed to resolve absolute path for sonataflow-quarkus-devui package. %v", err)
+ os.Exit(1)
+ }
+ err = os.WriteFile(filepath.Join(projectDir, ".mvn", "maven.config"), []byte("-Dmaven.repo.local.tail=" + absolutePath + "\n"), 0644)
+ if err != nil {
+ fmt.Printf("Failed to create .mvn/maven.config file: %v", err)
+ os.Exit(1)
+ }
+}
+
func AddSnapshotRepositoryDeclarationToPom(t *testing.T, projectDir string) {
VerifyFilesExist(t, projectDir, []string{"pom.xml"})
pomFilePath := filepath.Join(projectDir, "pom.xml")
diff --git a/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go b/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go
index 753677c86e3..2b8e9af4122 100644
--- a/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go
+++ b/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go
@@ -121,6 +121,7 @@ func RunQuarkusBuildTest(t *testing.T, cfgTestInputQuarkusCreate CfgTestInputQua
err = os.Chdir(projectDir)
require.NoErrorf(t, err, "Expected nil error, got %v", err)
+ WriteMavenConfigFileWithTailDirs(projectDir)
// Run `quarkus build` command
args := transformQuarkusBuildCmdCfgToArgs(test.input)
diff --git a/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go b/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go
index d2b79047757..baa1fead3e4 100644
--- a/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go
+++ b/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go
@@ -101,11 +101,12 @@ func RunQuarkusConvertTest(t *testing.T, cfgTestInputCreateConvert CfgTestInputC
projectName := GetCreateProjectName(t, cfgTestInputCreateConvert)
projectDir := filepath.Join(TempTestsPath, projectName)
- // Create the project
- RunCreateTest(t, cfgTestInputCreateConvert)
-
err = os.Chdir(projectDir)
require.NoErrorf(t, err, "Expected nil error, got %v", err)
+ WriteMavenConfigFileWithTailDirs(projectDir)
+
+ // Create the project
+ RunCreateTest(t, cfgTestInputCreateConvert)
// Run `quarkus convert` command
_, err = ExecuteKnWorkflowQuarkus(transformQuarkusConvertCmdCfgToArgs(t, test.input)...)
diff --git a/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go b/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go
index b0b809a0e6b..f7f063d9ae9 100644
--- a/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go
+++ b/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go
@@ -109,6 +109,7 @@ func RunQuarkusCreateTest(t *testing.T, test CfgTestInputQuarkusCreate) string {
// Run `quarkus create` command
_, err = ExecuteKnWorkflowQuarkus(transformQuarkusCreateCmdCfgToArgs(test.input)...)
require.NoErrorf(t, err, "Expected nil error, got: %v", err)
+ WriteMavenConfigFileWithTailDirs(projectDir)
// Check if the project directory was created
require.DirExistsf(t, projectDir, "Expected project directory '%s' to be created", projectDir)
diff --git a/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go b/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go
index 8645ec844a6..c969f03b912 100644
--- a/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go
+++ b/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go
@@ -91,8 +91,10 @@ func RunQuarkusRunTest(t *testing.T, cfgTestInputPrepareQuarkusCreateRun CfgTest
// Create and build the quarkus project
projectName := RunQuarkusCreateTest(t, cfgTestInputPrepareQuarkusCreateRun)
projectDir := filepath.Join(TempTestsPath, projectName)
+
err = os.Chdir(projectDir)
require.NoErrorf(t, err, "Expected nil error, got %v", err)
+ WriteMavenConfigFileWithTailDirs(projectDir)
cmd := exec.Command(KnExecutable)
diff --git a/packages/kn-plugin-workflow/package.json b/packages/kn-plugin-workflow/package.json
index 34155f71362..e3a34cc800f 100644
--- a/packages/kn-plugin-workflow/package.json
+++ b/packages/kn-plugin-workflow/package.json
@@ -49,6 +49,9 @@
"test-e2e:quarkus": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e:quarkus\" \"pnpm go:test-e2e:report\"",
"test-e2e:quarkus:logs": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e:quarkus:logs\" \"pnpm go:test-e2e:report\""
},
+ "dependencies": {
+ "@kie-tools/sonataflow-quarkus-devui": "workspace:*"
+ },
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-devmode-image": "workspace:*",
diff --git a/packages/maven-config-setup-helper/index.js b/packages/maven-config-setup-helper/index.js
index 4d20190857b..844f4092371 100755
--- a/packages/maven-config-setup-helper/index.js
+++ b/packages/maven-config-setup-helper/index.js
@@ -44,7 +44,7 @@ const DEFAULT_LOCAL_REPO = String(
})
).trim();
-const BOOTSTRAP_CLI_ARGS = `--settings=${BOOTSTRAP_SETTINGS_XML_PATH}`;
+const BOOTSTRAP_CLI_ARGS = `-P'!kie-tools--maven-profile--1st-party-dependencies' --settings=${BOOTSTRAP_SETTINGS_XML_PATH}`;
module.exports = {
/**
@@ -82,9 +82,7 @@ module.exports = {
* @returns A comma-separated string containing a flat list of absolute paths of local Maven repositories.
*/
buildTailFromPackageJson: (dirname) => {
- const packageJson = require(path.resolve(dirname ?? ".", "package.json"));
- const tail = deepResolveMavenLocalRepoTail(path.resolve("."), packageJson.name).join(",");
- return tail;
+ return deepResolveMavenLocalRepoTail(path.resolve(dirname ?? ".")).join(",");
},
/**
@@ -171,9 +169,7 @@ module.exports = {
.map((l) => l.trim())
.join("\n");
- const newMavenConfigString = `### Package-specific configuration${
- originalMvnConfigString ? `\n${originalMvnConfigString}\n` : ``
- }
+ const newMavenConfigString = `${originalMvnConfigString ? `\n${originalMvnConfigString}\n` : ``}
${trimmedMavenConfigString.trim()}`;
console.info(`[maven-config-setup-helper] Writing '${MVN_CONFIG_FILE_PATH}'...`);
@@ -183,7 +179,6 @@ ${trimmedMavenConfigString.trim()}`;
? ""
: `
-#### Default configuration
${DEFAULT_MAVEN_CONFIG}`;
fs.writeFileSync(MVN_CONFIG_FILE_PATH, `${newMavenConfigString}${defaultMavenConfigString}`);
@@ -191,14 +186,14 @@ ${DEFAULT_MAVEN_CONFIG}`;
},
};
-function deepResolveMavenLocalRepoTail(cwd, packageName) {
+function deepResolveMavenLocalRepoTail(cwd) {
const packageJsonDependencies = require(path.resolve(cwd, "package.json")).dependencies ?? {};
return [
...new Set([
path.resolve(fs.realpathSync(cwd), "dist/1st-party-m2/repository"),
...Object.entries(packageJsonDependencies).flatMap(([depName, depVersion]) =>
depVersion === "workspace:*" // It's an internal package.
- ? deepResolveMavenLocalRepoTail(fs.realpathSync(cwd + "/node_modules/" + packageName), depName)
+ ? deepResolveMavenLocalRepoTail(cwd + "/node_modules/" + depName)
: []
),
]),
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 27024b76f01..34b1944a549 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
@@ -64,21 +64,10 @@
pom
import
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui-bom
- ${project.version}
- pom
- import
-
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui
-
io.quarkus
quarkus-smallrye-openapi
@@ -149,6 +138,35 @@
+
+
+ kie-tools--maven-profile--1st-party-dependencies
+
+
+ ignore--kie-tools--maven-profile--1st-party-dependencies
+ !true
+
+
+
+
+
+ org.apache.kie.sonataflow
+ sonataflow-quarkus-devui-bom
+ ${project.version}
+ pom
+ import
+
+
+
+
+
+ org.apache.kie.sonataflow
+ sonataflow-quarkus-devui
+
+
+
+
+
diff --git a/packages/sonataflow-builder-image/package.json b/packages/sonataflow-builder-image/package.json
index ce6fafbaf23..e0fbf6dbea5 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 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\"",
"build:dev": "pnpm build",
"build:prod": "pnpm build && pnpm image:test",
"copy:maven-m2-repo-via-http-image--settings-xml": "run-script-os",
@@ -38,7 +38,7 @@
"test:cleanup": "mv dist-tests/report.xml dist-tests/junit-report.xml || true",
"test:linux:darwin": "run-script-if --bool \"$(build-env tests.run)\" --then \"pnpm test:setup\" \"pnpm test:run\" --finally \"pnpm test:cleanup\"",
"test:run": "make -C ./build bats || $(build-env tests.ignoreFailures)",
- "test:setup": "pnpm copy-assets && pnpm copy-test-assets && mkdir -p dist-tests && rm -rf dist-tests/*",
+ "test:setup": "pnpm copy-test-assets && mkdir -p dist-tests && rm -rf dist-tests/*",
"test:win32": "echo \"Tests are skipped in Windows\""
},
"devDependencies": {
diff --git a/packages/yard-validator-worker/pom.xml b/packages/yard-validator-worker/pom.xml
index c39f68e6d42..26545f51ad3 100644
--- a/packages/yard-validator-worker/pom.xml
+++ b/packages/yard-validator-worker/pom.xml
@@ -51,18 +51,6 @@
-
- org.kie.kogito
- yard-model
- ${project.version}
-
-
- org.kie.kogito
- yard-model
- ${project.version}
- sources
-
-
org.kie.j2cl.tools.yaml.mapper
common
@@ -77,6 +65,31 @@
+
+
+ kie-tools--maven-profile--1st-party-dependencies
+
+
+ ignore--kie-tools--maven-profile--1st-party-dependencies
+ !true
+
+
+
+
+ org.kie.kogito
+ yard-model
+ ${project.version}
+
+
+ org.kie.kogito
+ yard-model
+ ${project.version}
+ sources
+
+
+
+
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 486c3cb10ae..14c38f3e974 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6101,6 +6101,10 @@ importers:
version: 1.1.2
packages/kn-plugin-workflow:
+ dependencies:
+ '@kie-tools/sonataflow-quarkus-devui':
+ specifier: workspace:*
+ version: link:../sonataflow-quarkus-devui
devDependencies:
'@kie-tools/root-env':
specifier: workspace:*