Skip to content

Commit

Permalink
build: remove -f option from command (#739)
Browse files Browse the repository at this point in the history
Co-authored-by: khalilou88 <[email protected]>
  • Loading branch information
khalilou88 and khalilou88 authored Jan 6, 2024
1 parent 85376c6 commit 9cd6e36
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions packages/nx-maven/src/graph/create-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const createNodes: CreateNodes = [
artifactId,
pomXmlContent,
mavenRootDirAbsolutePath,
projectAbsolutePath,
);
const localRepositoryPath = getLocalRepositoryPath(
mavenRootDirAbsolutePath,
Expand All @@ -78,7 +77,6 @@ export const createNodes: CreateNodes = [
artifactId,
pomXmlContent,
mavenRootDirAbsolutePath,
projectAbsolutePath,
);
const localRepositoryPath = getLocalRepositoryPath(
mavenRootDirAbsolutePath,
Expand Down
8 changes: 1 addition & 7 deletions packages/nx-maven/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9cd6e36

Please sign in to comment.