You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "michael-o (via GitHub)" <gi...@apache.org> on 2023/04/07 15:32:43 UTC

[GitHub] [maven] michael-o commented on a diff in pull request #1061: [MNG-7038] Introduce public property to point to a root directory of (multi-module) project

michael-o commented on code in PR #1061:
URL: https://github.com/apache/maven/pull/1061#discussion_r1160779967


##########
maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java:
##########
@@ -494,14 +504,51 @@ public interface MavenExecutionRequest {
 
     /**
      * @since 3.3.0
+     * @deprecated use {@link #setRootdir(Path)} instead
      */
+    @Deprecated
     void setMultiModuleProjectDirectory(File file);
 
     /**
      * @since 3.3.0
+     * @deprecated use {@link #getRootdir()} instead
      */
+    @Deprecated
     File getMultiModuleProjectDirectory();
 
+    /**
+     * Sets the root dir of the project.
+     *
+     * @since 4.0.0
+     */
+    MavenExecutionRequest setRootdir(Path rootdir);
+
+    /**
+     * Gets the root directory of the project, which is the parent directory containing the {@code .mvn} directory
+     * or a {@code pom.xml} file with the {@code root="true"} attribute.
+     * If there's no such file, an {@code IllegalStateException} will be thrown.
+     *
+     * @throws IllegalStateException if the root directory could not be found
+     * @since 4.0.0
+     */
+    Path getRootdir() throws IllegalStateException;

Review Comment:
   That's a runtime exception and redundant in the signature.



-- 
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-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org