You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "roadSurfer (via GitHub)" <gi...@apache.org> on 2023/11/24 15:47:34 UTC
[PR] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
roadSurfer opened a new pull request, #297:
URL: https://github.com/apache/maven-enforcer/pull/297
This reverts the change from MENFORCER-364 as this led to a regressions with symbolic links.
The fundamental issue is that there is no clean way to deal with case-sensitivity as OSs can have multuple filesystems mounted that follow different rules. Thus the simple `file.exists()` is, despite the limitations, probably best. Those requiring more stringent checks writing their own handling.
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MENFORCER) filed
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Format the pull request title like `[MENFORCER-XXX] - Fixes bug in ApproximateQuantiles`,
where you replace `MENFORCER-XXX` with the appropriate JIRA issue. Best practice
is to use the JIRA issue title in the pull request title and in the first line of the
commit message.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908454527
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
This seems to just be a minor variation on the original test code, but I can change the name.
What do you think "testDeletedFileDetected"?
I'll update the symbolic link est to follow a similar formate.
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
This seems to just be a minor variation on the original test code, but I can change the name.
What do you think "testDeletedFileDetected"?
I'll update the symbolic link est to follow a similar format.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1937651407
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
Review Comment:
delete "list of"
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -105,19 +109,62 @@ void testEmptyFileListAllowNull() {
}
@Test
- void testFileDoesNotExist() throws EnforcerRuleException, IOException {
+ void testDeletedFileDetected() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
+ // Rule should now pass as the file was deleted
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkDeletedDetected() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ rule.setFilesList(Collections.singletonList(linkFile));
+ // Check the link is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
Review Comment:
assertNotNull
##########
enforcer-rules/src/site/apt/requireFilesExist.apt.vm:
##########
@@ -27,22 +27,25 @@ Require Files Exist
This rule checks that the specified list of files exist.
Review Comment:
ditto
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -105,19 +109,62 @@ void testEmptyFileListAllowNull() {
}
@Test
- void testFileDoesNotExist() throws EnforcerRuleException, IOException {
+ void testDeletedFileDetected() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
+ // Rule should now pass as the file was deleted
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkDeletedDetected() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ rule.setFilesList(Collections.singletonList(linkFile));
+ // Check the link is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
+
+ linkFile.delete();
+
+ // Rule should now pass as the target was deleted
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkTargetDeletedDetected() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ // Check the target is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
Review Comment:
assertNotNull
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,12 +110,55 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
Review Comment:
The wrong one was changed. Line 122 should be changed or better yet deleted. The point of the test is not whether f.delete() succeeds. You're not testing the delete method in java.io.File.
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitivity rules when checking files. If checks are required that
Review Comment:
delete "mounted" and consider getting rid of the parentheses or just changing this to "The filesystem" as is every file is on a single filesystem.
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -105,19 +109,62 @@ void testEmptyFileListAllowNull() {
}
@Test
- void testFileDoesNotExist() throws EnforcerRuleException, IOException {
+ void testDeletedFileDetected() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
Review Comment:
This should be an assertNotNull
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesExist.java:
##########
@@ -50,12 +56,34 @@ void testFileExists() throws Exception {
}
@Test
- void testFileOsIndependentExists() {
- rule.setFilesList(Collections.singletonList(new File("POM.xml")));
+ void testSymbolicLinkExists() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
- EnforcerRuleException e = assertThrows(EnforcerRuleException.class, () -> rule.execute());
+ rule.setFilesList(Collections.singletonList(linkFile));
- assertNotNull(e.getMessage());
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkTargetDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+ canonicalFile.delete();
+ rule.setFilesList(Collections.singletonList(linkFile));
+
+ try {
+ rule.execute();
+ fail("Should have received an exception");
+ } catch (Exception e) {
Review Comment:
which exception should be thrown here? Be specific.
##########
enforcer-rules/src/site/apt/requireFilesSize.apt.vm:
##########
@@ -27,26 +27,29 @@ Require File Size
This rule checks that the specified list of files exist and are within the specified size range.
+ The mounted filesystem(s) will dictate the case-sensitivity rules when checking files. If you require checks that your
Review Comment:
ditto
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1915133815
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
Don't change other methods not related to this PR. keep the PR focused.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908631102
##########
enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/files/RequireFilesExist.java:
##########
@@ -31,35 +30,11 @@ public final class RequireFilesExist extends AbstractRequireFiles {
@Override
boolean checkFile(File file) {
// if we get here and the handle is null, treat it as a success
- return file == null ? true : file.exists() && osIndependentNameMatch(file, true);
+ return file == null ? true : file.exists();
Review Comment:
IMHO
return file == null || file.exists()
is clearer, but up to you
##########
enforcer-rules/src/site/apt/requireFilesExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Exist
This rule checks that the specified list of files exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
case-sensitivity
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
Review Comment:
I think the temporary folder rule should take care of that
##########
enforcer-rules/src/site/apt/requireFilesSize.apt.vm:
##########
@@ -26,7 +26,10 @@
Require File Size
This rule checks that the specified list of files exist and are within the specified size range.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
case-sensitivity
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1910337191
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,12 +110,55 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
Review Comment:
I think my confusion is that this is the only assert. It should be changed to an assumeFalse or removed.
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
yes, renaming is a good idea
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-1828111369
No, they are not intended. That will be my IDE doing its own thing, I'll
use a different editor and update.
On Mon, 27 Nov 2023 at 15:20, Torbjorn-Svensson ***@***.***>
wrote:
> Are all the white space changes in the .md files intended?
> As far as I know, some of the trailing white spaces are needed in order to
> not join the lines.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/maven-enforcer/pull/297#issuecomment-1828041274>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJHMQU65AH2DOVYZVDQKTUTYGSVUVAVCNFSM6AAAAAA7ZJWO7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGA2DCMRXGQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1915162880
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,12 +110,55 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
Review Comment:
Test setup failure does not mean the test failed. It means the test wasn't run. That's the difference between assume and assert. JUnit reports these two cases differently.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939715414
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesExist.java:
##########
@@ -50,12 +56,34 @@ void testFileExists() throws Exception {
}
@Test
- void testFileOsIndependentExists() {
- rule.setFilesList(Collections.singletonList(new File("POM.xml")));
+ void testSymbolicLinkExists() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
- EnforcerRuleException e = assertThrows(EnforcerRuleException.class, () -> rule.execute());
+ rule.setFilesList(Collections.singletonList(linkFile));
- assertNotNull(e.getMessage());
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkTargetDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+ canonicalFile.delete();
+ rule.setFilesList(Collections.singletonList(linkFile));
+
+ try {
+ rule.execute();
+ fail("Should have received an exception");
+ } catch (Exception e) {
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-3742285559
> Please finish this patch-request. :)
As far as I am aware, I made good all the required changes. I do not believe it is for me to mark things as "Resolved" but for the person who raised the issue or another team member.
@slawekjaranowski - Who are you awaiting feedback from? I do not believe it to be me.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1937483998
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908454527
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
This seems to just be a minor variation on the original test code, but I can change the name.
What do you think "testDeletedFileDetected"?
I'll update the symbolic link test to follow a similar format.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-1825978578
Ok, the simple `file.exists()` should be enough in normal usage ...
I only think - if we don't break and special cases ... but agree more complicated check should be done optionally or by next rule
By the way we can mention in documentation a way how file existence is checked to be clear.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1910108758
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
Review Comment:
OK
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908504276
##########
enforcer-rules/src/site/apt/requireFilesExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Exist
This rule checks that the specified list of files exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
Updated
##########
enforcer-rules/src/site/apt/requireFilesSize.apt.vm:
##########
@@ -26,7 +26,10 @@
Require File Size
This rule checks that the specified list of files exist and are within the specified size range.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
Updated
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908490914
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
Review Comment:
Looking at other tests, it does not seem to be project standard to ensure tests delete files they create; I could just remove the try block entirely in that case.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1907238846
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
Review Comment:
can we use try with resources for this?
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
+ if (linkFile.exists()) {
+ linkFile.delete();
+ }
+ canonicalFile.delete();
+ }
+ }
+
+ @Test
+ void testSymbolicLinkTargetDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+ canonicalFile.delete();
+ rule.setFilesList(Collections.singletonList(linkFile));
+
+ try {
+ rule.execute();
Review Comment:
no exception is a pass?
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
case-sensitivity
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
+ filesystem(s) do not support (e.g. a case-sensitive check on a case-insensitive filesystem) then you should consider
Review Comment:
delete "then you should"
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
+ filesystem(s) do not support (e.g. a case-sensitive check on a case-insensitive filesystem) then you should consider
+ adding your own custom plugin that meets your specific needs.
Review Comment:
your own --> a
##########
enforcer-rules/src/site/apt/requireFilesExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Exist
This rule checks that the specified list of files exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
as above
##########
enforcer-rules/src/site/apt/requireFilesSize.apt.vm:
##########
@@ -26,7 +26,10 @@
Require File Size
This rule checks that the specified list of files exist and are within the specified size range.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
ditto
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
I don't understand this test. It checks that we create a file, delete it, and then that the file doesn't exist? Consider renamingi
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -20,17 +20,16 @@
import java.io.File;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assertions.*;
Review Comment:
project style does not use wildcard imports
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-1827585294
I have added some words to the affected documentation on case-sensitivity, as well as some explic testing of symbolic links.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1910115369
##########
enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/files/RequireFilesExist.java:
##########
@@ -31,35 +30,11 @@ public final class RequireFilesExist extends AbstractRequireFiles {
@Override
boolean checkFile(File file) {
// if we get here and the handle is null, treat it as a success
- return file == null ? true : file.exists() && osIndependentNameMatch(file, true);
+ return file == null ? true : file.exists();
Review Comment:
Old habits die hard. :-)
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1915149223
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,12 +110,55 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
Review Comment:
This is a quick negative check to ensure the file is detected and the test does not pass by fluke. It is consistent with checks in the other tests (throws an exception with a message).
And I am sorry, but I do no understand how `assumeFalse` is helpful here. If the file is not detected as being present and an exception thrown with a message, then that should be a hard failure as the rule is not working according to spec.
I can see a mix of checkin/not-checking for an unexpected exception, I can add and explicit check for one and add a `fail` if you would like? I don't think it would be appropriate to update every test though, just one directly required by this fix.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939711486
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitivity rules when checking files. If checks are required that
Review Comment:
Done
##########
enforcer-rules/src/site/apt/requireFilesExist.apt.vm:
##########
@@ -27,22 +27,25 @@ Require Files Exist
This rule checks that the specified list of files exist.
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "jemischi (via GitHub)" <gi...@apache.org>.
jemischi commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-3741638602
Please finish this patch-request. :)
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1915163986
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
But that means this `TestRequireFilesDontExist` class will be following a different naming convention to the other classes. I don't follow why that is a good idea, I merely followed the convention that was already in place.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1915179934
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
Better 9 wrong and 1 right than 10 wrong. That's the fundamental principle.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "Torbjorn-Svensson (via GitHub)" <gi...@apache.org>.
Torbjorn-Svensson commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-1828041274
Are all the white space changes in the .md files intended?
As far as I know, some of the trailing white spaces are needed in order to not join the lines.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1933953947
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
What should the new names be?
* `testFileDoesNotExist` -> `testDeletedFileDetected`
* `testSymbolicLinkDoesNotExist` -> `testSymbolicLinDeletedDetected`
* `testSymbolicLinkTargetDoesNotExist` -> `testSymbolicLinkTargetDeletedDetected`
* `testFileDoesNotExistSatisfyAny` -> `testDeletedFileDetectedSatisfyAny`
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939711959
##########
enforcer-rules/src/site/apt/requireFilesSize.apt.vm:
##########
@@ -27,26 +27,29 @@ Require File Size
This rule checks that the specified list of files exist and are within the specified size range.
+ The mounted filesystem(s) will dictate the case-sensitivity rules when checking files. If you require checks that your
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908474224
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
Review Comment:
I don;'t think so, isn't that just for autoclosables?
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908454527
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
This seems to just be a minor variation on the original test code, but I can change the name.
What do you think "testDeletedFileDetected"?
I'll update the symbolic link test to follow a similar format.
There is also "testFileDoesNotExistSatisfyAny", which is original code.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1915119276
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
Please give me a format of the new method name you'd prefer and I will ensure that all `test...Exists` and `test...DoesNotExist` methods are updated in all test classes.
Such a change will affect `TestRequireFilesSize`, `TestRequireFileChecksum` `TestRequireFilesDontExist`, and `TestRequireFilesExist`; this means touching classes that are unrelated to the bug fix in order to ensure naming consistency.
To be clear, I disagree with this but it is not my project and so I will follow your direction.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-5688266015
> > Please finish this patch-request. :)
>
> As far as I am aware, I made good all the required changes. I do not believe it is for me to mark things as "Resolved" but for the person who raised the issue or another team member.
>
> @slawekjaranowski - Who are you awaiting feedback from? I do not believe it to be me.
@roadSurfer I missed totally this PR ...
@elharo had many comments .. more nits, many thread are open so I got lost in this
I will look again and try to resolve 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
Re: [PR] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-5705377816
Thank you for this PR, and sorry it sat here for so long. It correctly identified a real regression, and the tests you wrote are what finally pinned it down.
The issue turned out to have two halves:
* **Non-canonical paths (`..`, `.`)** — fixed in #1011, which normalizes the path before comparing. The IT you added here passes on current `master` unchanged.
* **Symbolic links** — still broken, exactly as your `testSymbolicLinkExists` shows. `getCanonicalFile()` resolves a link to its target, so the link name never matched.
We went a slightly different route than the revert proposed here: #1031 keeps the case check but resolves with `toRealPath(NOFOLLOW_LINKS)` instead. That leaves the link alone while still correcting case on a case-insensitive filesystem, so symbolic links, `..` paths and the case check from #477 all work at the same time.
Your symbolic link tests for all three rules and the relative-path IT are included in #1031, and you are credited as co-author on the commit. One small note in case it is useful: in `testSymbolicLinkTargetDeletedDetected` the first `rule.execute()` ran before `setFilesList()`, so it was passing on the empty-file-list error rather than on the link check — moved the setup up in #1031.
Closing this in favour of #1031. Thanks again for the report and the tests.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908505078
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -20,17 +20,16 @@
import java.io.File;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assertions.*;
Review Comment:
Updated, and in `TestRequireFilesExist` as well
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1910108240
##########
enforcer-rules/src/site/apt/requireFilesExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Exist
This rule checks that the specified list of files exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
Done. Apols.
##########
enforcer-rules/src/site/apt/requireFilesSize.apt.vm:
##########
@@ -26,7 +26,10 @@
Require File Size
This rule checks that the specified list of files exist and are within the specified size range.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
Done. Apols.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939713220
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -105,19 +109,62 @@ void testEmptyFileListAllowNull() {
}
@Test
- void testFileDoesNotExist() throws EnforcerRuleException, IOException {
+ void testDeletedFileDetected() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
Review Comment:
Akready sorted based on earlier comment
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1937484826
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,12 +110,55 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939745146
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -105,19 +109,62 @@ void testEmptyFileListAllowNull() {
}
@Test
- void testFileDoesNotExist() throws EnforcerRuleException, IOException {
+ void testDeletedFileDetected() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
+ // Rule should now pass as the file was deleted
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkDeletedDetected() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ rule.setFilesList(Collections.singletonList(linkFile));
+ // Check the link is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939710040
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1933953947
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
What should the new names be?
* `testFileDoesNotExist` -> `testDeletedFileDetected`
* `testSymbolicLinkDoesNotExist` -> `testSymbolicLinDeletedDetected`
* `testSymbolicLinkTargetDoesNotExist` -> `testSymbolicLinkTargeDeletedDetected`
* `testFileDoesNotExistSatisfyAny` -> `testDeletedFileDetectedSatisfyAny`
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1934220000
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
Review Comment:
testSymbolicLinkDeletedDetected (spelling) but otherwise sounds good
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939708222
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,12 +110,55 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1939713822
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -105,19 +109,62 @@ void testEmptyFileListAllowNull() {
}
@Test
- void testFileDoesNotExist() throws EnforcerRuleException, IOException {
+ void testDeletedFileDetected() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ // Check the file is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
+ // Rule should now pass as the file was deleted
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkDeletedDetected() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ rule.setFilesList(Collections.singletonList(linkFile));
+ // Check the link is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
+
+ linkFile.delete();
+
+ // Rule should now pass as the target was deleted
+ rule.execute();
+ }
+
+ @Test
+ void testSymbolicLinkTargetDeletedDetected() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ // Check the target is detected as being present
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assumeFalse(e.getMessage() == null);
Review Comment:
Done
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-1828211606
That should be the whitepsace issues sorted. I also generated the site locally and it appeared OK to me.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908491395
##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesDontExist.java:
##########
@@ -107,15 +106,58 @@ void testEmptyFileListAllowNull() {
@Test
void testFileDoesNotExist() throws EnforcerRuleException, IOException {
File f = File.createTempFile("junit", null, temporaryFolder);
+ rule.setFilesList(Collections.singletonList(f));
+
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
f.delete();
assertFalse(f.exists());
- rule.setFilesList(Collections.singletonList(f));
-
rule.execute();
}
+ @Test
+ void testSymbolicLinkDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+
+ try {
+ rule.setFilesList(Collections.singletonList(linkFile));
+ EnforcerRuleException e = assertThrows(EnforcerRuleException.class, rule::execute);
+ assertNotNull(e.getMessage());
+
+ linkFile.delete();
+ rule.execute();
+ } finally {
+ if (linkFile.exists()) {
+ linkFile.delete();
+ }
+ canonicalFile.delete();
+ }
+ }
+
+ @Test
+ void testSymbolicLinkTargetDoesNotExist() throws Exception {
+ File canonicalFile = File.createTempFile("canonical_", null, temporaryFolder);
+ File linkFile = Files.createSymbolicLink(
+ Paths.get(temporaryFolder.getAbsolutePath(), "symbolic.link"),
+ Paths.get(canonicalFile.getAbsolutePath()))
+ .toFile();
+ canonicalFile.delete();
+ rule.setFilesList(Collections.singletonList(linkFile));
+
+ try {
+ rule.execute();
Review Comment:
Correct. This whole class it basically the inverse of `TestRequireFilesExist`.
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "roadSurfer (via GitHub)" <gi...@apache.org>.
roadSurfer commented on code in PR #297:
URL: https://github.com/apache/maven-enforcer/pull/297#discussion_r1908503957
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
Review Comment:
Updated
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
+ filesystem(s) do not support (e.g. a case-sensitive check on a case-insensitive filesystem) then you should consider
Review Comment:
Updated
##########
enforcer-rules/src/site/apt/requireFilesDontExist.apt.vm:
##########
@@ -26,7 +26,10 @@
Require Files Don't Exist
This rule checks that the specified list of files do not exist.
-
+
+ The mounted filesystem(s) will dictate the case-sensitive rules when checking files. If you require checks that your
+ filesystem(s) do not support (e.g. a case-sensitive check on a case-insensitive filesystem) then you should consider
+ adding your own custom plugin that meets your specific needs.
Review Comment:
Updated
--
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] [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths [maven-enforcer]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski closed pull request #297: [MENFORCER-390] "requireFilesExist" no longer handles non-canonical paths
URL: https://github.com/apache/maven-enforcer/pull/297
--
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