You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2024/08/28 19:45:09 UTC
[PR] [MNG-7897] Support ${project.rootDirectory} in file profile activation [maven]
gnodet opened a new pull request, #1687:
URL: https://github.com/apache/maven/pull/1687
JIRA: https://issues.apache.org/jira/browse/MNG-7897
--
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
Re: [PR] [MNG-7897] Support ${project.rootDirectory} in file profile activation [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #1687:
URL: https://github.com/apache/maven/pull/1687
--
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
Re: [PR] [MNG-7897] Support ${project.rootDirectory} in file profile activation [maven]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
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
--
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