Skip to content

Feat: Promote session.topDirectory and session.rootDirectory - #11779

Merged
cstamas merged 4 commits into
apache:maven-3.10.xfrom
cstamas:maven-3.9.x-top-root-directory
Apr 8, 2026
Merged

Feat: Promote session.topDirectory and session.rootDirectory#11779
cstamas merged 4 commits into
apache:maven-3.10.xfrom
cstamas:maven-3.9.x-top-root-directory

Conversation

@cstamas

@cstamas cstamas commented Mar 10, 2026

Copy link
Copy Markdown
Member

To real properties usable in POM as well, not only in config interpolation.

To real properies usable in POM as well, not only in config interpolation.
@cstamas cstamas added this to the 3.10.0 milestone Mar 10, 2026
@cstamas cstamas self-assigned this Mar 10, 2026
@cstamas cstamas added the enhancement New feature or request label Mar 10, 2026
@cstamas

This comment was marked as outdated.

@cstamas
cstamas marked this pull request as ready for review March 10, 2026 14:35
@cstamas
cstamas changed the base branch from maven-3.9.x to maven-3.10.x March 25, 2026 11:53
Comment on lines +166 to +170
/**
* Returns top directory if discovered or {@code null}.
*
* @since 3.10.0
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more clear documentation will be appreciated what is difference between top and root directory


/**
* Returns top directory if discovered or {@code null}.
* Top directory is directory where top level POM resides with respect of any reactor limiting or shaping like use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is “top-level POM” defined exactly? It is possible for a pom-packaging module to have <module>s whose <parent> is something else. Or for modules to not be subdirectories.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top level directory is the directory where very first POM being loaded up exists. It is usually $CWD, but may be something different, ie. if you use mvn -f subproject or mvn -f module/pom.xml etc.

@cstamas
cstamas merged commit d5c33fe into apache:maven-3.10.x Apr 8, 2026
18 checks passed
@cstamas
cstamas deleted the maven-3.9.x-top-root-directory branch April 8, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants