diff --git a/sandbox/repoclean/src/main/bash/repoclean.sh b/sandbox/repoclean/src/main/bash/repoclean.sh index f875599c5a..40da34437b 100644 --- a/sandbox/repoclean/src/main/bash/repoclean.sh +++ b/sandbox/repoclean/src/main/bash/repoclean.sh @@ -19,4 +19,13 @@ if [ $cygwin ]; then CP=`cygpath -pw $CP` fi -java -classpath ${CP} org.apache.maven.tools.repoclean.Main $* | tee repoclean-log.txt +JAVA_OPTS="" + +if [ "$1" == "profile" ]; then + JAVA_OPTS="-agentlib:yjpagent=onexit=memory" + # You need to customise this path for your environment + export PATH=$PATH:/usr/local/yourkit/bin/win32 + shift +fi + +java $JAVA_OPTS -classpath ${CP} org.apache.maven.tools.repoclean.Main $* | tee repoclean-log.txt diff --git a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java index a48b5755c8..b3f3a480d7 100644 --- a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java +++ b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java @@ -68,7 +68,7 @@ public class LegacyArtifactDiscoverer private Artifact buildArtifact( String path, Reporter reporter ) throws Exception { - StringTokenizer tokens = new StringTokenizer( path, "/" ); + StringTokenizer tokens = new StringTokenizer( path, "/\\" ); int numberOfTokens = tokens.countTokens();