diff options
author | Igor Fedorenko | 2010-12-21 03:40:55 +0000 |
---|---|---|
committer | Igor Fedorenko | 2010-12-21 13:53:33 +0000 |
commit | 9fb0471c727b584fa500d0b94ca236700e6faf68 (patch) | |
tree | 5d42a5770239532ed3ae946d0663a7eaa15d349d /org.eclipse.m2e.cliresolver | |
parent | 6d224823f7340a1de4160c5127f8f4b46af9c120 (diff) | |
download | m2e-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>
Diffstat (limited to 'org.eclipse.m2e.cliresolver')
15 files changed, 309 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 ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") 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="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-artifact&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-artifact-manager&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-artifact-test&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-core&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-error-diagnostics&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-model&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-monitor&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-api&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-descriptor&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-parameter-documenter&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-registry&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-profile&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-project&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-reporting&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-reporting-api&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-repository-metadata&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-script&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-script-ant&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-script-beanshell&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-settings&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-toolchain&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;apache-maven&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-core-it-runner&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;org.maven.ide.eclipse.cliresolver20&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;default/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/> +<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" path="1" type="4"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry externalArchive="T:/apache-maven-2.0.10-SNAPSHOT/boot/classworlds-1.1.jar" path="3" type="2"/> "/> +</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="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-artifact&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-artifact-manager&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-artifact-test&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-core&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-error-diagnostics&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-model&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-monitor&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-api&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-descriptor&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-parameter-documenter&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-plugin-registry&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-profile&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-project&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-reporting&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-reporting-api&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-repository-metadata&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-script&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-script-ant&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-script-beanshell&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-settings&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-toolchain&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;apache-maven&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;maven-core-it-runner&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;javaProject name=&quot;org.maven.ide.eclipse.cliresolver20&quot;/&gt;&#13;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;default/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/> +<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" path="1" type="4"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry externalArchive="T:/apache-maven-2.1-SNAPSHOT/boot/plexus-classworlds-1.2-alpha-12.jar" path="3" type="2"/> "/> +</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> |