Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change error to warning #1445

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading