MNG-1433 eclipse:add-maven-repo not setting classpathVariable.M2_REPO correctly on windows

+ the add maven repo doesn't require a pom

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@332363 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Fabrizio Giustina 2005-11-10 20:13:58 +00:00
parent 52bd946dac
commit 2ac4000946
1 changed files with 4 additions and 1 deletions

View File

@ -27,11 +27,13 @@ import java.util.Properties;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.plexus.util.StringUtils;
/**
* A Maven2 plugin to ensure that the classpath variable MAVEN_REPO exists in the Eclipse environment.
*
* @goal add-maven-repo
* @requiresProject false
*/
public class AddMavenRepoMojo
extends AbstractMojo
@ -85,7 +87,8 @@ public class AddMavenRepoMojo
}
}
props.put( "\norg.eclipse.jdt.core.classpathVariable.M2_REPO", localRepository.getBasedir() ); //$NON-NLS-1$
props.put( "org.eclipse.jdt.core.classpathVariable.M2_REPO", //$NON-NLS-1$
StringUtils.replace( localRepository.getBasedir(), ":", "\\:" ) ); //$NON-NLS-1$ //$NON-NLS-2$
try
{