Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 5 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ limitations under the License.
<name>Plexus Common Utilities</name>
<description>A collection of various utility classes to ease working with strings, files, command lines, XML and
more.</description>
<url>https://codehaus-plexus.github.io/plexus-utils/</url>

<scm>
<connection>scm:git:git@github.com:codehaus-plexus/plexus-utils.git</connection>
<developerConnection>scm:git:git@github.com:codehaus-plexus/plexus-utils.git</developerConnection>
<connection>scm:git:https://github.com/codehaus-plexus/plexus-utils.git</connection>
<developerConnection>${project.scm.connection}</developerConnection>
<tag>plexus-utils-3.5.0</tag>
<url>http://github.com/codehaus-plexus/plexus-utils</url>
<url>https://github.com/codehaus-plexus/plexus-utils/tree/${project.scm.tag}/</url>
</scm>
<issueManagement>
<system>github</system>
<url>http://github.com/codehaus-plexus/plexus-utils/issues</url>
<url>https://github.com/codehaus-plexus/plexus-utils/issues</url>
</issueManagement>
<distributionManagement>
<site>
Expand Down Expand Up @@ -73,35 +74,7 @@ limitations under the License.
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<!--
maven totally change his way to copy symlink
this mean the symlink is copied as a symlink and not anymore as a new file
https://issues.apache.org/jira/browse/MRESOURCES-237
-->
<version>2.7</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>8</release>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/codehaus/plexus/util/MatchPattern.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private MatchPattern(String source, String separator) {
/**
* Gets the source pattern for this matchpattern.
* @return the source string without Ant or Regex pattern markers.
* @since 3.6.0
*/
public String getSource() {
return regexPattern == null ? source : regexPattern;
Expand Down Expand Up @@ -107,6 +108,9 @@ public boolean startsWith(String string) {
return source.startsWith(string);
}

/**
* @since 3.6.0
*/
public static String[] tokenizePathToString(String path, String separator) {
List<String> ret = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(path, separator);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/codehaus/plexus/util/MatchPatterns.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ private MatchPatterns(MatchPattern[] patterns) {
/**
* Gets a list of enclosed MatchPattern sources.
* @return A list of enclosed MatchPattern sources.
* @since 3.6.0
*/
public List<String> getSources() {
List<String> sources = new ArrayList<>();
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/codehaus/plexus/util/SelectorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public static boolean matchPatternStart(String pattern, String str, boolean isCa
}
}

/**
* @since 3.6
*/
public static boolean isAntPrefixedPattern(String pattern) {
return pattern.length() > (ANT_HANDLER_PREFIX.length() + PATTERN_HANDLER_SUFFIX.length())
&& pattern.startsWith(ANT_HANDLER_PREFIX)
Expand Down Expand Up @@ -253,6 +256,9 @@ private static String toOSRelatedPath(String pattern, String separator) {
return pattern;
}

/**
* @since 3.6.0
*/
public static boolean isRegexPrefixedPattern(String pattern) {
return pattern.length() > (REGEX_HANDLER_PREFIX.length() + PATTERN_HANDLER_SUFFIX.length())
&& pattern.startsWith(REGEX_HANDLER_PREFIX)
Expand Down Expand Up @@ -715,6 +721,7 @@ public static String removeWhitespace(String input) {
* @param pattern the pattern to extract from.
* @param separator the system file name separator in the pattern.
* @return The pattern without the Regex or Ant prefix.
* @since 3.6.0
*/
public static String extractPattern(final String pattern, final String separator) {
if (isRegexPrefixedPattern(pattern)) {
Expand Down
Loading