From 2ac4000946e1afdfa377c082f25292f1ffd0c29b Mon Sep 17 00:00:00 2001 From: Fabrizio Giustina Date: Thu, 10 Nov 2005 20:13:58 +0000 Subject: [PATCH] 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 --- .../org/apache/maven/plugin/eclipse/AddMavenRepoMojo.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AddMavenRepoMojo.java b/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AddMavenRepoMojo.java index ed48cbd7f8..2aa81e2727 100644 --- a/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AddMavenRepoMojo.java +++ b/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AddMavenRepoMojo.java @@ -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 {