[ https://issues.apache.org/jira/browse/MNG-7897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877727#comment-17877727 ]
ASF GitHub Bot commented on MNG-7897: ------------------------------------- slawekjaranowski commented on code in PR #1687: URL: https://github.com/apache/maven/pull/1687#discussion_r1736352991 ########## maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/FileProfileActivatorTest.java: ########## @@ -67,40 +67,40 @@ void testRootDirectoryWithNull() { IllegalStateException e = assertThrows( IllegalStateException.class, - () -> assertActivation(false, newExistsProfile("${rootDirectory}"), context)); + () -> assertActivation(false, newExistsProfile("${project.rootDirectory}"), context)); assertEquals(RootLocator.UNABLE_TO_FIND_ROOT_PROJECT_MESSAGE, e.getMessage()); } @Test void testRootDirectory() { - assertActivation(false, newExistsProfile("${rootDirectory}/someFile.txt"), context); - assertActivation(true, newMissingProfile("${rootDirectory}/someFile.txt"), context); - assertActivation(true, newExistsProfile("${rootDirectory}"), context); - assertActivation(true, newExistsProfile("${rootDirectory}/" + "file.txt"), context); - assertActivation(false, newMissingProfile("${rootDirectory}"), context); - assertActivation(false, newMissingProfile("${rootDirectory}/" + "file.txt"), context); + assertActivation(false, newExistsProfile("${project.rootDirectory}/someFile.txt"), context); + assertActivation(true, newMissingProfile("${project.rootDirectory}/someFile.txt"), context); + assertActivation(true, newExistsProfile("${project.rootDirectory}"), context); + assertActivation(true, newExistsProfile("${project.rootDirectory}/" + "file.txt"), context); + assertActivation(false, newMissingProfile("${project.rootDirectory}"), context); + assertActivation(false, newMissingProfile("${project.rootDirectory}/" + "file.txt"), context); } @Test void testIsActiveNoFile() { assertActivation(false, newExistsProfile(null), context); assertActivation(false, newExistsProfile("someFile.txt"), context); - assertActivation(false, newExistsProfile("${basedir}/someFile.txt"), context); + assertActivation(false, newExistsProfile("${project.basedir}/someFile.txt"), context); Review Comment: We still have a short version `basedir` in code ... so maybe we can leave at least one test for it > Support ${project.rootDirectory} in file profile activation > ----------------------------------------------------------- > > Key: MNG-7897 > URL: https://issues.apache.org/jira/browse/MNG-7897 > Project: Maven > Issue Type: Improvement > Reporter: Slawomir Jaranowski > Assignee: Slawomir Jaranowski > Priority: Major > Fix For: 4.0.0 > > > In current code we have support for short properties: {{rootDirectory}} to be > consistence we should use {{project.rootDirectory}} > Property {{project.rootDirectory}} was introduced in MNG-7038, as we in alpha > release we can change it. -- This message was sent by Atlassian Jira (v8.20.10#820010)