Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2010-12-20 22:40:55 -0500
committerIgor Fedorenko2010-12-21 08:53:33 -0500
commit9fb0471c727b584fa500d0b94ca236700e6faf68 (patch)
tree5d42a5770239532ed3ae946d0663a7eaa15d349d
parent6d224823f7340a1de4160c5127f8f4b46af9c120 (diff)
downloadm2e-core-9fb0471c727b584fa500d0b94ca236700e6faf68.tar.gz
m2e-core-9fb0471c727b584fa500d0b94ca236700e6faf68.tar.xz
m2e-core-9fb0471c727b584fa500d0b94ca236700e6faf68.zip
moved cliresolver from github
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.cliresolver/.classpath9
-rw-r--r--org.eclipse.m2e.cliresolver/.gitignore1
-rw-r--r--org.eclipse.m2e.cliresolver/.project29
-rw-r--r--org.eclipse.m2e.cliresolver/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--org.eclipse.m2e.cliresolver/.settings/org.eclipse.m2e.core.prefs5
-rw-r--r--org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.cliresolver/about.html28
-rw-r--r--org.eclipse.m2e.cliresolver/m2.conf7
-rw-r--r--org.eclipse.m2e.cliresolver/mvn20.launch24
-rw-r--r--org.eclipse.m2e.cliresolver/mvn21.launch24
-rw-r--r--org.eclipse.m2e.cliresolver/pom.xml24
-rw-r--r--org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cli/WorkspaceState.java76
-rw-r--r--org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cliresolver/EclipseWorkspaceArtifactResolver.java46
-rw-r--r--org.eclipse.m2e.cliresolver/src/main/resources/META-INF/plexus/components.xml22
-rw-r--r--org.eclipse.m2e.cliresolver30/.classpath8
-rw-r--r--org.eclipse.m2e.cliresolver30/.gitignore1
-rw-r--r--org.eclipse.m2e.cliresolver30/.project29
-rw-r--r--org.eclipse.m2e.cliresolver30/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.m2e.cliresolver30/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.m2e.cliresolver30/.settings/org.eclipse.m2e.core.prefs5
-rw-r--r--org.eclipse.m2e.cliresolver30/about.html28
-rw-r--r--org.eclipse.m2e.cliresolver30/pom.xml95
-rw-r--r--org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceArtifactRepository.java65
-rw-r--r--org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceReader.java56
25 files changed, 605 insertions, 0 deletions
diff --git a/org.eclipse.m2e.cliresolver/.classpath b/org.eclipse.m2e.cliresolver/.classpath
new file mode 100644
index 00000000..9cb821b3
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.m2e.cliresolver/.gitignore b/org.eclipse.m2e.cliresolver/.gitignore
new file mode 100644
index 00000000..ea8c4bf7
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/org.eclipse.m2e.cliresolver/.project b/org.eclipse.m2e.cliresolver/.project
new file mode 100644
index 00000000..5fb8acab
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2e.cliresolver</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.m2e.cliresolver/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..f5deaa66
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Dec 08 10:33:01 EST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=ignore
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.m2e.cliresolver/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 00000000..78c787a3
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,5 @@
+#Mon Dec 20 22:58:53 EST 2010
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 00000000..b98e82cb
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Aug 28 19:40:43 EDT 2008
+eclipse.preferences.version=1
+project.repository.kind=jira
+project.repository.url=http\://jira.codehaus.org
diff --git a/org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 00000000..f7eb50d0
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Aug 28 19:40:43 EDT 2008
+commit.comment.template=${task.key}\: ${task.description}
+eclipse.preferences.version=1
diff --git a/org.eclipse.m2e.cliresolver/about.html b/org.eclipse.m2e.cliresolver/about.html
new file mode 100644
index 00000000..70e4b67c
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 29, 2010</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/org.eclipse.m2e.cliresolver/m2.conf b/org.eclipse.m2e.cliresolver/m2.conf
new file mode 100644
index 00000000..082d3548
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/m2.conf
@@ -0,0 +1,7 @@
+main is org.apache.maven.cli.MavenCli from plexus.core
+
+set maven.home default ${user.home}/m2
+
+[plexus.core]
+load S:/workspaces/maven-2.0-dev/org.maven.ide.eclipse.cliresolver/target/classes/
+load ${maven.home}/lib/*.jar
diff --git a/org.eclipse.m2e.cliresolver/mvn20.launch b/org.eclipse.m2e.cliresolver/mvn20.launch
new file mode 100644
index 00000000..7dfebe9f
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/mvn20.launch
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.m2e.cliresolver"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-artifact&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-artifact-manager&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-artifact-test&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-core&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-error-diagnostics&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-model&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-monitor&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-api&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-descriptor&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-parameter-documenter&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-registry&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-profile&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-project&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-reporting&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-reporting-api&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-repository-metadata&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-script&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-script-ant&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-script-beanshell&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-settings&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-toolchain&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;apache-maven&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-core-it-runner&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;org.maven.ide.eclipse.cliresolver20&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;T:/apache-maven-2.0.10-SNAPSHOT/boot/classworlds-1.1.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.codehaus.classworlds.Launcher"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-e process-resources"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.m2e.cliresolver"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dclassworlds.conf=S:\workspaces\maven-2.0-dev\org.maven.ide.eclipse.cliresolver\m2.conf -Dmaven.home=T:\apache-maven-2.0.10-SNAPSHOT -Dm2eclipse.workspace.state=S:\workspaces\m2eclipse-test\.metadata\.plugins\org.maven.ide.eclipse\hack.properties"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="S:\workspaces\m2eclipse-test\resourcefiltering-p006"/>
+</launchConfiguration>
diff --git a/org.eclipse.m2e.cliresolver/mvn21.launch b/org.eclipse.m2e.cliresolver/mvn21.launch
new file mode 100644
index 00000000..8fd0543d
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/mvn21.launch
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.m2e.cliresolver"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-artifact&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-artifact-manager&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-artifact-test&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-core&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-error-diagnostics&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-model&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-monitor&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-api&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-descriptor&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-parameter-documenter&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-plugin-registry&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-profile&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-project&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-reporting&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-reporting-api&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-repository-metadata&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-script&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-script-ant&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-script-beanshell&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-settings&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-toolchain&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;apache-maven&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;maven-core-it-runner&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;org.maven.ide.eclipse.cliresolver20&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;T:/apache-maven-2.1-SNAPSHOT/boot/plexus-classworlds-1.2-alpha-12.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.codehaus.classworlds.Launcher"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-e process-resources"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.m2e.cliresolver"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dclassworlds.conf=S:\workspaces\maven-2.0-dev\org.maven.ide.eclipse.cliresolver\m2.conf -Dmaven.home=T:\apache-maven-2.1-SNAPSHOT -Dm2eclipse.workspace.state=S:\workspaces\m2eclipse-test\.metadata\.plugins\org.maven.ide.eclipse\hack.properties"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="S:\workspaces\m2eclipse-test\resourcefiltering-p006"/>
+</launchConfiguration>
diff --git a/org.eclipse.m2e.cliresolver/pom.xml b/org.eclipse.m2e.cliresolver/pom.xml
new file mode 100644
index 00000000..6dca1f40
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2008 Sonatype, Inc. All rights reserved. This program
+ and the accompanying materials are made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.maven.ide.eclipse</groupId>
+ <artifactId>org.maven.ide.eclipse.cliresolver</artifactId>
+ <version>0.12.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>2.0.9</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cli/WorkspaceState.java b/org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cli/WorkspaceState.java
new file mode 100644
index 00000000..6f046c84
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cli/WorkspaceState.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.m2e.cli;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.maven.artifact.Artifact;
+
+public class WorkspaceState {
+ private static Properties state;
+
+ public static synchronized Properties getState() {
+ if (state == null) {
+ state = new Properties();
+ try {
+ String location = System.getProperty("m2eclipse.workspace.state");
+ if (location != null) {
+ BufferedInputStream in = new BufferedInputStream(new FileInputStream(location));
+ try {
+ state.load(in);
+ } finally {
+ in.close();
+ }
+ }
+ } catch (IOException e) {
+ // XXX log
+ }
+ }
+ return state;
+ }
+
+ public static boolean resolveArtifact(Artifact artifact) {
+ File file = findArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getType(),
+ artifact.getBaseVersion());
+
+ if(file == null) {
+ return false;
+ }
+
+ artifact.setFile(file);
+ artifact.setResolved(true);
+ return true;
+ }
+
+ public static File findArtifact(String groupId, String artifactId, String type, String baseVersion) {
+ Properties state = getState();
+ if(state == null) {
+ return null;
+ }
+
+ String key = groupId + ':' + artifactId + ':' + type + ':' + baseVersion;
+ String value = state.getProperty(key);
+
+ if(value == null || value.length() == 0) {
+ return null;
+ }
+
+ File file = new File(value);
+ if(!file.exists()) {
+ return null;
+ }
+
+ return file;
+ }
+
+}
diff --git a/org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cliresolver/EclipseWorkspaceArtifactResolver.java b/org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cliresolver/EclipseWorkspaceArtifactResolver.java
new file mode 100644
index 00000000..e1d02055
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/src/main/java/org/eclipse/m2e/cliresolver/EclipseWorkspaceArtifactResolver.java
@@ -0,0 +1,46 @@
+package org.eclipse.m2e.cliresolver;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.DefaultArtifactResolver;
+import org.eclipse.m2e.cli.WorkspaceState;
+
+public class EclipseWorkspaceArtifactResolver extends DefaultArtifactResolver {
+ public void resolve(Artifact artifact, List remoteRepositories,
+ ArtifactRepository localRepository)
+ throws ArtifactResolutionException, ArtifactNotFoundException {
+ if (!resolveAsEclipseProject(artifact)) {
+ super.resolve(artifact, remoteRepositories, localRepository);
+ }
+ }
+
+ public void resolveAlways(Artifact artifact, List remoteRepositories,
+ ArtifactRepository localRepository)
+ throws ArtifactResolutionException, ArtifactNotFoundException {
+ if (!resolveAsEclipseProject(artifact)) {
+ super.resolveAlways(artifact, remoteRepositories, localRepository);
+ }
+ }
+
+ private boolean resolveAsEclipseProject(Artifact artifact) {
+ Properties state = WorkspaceState.getState();
+
+ if (state == null) {
+ return false;
+ }
+
+ if (artifact == null) {
+ // according to the DefaultArtifactResolver source code, it looks
+ // like artifact can be null
+ return false;
+ }
+
+ return WorkspaceState.resolveArtifact(artifact);
+ }
+
+}
diff --git a/org.eclipse.m2e.cliresolver/src/main/resources/META-INF/plexus/components.xml b/org.eclipse.m2e.cliresolver/src/main/resources/META-INF/plexus/components.xml
new file mode 100644
index 00000000..fed8382d
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver/src/main/resources/META-INF/plexus/components.xml
@@ -0,0 +1,22 @@
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+ <implementation>org.eclipse.m2e.cliresolver.EclipseWorkspaceArtifactResolver</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.artifact.manager.WagonManager</role>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
+ </requirement>
+ </requirements>
+ </component>
+ </components>
+</component-set>
diff --git a/org.eclipse.m2e.cliresolver30/.classpath b/org.eclipse.m2e.cliresolver30/.classpath
new file mode 100644
index 00000000..1e019b73
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.m2e.cliresolver30/.gitignore b/org.eclipse.m2e.cliresolver30/.gitignore
new file mode 100644
index 00000000..ea8c4bf7
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/org.eclipse.m2e.cliresolver30/.project b/org.eclipse.m2e.cliresolver30/.project
new file mode 100644
index 00000000..b276e0bf
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2e.cliresolver30</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.core.resources.prefs b/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000..fc41399d
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Dec 20 22:59:10 EST 2010
+eclipse.preferences.version=1
+encoding//target/classes/META-INF/plexus/components.xml=UTF-8
diff --git a/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..ebea6802
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+#Wed Dec 08 10:33:02 EST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 00000000..c011df1f
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,5 @@
+#Mon Dec 20 22:59:06 EST 2010
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.m2e.cliresolver30/about.html b/org.eclipse.m2e.cliresolver30/about.html
new file mode 100644
index 00000000..70e4b67c
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 29, 2010</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/org.eclipse.m2e.cliresolver30/pom.xml b/org.eclipse.m2e.cliresolver30/pom.xml
new file mode 100644
index 00000000..dd71fad4
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2008 Sonatype, Inc. All rights reserved. This program
+ and the accompanying materials are made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.maven.ide.eclipse</groupId>
+ <artifactId>org.maven.ide.eclipse.cliresolver30</artifactId>
+ <version>0.12.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.0-alpha-5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.aether</groupId>
+ <artifactId>aether-api</artifactId>
+ <version>1.2</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.maven.ide.eclipse</groupId>
+ <artifactId>org.maven.ide.eclipse.cliresolver</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins
+ </groupId>
+ <artifactId>maven-compiler-plugin
+ </artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>org.maven.ide.eclipse:org.maven.ide.eclipse.cliresolver</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.maven.ide.eclipse:org.maven.ide.eclipse.cliresolver</artifact>
+ <includes>
+ <include>org/maven/eclipse/cli/**</include>
+ </includes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceArtifactRepository.java b/org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceArtifactRepository.java
new file mode 100644
index 00000000..b6ee00ce
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceArtifactRepository.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.m2e.cliresolver30;
+
+import java.util.Properties;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.repository.LocalArtifactRepository;
+import org.codehaus.plexus.component.annotations.Component;
+import org.eclipse.m2e.cli.WorkspaceState;
+
+/**
+ * Enables workspace resolution in Maven 3.0-beta-2 and below.
+ */
+@Component( role = LocalArtifactRepository.class, hint = LocalArtifactRepository.IDE_WORKSPACE )
+public final class EclipseWorkspaceArtifactRepository
+ extends LocalArtifactRepository
+{
+
+ protected boolean resolveAsEclipseProject( Artifact artifact )
+ {
+ Properties state = WorkspaceState.getState();
+
+ if (state == null) {
+ return false;
+ }
+
+ if (artifact == null) {
+ // according to the DefaultArtifactResolver source code, it looks
+ // like artifact can be null
+ return false;
+ }
+
+ return WorkspaceState.resolveArtifact(artifact);
+ }
+
+ public Artifact find( Artifact artifact )
+ {
+ resolveAsEclipseProject( artifact );
+ return artifact;
+ }
+
+ public boolean hasLocalMetadata()
+ {
+ return false; // XXX
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return 0; // no state
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ return obj instanceof EclipseWorkspaceArtifactRepository;
+ }
+}
diff --git a/org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceReader.java b/org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceReader.java
new file mode 100644
index 00000000..ebee6ade
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver30/src/main/java/org/eclipse/m2e/cliresolver30/EclipseWorkspaceReader.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.m2e.cliresolver30;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.eclipse.m2e.cli.WorkspaceState;
+import org.sonatype.aether.repository.WorkspaceReader;
+import org.sonatype.aether.repository.WorkspaceRepository;
+
+
+/**
+ * Enables workspace resolution in Maven 3.0-beta-3 and newer.
+ */
+@Component(role = WorkspaceReader.class, hint = "ide")
+public final class EclipseWorkspaceReader implements WorkspaceReader {
+
+ private WorkspaceRepository workspaceRepository;
+
+ public EclipseWorkspaceReader() {
+ this.workspaceRepository = new WorkspaceRepository("ide", getClass());
+ }
+
+ @Override
+ public int hashCode() {
+ return getClass().hashCode(); // no state
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return obj instanceof EclipseWorkspaceReader;
+ }
+
+ public WorkspaceRepository getRepository() {
+ return workspaceRepository;
+ }
+
+ public File findArtifact(org.sonatype.aether.artifact.Artifact artifact) {
+ return WorkspaceState.findArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(),
+ artifact.getBaseVersion());
+ }
+
+ public List<String> findVersions(org.sonatype.aether.artifact.Artifact artifact) {
+ return Collections.emptyList();
+ }
+
+}

Back to the top