Fix classpath generation for Windows users

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2004-02-13 09:52:13 +00:00
parent f70e21faaa
commit fbece66bf4
1 changed files with 14 additions and 3 deletions

View File

@ -86,13 +86,24 @@ public class Bootstrapper
StringBuffer libs = new StringBuffer();
String repoLocal = replace(downloader.getMavenRepoLocal().getPath(), "\\", "/");
String classpathSeparator;
if (repoLocal.indexOf(":") != -1) //Windows
{
classpathSeparator = ";";
}
else
{
classpathSeparator = ":";
}
for ( Iterator i = dependencies.iterator(); i.hasNext(); )
{
Dependency d = (Dependency) i.next();
classPath.append( repoLocal + "/" + getArtifactPath( d, "/" ) + classpathSeparator );
classPath.append( downloader.getMavenRepoLocal() + "/" + getArtifactPath( d, "/" ) + ":" );
libs.append( downloader.getMavenRepoLocal() + "/" + getArtifactPath( d, "/" ) + "\n" );
libs.append( repoLocal + "/" + getArtifactPath( d, "/" ) + "\n" );
}
writeFile( "bootstrap.classpath", classPath.toString() );