Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagobento committed Oct 1, 2024
1 parent 008b2ff commit f759e7f
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.droolsProcessUsertasksQuarkusExample.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
4 changes: 2 additions & 2 deletions examples/jbpm-compact-architecture-example/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ const buildEnv = require("./env");
const {
setupMavenConfigFile,
setPomProperty,
buildTailFromPackageJson,
buildTailFromPackageJsonDependencies,
} = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.jbpmCompactArchitectureExample.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);

setPomProperty({
Expand Down
4 changes: 2 additions & 2 deletions examples/sonataflow-greeting-quarkus-example/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.sonataflowGreetingQuarkus.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
4 changes: 2 additions & 2 deletions packages/dashbuilder/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.dashbuilder.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
8 changes: 6 additions & 2 deletions packages/dev-deployment-base-image/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, installMvnw, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const {
setupMavenConfigFile,
installMvnw,
buildTailFromPackageJsonDependencies,
} = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.devDeploymentBaseImage.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);

installMvnw();
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, installMvnw, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const {
setupMavenConfigFile,
installMvnw,
buildTailFromPackageJsonDependencies,
} = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(
`
Expand All @@ -27,7 +31,7 @@ setupMavenConfigFile(
-Drevision=${buildEnv.env.devDeploymentQuarkusApp.version}
-Dquarkus.platform.version=${buildEnv.env.quarkusPlatform.version}
-Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`,
{ ignoreDefault: true } // Can't have special <repositories> configuration that only works inside this repo.
);
Expand Down
4 changes: 2 additions & 2 deletions packages/dmn-testing-models/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.dmnTestingModels.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
4 changes: 2 additions & 2 deletions packages/extended-services-java/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.extendedServicesJava.version}
-Dquarkus.http.port=${buildEnv.env.extendedServicesJava.port}
-Dquarkus.http.host=${buildEnv.env.extendedServicesJava.host}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
4 changes: 2 additions & 2 deletions packages/jbpm-quarkus-devui/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.jbpmQuarkusDevuiExtension.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
4 changes: 2 additions & 2 deletions packages/maven-base/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const buildEnv = require("./env");
const {
setupMavenConfigFile,
setPomProperty,
buildTailFromPackageJson,
buildTailFromPackageJsonDependencies,
} = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(
`
--batch-mode
-Dstyle.color=always
-Drevision=${buildEnv.env.mavenBase.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`,
{ ignoreDefault: true }
);
Expand Down
2 changes: 1 addition & 1 deletion packages/maven-config-setup-helper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = {
*
* @returns A comma-separated string containing a flat list of absolute paths of local Maven repositories.
*/
buildTailFromPackageJson: (dirname) => {
buildTailFromPackageJsonDependencies: (dirname) => {
return deepResolveMavenLocalRepoTail(path.resolve(dirname ?? ".")).join(",");
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(
`
Expand All @@ -27,7 +27,7 @@ setupMavenConfigFile(
-Drevision=${buildEnv.env.swfDeploymentQuarkusApp.version}
-Dquarkus.platform.version=${buildEnv.env.quarkusPlatform.version}
-Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`,
{ ignoreDefault: true } // Can't have special <repositories> configuration that only works inside this repo.
);
4 changes: 2 additions & 2 deletions packages/serverless-workflow-diagram-editor/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const buildEnv = require("./env");
const {
setupMavenConfigFile,
buildTailFromPackageJson,
buildTailFromPackageJsonDependencies,
DEFAULT_LOCAL_REPO,
} = require("@kie-tools/maven-config-setup-helper");

Expand All @@ -29,7 +29,7 @@ setupMavenConfigFile(
--batch-mode
-Dstyle.color=always
-Drevision=${buildEnv.env.swfDiagramEditor.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()},${DEFAULT_LOCAL_REPO}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()},${DEFAULT_LOCAL_REPO}
`, // For some reason, j2cl-maven-plugin needs the DEFAULT_LOCAL_REPO here as the last tail too.
{ ignoreDefault: true } // Default <repositories> configuration doesn't work for this module. Since this module is not going to last long, we rely on this workaround for a while.
);
4 changes: 2 additions & 2 deletions packages/sonataflow-quarkus-devui/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.sonataflowQuarkusDevuiExtension.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);
4 changes: 2 additions & 2 deletions packages/stunner-editors/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(
`
--batch-mode
-Dstyle.color=always
-Drevision=${buildEnv.env.stunnerEditors.version}
-Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`,
{ ignoreDefault: true } // Default <repositories> configuration doesn't work for this module. Since this module is not going to last long, we rely on this workaround for a while.
);
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, installMvnw, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const {
setupMavenConfigFile,
installMvnw,
buildTailFromPackageJsonDependencies,
} = require("@kie-tools/maven-config-setup-helper");

const version = buildEnv.env.vscodeJavaCodeCompletionExtensionPlugin.version;

setupMavenConfigFile(`
-Drevision=${version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);

installMvnw();
Expand Down
8 changes: 6 additions & 2 deletions packages/yard-model/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
*/

const buildEnv = require("./env");
const { setupMavenConfigFile, installMvnw, buildTailFromPackageJson } = require("@kie-tools/maven-config-setup-helper");
const {
setupMavenConfigFile,
installMvnw,
buildTailFromPackageJsonDependencies,
} = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.yardModel.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
`);

installMvnw();
4 changes: 2 additions & 2 deletions packages/yard-validator-worker/mvn.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const buildEnv = require("./env");
const {
setupMavenConfigFile,
installMvnw,
buildTailFromPackageJson,
buildTailFromPackageJsonDependencies,
DEFAULT_LOCAL_REPO,
} = require("@kie-tools/maven-config-setup-helper");

setupMavenConfigFile(`
-Drevision=${buildEnv.env.yardValidator.version}
-Dmaven.repo.local.tail=${buildTailFromPackageJson()},${DEFAULT_LOCAL_REPO}
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()},${DEFAULT_LOCAL_REPO}
`); // For some reason, j2cl-maven-plugin needs the DEFAULT_LOCAL_REPO here as the last tail too.

installMvnw();

0 comments on commit f759e7f

Please sign in to comment.