Skip to content

Commit

Permalink
build: work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 committed Oct 10, 2024
1 parent 272d2d8 commit b592d2c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/nx-maven/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,22 @@ function getProjectRootFromTree(
projectRoot = readProjectConfiguration(tree, projectName).root;
} catch (err) {
logger.warn(`Cannot read project ${projectName} configuration.`);
logger.warn(err);
}

const mavenRootDirAbsolutePath = path.join(
workspaceRoot,
mavenRootDirectory,
);

const projectBasedir = getExpressionValue(
'project.basedir',
mavenRootDirAbsolutePath,
projectName,
);
projectRoot = path.relative(workspaceRoot, projectBasedir);
if (projectRoot) {
return;
}

const mavenRootDirAbsolutePath = path.join(workspaceRoot, mavenRootDirectory);

const projectBasedir = getExpressionValue(
'project.basedir',
mavenRootDirAbsolutePath,
projectName,
);
projectRoot = path.relative(workspaceRoot, projectBasedir);

if (!projectRoot) {
throw new Error('ProjectRoot cannot be empty');
}
Expand Down

0 comments on commit b592d2c

Please sign in to comment.