Skip to content

Commit

Permalink
fix: change error to warning (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 authored Dec 10, 2024
1 parent 2a593b8 commit 2b61b62
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/nx-maven/src/graph/create-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
DependencyType,
RawProjectGraphDependency,
joinPathFragments,
logger,
validateDependency,
} from '@nx/devkit';
import * as path from 'path';
Expand Down Expand Up @@ -40,10 +41,14 @@ export const createDependencies: CreateDependencies = (
);

if (!project) {
throw new Error(`Can't find project for file: ${filePath}`);
}
const isVerbose = process.env['NX_VERBOSE_LOGGING'] === 'true';

if (!project.skipProject) {
if (isVerbose) {
logger.warn(
`Can't find project for file: ${filePath}. Maybe this project is not referenced in any modules tag. If you think it's a mistake, please open an issue.`,
);
}
} else if (!project.skipProject) {
const projectSourceFile = joinPathFragments(
project.projectRoot,
'pom.xml',
Expand Down

0 comments on commit 2b61b62

Please sign in to comment.