fix for windows, add profiling if needed

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163735 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-04-01 01:01:20 +00:00
parent 3638539f6f
commit 89423d23de
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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();