Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 changes to make external usage easier #277

Merged

Conversation

Claudenw
Copy link
Contributor

@Claudenw Claudenw commented Oct 19, 2024

Fix for #276 and #279 on V3

This change:

  • Adds a public String source() method to MatchPattern to return the "source" instance value.
  • Makes public MatchPattern method static String[] tokenizePathToString(String path, String separator)
  • Adds public List sources() method to MatchPatterns that to return a list of MatchPattern.source() for each enclosed pattern.
  • Makes public SelectorUtils static boolean isAntPrefixedPattern() method
  • Makes public SelectorUtils static boolean isRegexPrefixedPattern() method
  • Adds a SelectorUtils public static String extractPattern(final string pattern, final String separator) method to extract a simplified pattern without the Ant or Regex prefix and with the Ant path modified by a call to toOSRelatedPath to ensure that it is properly formatted.

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 4, 2024

@slachiewicz if we can get these enhancements in Apache Rat can go back to using this library rather than carrying our own implementations. Your assistance is appreciated.

@slachiewicz
Copy link
Member

Would You be able to add some tests?

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 4, 2024

Absolutely. I will work on them today, when I get time from my actual work.

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 4, 2024

I added the tests and think I found a but as noted in #279

If there is agreement that is a bug, I can fix it as part of this and PR 278

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 5, 2024

@slachiewicz I have added tests to both the V3 and V4 pull requests as well as fixes for #279

@slawekjaranowski
Copy link
Member

I'm not sure if we need maintain 3.x version

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 5, 2024 via email

@slachiewicz
Copy link
Member

that shouldn't be a problem - I can release 4.x and 3.x

@slachiewicz slachiewicz merged commit e8c2d72 into codehaus-plexus:plexus-utils-3.x Nov 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants