[MNG-7898] Missing .mvn directory should not be reported in quiet mode

This commit is contained in:
Slawomir Jaranowski 2023-10-04 23:23:18 +02:00
parent a4b404145a
commit 523f8b7dc0
1 changed files with 5 additions and 5 deletions

View File

@ -360,11 +360,7 @@ public class MavenCli {
// properties will be computed through the RootLocator found in the container. // properties will be computed through the RootLocator found in the container.
RootLocator rootLocator = RootLocator rootLocator =
ServiceLoader.load(RootLocator.class).iterator().next(); ServiceLoader.load(RootLocator.class).iterator().next();
Path rootDirectory = rootLocator.findRoot(topDirectory); cliRequest.rootDirectory = rootLocator.findRoot(topDirectory);
if (rootDirectory == null) {
System.err.println(RootLocator.UNABLE_TO_FIND_ROOT_PROJECT_MESSAGE);
}
cliRequest.rootDirectory = rootDirectory;
// //
// Make sure the Maven home directory is an absolute path to save us from confusion with say drive-relative // Make sure the Maven home directory is an absolute path to save us from confusion with say drive-relative
@ -447,6 +443,10 @@ public class MavenCli {
} }
throw new ExitException(0); throw new ExitException(0);
} }
if (cliRequest.rootDirectory == null) {
slf4jLogger.debug(RootLocator.UNABLE_TO_FIND_ROOT_PROJECT_MESSAGE);
}
} }
private CommandLine cliMerge(CommandLine mavenConfig, CommandLine mavenCli) { private CommandLine cliMerge(CommandLine mavenConfig, CommandLine mavenCli) {