You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering why maven-shade-plugin produces different results on Windows and MAC. The single wildcard match is working inconsistently depending on the OS.
Please find a test to reproduce this (see comments in test file):
importorg.codehaus.plexus.util.SelectorUtils;
importorg.junit.jupiter.api.Assertions;
importorg.junit.jupiter.api.Test;
publicclassPatternMatcherTest {
@TestvoidtestPatternMatchSingleWildCardLinux() {
/* Passes on Linux - fails on Windows */Assertions.assertFalse(SelectorUtils.matchPath(
"/com/test/*",
"/com/test/test/hallo"));
}
@TestvoidtestPatternMatchDoubleWildCardCaseInLinux() {
/* OK */Assertions.assertTrue(SelectorUtils.matchPath(
"/com/test/**",
"/com/test/test/hallo"));
}
@TestvoidtestPatternMatchDoubleWildCardLinux() {
/* OK */Assertions.assertTrue(SelectorUtils.matchPath(
"/com/test/**",
"/com/test/test/hallo"));
}
@TestvoidtestPatternMatchSingleWildCardWindows() {
/* Fails on Linux - passes on Windows */Assertions.assertFalse(SelectorUtils.matchPath(
"D:\\com\\test\\*",
"D:\\com\\test\\test\\hallo"));
}
@TestvoidtestPatternMatchDoubleWildCardWindows() {
/* OK */Assertions.assertTrue(SelectorUtils.matchPath(
"D:\\com\\test\\**",
"D:\\com\\test\\test\\hallo"));
}
@TestvoidtestPatternMatchSingleWildCardDotLinux() {
/* Fails on Linux - fails on Windows */Assertions.assertFalse(SelectorUtils.matchPath(
"com.test.*",
"com.test.test.hallo"));
}
@TestvoidtestPatternMatchDoubleWildCardDotLinux() {
/* OK */Assertions.assertTrue(SelectorUtils.matchPath(
"com.test.**",
"com.test.test.hallo"));
}
}
BG
The text was updated successfully, but these errors were encountered:
fishermans
added a commit
to fishermans/plexus-utils
that referenced
this issue
Mar 30, 2022
michael-o
changed the title
SekectorUtils.matchPath(..) - inconsistent behaviour on Linux and Windows for single Wildcard pattern
SelectorUtils.matchPath(..) - inconsistent behaviour on Linux and Windows for single Wildcard pattern
Apr 17, 2022
fishermans
added a commit
to fishermans/plexus-utils
that referenced
this issue
Apr 26, 2022
michael-o
changed the title
SelectorUtils.matchPath(..) - inconsistent behaviour on Linux and Windows for single Wildcard pattern
SelectorUtils.matchPath(): inconsistent behaviour on POSIX-like and Windows for single Wildcard pattern
May 17, 2022
Hi,
I was wondering why maven-shade-plugin produces different results on Windows and MAC. The single wildcard match is working inconsistently depending on the OS.
Please find a test to reproduce this (see comments in test file):
BG
The text was updated successfully, but these errors were encountered: