gnodet commented on code in PR #2041: URL: https://github.com/apache/maven/pull/2041#discussion_r1913701987
########## impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java: ########## @@ -33,32 +33,45 @@ import java.util.Map; import java.util.Objects; import java.util.Properties; +import java.util.ServiceLoader; import java.util.function.Function; import java.util.stream.Collectors; import org.apache.maven.api.Constants; +import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.Nullable; import org.apache.maven.api.cli.InvokerRequest; import org.apache.maven.api.cli.Options; import org.apache.maven.api.cli.Parser; import org.apache.maven.api.cli.ParserException; import org.apache.maven.api.cli.ParserRequest; import org.apache.maven.api.cli.extensions.CoreExtension; +import org.apache.maven.api.services.model.RootLocator; import org.apache.maven.cling.internal.extension.io.CoreExtensionsStaxReader; import org.apache.maven.cling.props.MavenPropertiesLoader; import org.apache.maven.cling.utils.CLIReportingUtils; import org.apache.maven.properties.internal.EnvironmentUtils; import org.apache.maven.properties.internal.SystemProperties; import static java.util.Objects.requireNonNull; -import static org.apache.maven.cling.invoker.Utils.getCanonicalPath; -import static org.apache.maven.cling.invoker.Utils.or; -import static org.apache.maven.cling.invoker.Utils.prefix; -import static org.apache.maven.cling.invoker.Utils.stripLeadingAndTrailingQuotes; -import static org.apache.maven.cling.invoker.Utils.toMap; +import static org.apache.maven.cling.invoker.InvokerUtils.getCanonicalPath; +import static org.apache.maven.cling.invoker.InvokerUtils.or; +import static org.apache.maven.cling.invoker.InvokerUtils.prefix; +import static org.apache.maven.cling.invoker.InvokerUtils.toMap; public abstract class BaseParser implements Parser { + @Nullable + private static Path findRoot(Path topDirectory) { Review Comment: I'm not at ease with splitting the `findRoot` and `findMandatoryRoot` in different classes. Those are related and very close. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org