[GitHub] [maven] gnodet commented on a diff in pull request #1061: [MNG-7038] Introducing project.topdir
gnodet commented on code in PR #1061: URL: https://github.com/apache/maven/pull/1061#discussion_r1142256086 ## maven-model-builder/src/site/apt/index.apt: ## @@ -192,6 +192,10 @@ Maven Model Builder *+--+--+ | <<>> | The path to the current Maven home. | <<<$\{maven.home\}>>> | *+--+--+ +| <<>> | the directory containing the root <<>> file of a multi module project, in a single module project this is the same as <<>> | <<<$\{maven.rootdir\}>>> | +*+--+--+ +| <<>> | the directory containing the top-level <<>> in this reactor build | <<<$\{maven.topdir\}>>> | +*+--+--+ Review Comment: > ? `topdir` should be available in interpolation, it is its main usage to reference absolutely configurations otherwise not sure its interest for end users. No, that's would be the `rootdir`. The `topdir` would be defined as the the top-most directory of executed projects in the reactor (basically, the current directory or the one pointed to when using `-f`/`--file`). -- 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
[GitHub] [maven] gnodet commented on a diff in pull request #1061: [MNG-7038] Introducing project.topdir
gnodet commented on code in PR #1061: URL: https://github.com/apache/maven/pull/1061#discussion_r1142137049 ## maven-model-builder/src/site/apt/index.apt: ## @@ -192,6 +192,10 @@ Maven Model Builder *+--+--+ | <<>> | The path to the current Maven home. | <<<$\{maven.home\}>>> | *+--+--+ +| <<>> | the directory containing the root <<>> file of a multi module project, in a single module project this is the same as <<>> | <<<$\{maven.rootdir\}>>> | +*+--+--+ +| <<>> | the directory containing the top-level <<>> in this reactor build | <<<$\{maven.topdir\}>>> | +*+--+--+ Review Comment: Actually, `topdir` should not be part of any model interpolation, because it's mainly the current directory and should definitely not have any effect. This will require an additional parameter to `ModelInterpolator.interpolate()` or to add it to the `ModelBuildingRequest`. However, `rootdir` should be part of profile activation along `basedir` imho. -- 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
[GitHub] [maven] gnodet commented on a diff in pull request #1061: [MNG-7038] Introducing project.topdir
gnodet commented on code in PR #1061: URL: https://github.com/apache/maven/pull/1061#discussion_r1142090120 ## maven-model-builder/src/site/apt/index.apt: ## @@ -192,6 +192,10 @@ Maven Model Builder *+--+--+ | <<>> | The path to the current Maven home. | <<<$\{maven.home\}>>> | *+--+--+ +| <<>> | the directory containing the root <<>> file of a multi module project, in a single module project this is the same as <<>> | <<<$\{maven.rootdir\}>>> | +*+--+--+ +| <<>> | the directory containing the top-level <<>> in this reactor build | <<<$\{maven.topdir\}>>> | +*+--+--+ Review Comment: I agree, I'll remove all references to `maven.rootdir` and `maven.topdir`. It makes sense to keep `session.rootdir` and `session.topdir` because they are available from those objects. I'd rather [set them as `session.rootdir` and `session.topdir` in the request system properties](https://github.com/apache/maven/pull/1061/files#diff-b8b814f5b6b3855ae79dc45a0266b94871193dcef42803c316e07409e94af35cR612-R617). That would allow using them in the context of [arguments interpolation / `MNG-6303`](https://github.com/apache/maven/pull/1062). -- 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
[GitHub] [maven] gnodet commented on a diff in pull request #1061: [MNG-7038] Introducing project.topdir
gnodet commented on code in PR #1061: URL: https://github.com/apache/maven/pull/1061#discussion_r1142092067 ## maven-core/src/main/java/org/apache/maven/execution/MavenSession.java: ## @@ -141,10 +142,28 @@ public List getProjects() { return projects; } +/** + * @deprecated use {@link #getTopdir()} + */ +@Deprecated public String getExecutionRootDirectory() { return request.getBaseDirectory(); } +/** + * @since 4.0 + */ +public Path getTopdir() { +return request.getTopdir(); +} + +/** + * @since 4.0 Review Comment: Note that all the new classes from the api are annotated with `4.0`, so I guess I'll raise a PR to fix those and make things a bit more coherent. -- 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
[GitHub] [maven] gnodet commented on a diff in pull request #1061: [MNG-7038] Introducing project.topdir
gnodet commented on code in PR #1061: URL: https://github.com/apache/maven/pull/1061#discussion_r1142090120 ## maven-model-builder/src/site/apt/index.apt: ## @@ -192,6 +192,10 @@ Maven Model Builder *+--+--+ | <<>> | The path to the current Maven home. | <<<$\{maven.home\}>>> | *+--+--+ +| <<>> | the directory containing the root <<>> file of a multi module project, in a single module project this is the same as <<>> | <<<$\{maven.rootdir\}>>> | +*+--+--+ +| <<>> | the directory containing the top-level <<>> in this reactor build | <<<$\{maven.topdir\}>>> | +*+--+--+ Review Comment: I agree, I'll remove all references to `maven.rootdir` and `maven.topdir`. It makes sense to keep `session.rootdir` and `session.topdir` because they are available from those objects. I'd rather set them as `session.rootdir` and `session.topdir` in the request system properties. That would allow using them in the context of [arguments interpolation / `MNG-6303`](https://github.com/apache/maven/pull/1062). -- 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
[GitHub] [maven] gnodet commented on a diff in pull request #1061: [MNG-7038] Introducing project.topdir
gnodet commented on code in PR #1061: URL: https://github.com/apache/maven/pull/1061#discussion_r1140006639 ## maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java: ## @@ -136,6 +136,13 @@ static Properties getBuildProperties() { } public static void showError(Logger logger, String message, Throwable e, boolean showStackTrace) { +if (logger == null) { Review Comment: If `showError` is called before the logger is initialised... -- 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