Interface RootLocator

All Superinterfaces:
org.apache.maven.api.Service

public interface RootLocator extends org.apache.maven.api.Service
Locates the root directory for a given project.

The root locator is usually looked up from the DI container. One notable exception is the computation of the early session.rootDirectory property which happens very early. The implementation used in this case will be discovered using the JDK service mechanism.

The default implementation will look for a .mvn child directory or a pom.xml containing the root="true" attribute.

Since:
4.0.0
  • Field Details

  • Method Details

    • findRoot

      @Nullable Path findRoot(@Nonnull Path basedir)
    • findMandatoryRoot

      @Nonnull Path findMandatoryRoot(@Nonnull Path basedir)
    • getNoRootMessage

      @Nonnull default String getNoRootMessage()