From 1957c30a478f6005b751b1487a94c0df312cef21 Mon Sep 17 00:00:00 2001 From: khalilou88 Date: Sat, 6 Jan 2024 16:07:23 +0100 Subject: [PATCH] build: remove -f option from command --- packages/nx-maven/src/graph/create-nodes.ts | 2 -- packages/nx-maven/src/utils/index.ts | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/nx-maven/src/graph/create-nodes.ts b/packages/nx-maven/src/graph/create-nodes.ts index 1f10036bb..85822fb25 100644 --- a/packages/nx-maven/src/graph/create-nodes.ts +++ b/packages/nx-maven/src/graph/create-nodes.ts @@ -53,7 +53,6 @@ export const createNodes: CreateNodes = [ artifactId, pomXmlContent, mavenRootDirAbsolutePath, - projectAbsolutePath, ); const localRepositoryPath = getLocalRepositoryPath( mavenRootDirAbsolutePath, @@ -78,7 +77,6 @@ export const createNodes: CreateNodes = [ artifactId, pomXmlContent, mavenRootDirAbsolutePath, - projectAbsolutePath, ); const localRepositoryPath = getLocalRepositoryPath( mavenRootDirAbsolutePath, diff --git a/packages/nx-maven/src/utils/index.ts b/packages/nx-maven/src/utils/index.ts index 34d7f2610..31f399f21 100644 --- a/packages/nx-maven/src/utils/index.ts +++ b/packages/nx-maven/src/utils/index.ts @@ -426,18 +426,12 @@ export function getEffectiveVersion( artifactId: string, pomXmlContent: XmlDocument, mavenRootDirAbsolutePath: string, - projectAbsolutePath: string, ) { let version = getVersion(artifactId, pomXmlContent); if (version.indexOf('${') >= 0) { - const relativePath = path.relative( - mavenRootDirAbsolutePath, - projectAbsolutePath, - ); - const pomXmlRelativePath = joinPathFragments(relativePath, 'pom.xml'); version = execSync( - `${getExecutable()} -f ${pomXmlRelativePath} help:evaluate -Dexpression=project.version -q -DforceStdout`, + `${getExecutable()} help:evaluate -Dexpression=project.version -q -DforceStdout -pl :${artifactId}`, { cwd: mavenRootDirAbsolutePath, windowsHide: true,