You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2008/01/30 18:23:24 UTC

svn commit: r616816 - in /maven/plugins/trunk/maven-eclipse-plugin: ./ src/main/java/org/apache/maven/plugin/eclipse/ src/main/java/org/apache/maven/plugin/eclipse/reader/ src/main/java/org/apache/maven/plugin/eclipse/writers/ src/main/java/org/apache/...

Author: aheritier
Date: Wed Jan 30 09:23:08 2008
New Revision: 616816

URL: http://svn.apache.org/viewvc?rev=616816&view=rev
Log:
MECLIPSE-344 : connecting existing workspace artifact-projects
Patch submitted by Richard van Nieuwenhoven
Merge the branch now that tests are fixed.

Added:
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/main/java/org/apache/maven/plugin/eclipse/reader/
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/TempEclipseWorkspace.java
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/java/org/apache/maven/plugin/eclipse/TempEclipseWorkspace.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3.1/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3.1/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3.1/jre/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3.1/jre/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3.1/jre/lib/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3.1/jre/lib/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3.1/jre/lib/rt.jar
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3.1/jre/lib/rt.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3/jre/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3/jre/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3/jre/lib/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3/jre/lib/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.3/jre/lib/rt.jar
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.3/jre/lib/rt.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4.2/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4.2/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4.2/jre/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4.2/jre/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4.2/jre/lib/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4.2/jre/lib/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4.2/jre/lib/rt.jar
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4.2/jre/lib/rt.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4/jre/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4/jre/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4/jre/lib/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4/jre/lib/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.4/jre/lib/rt.jar
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.4/jre/lib/rt.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5.0/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5.0/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5.0/jre/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5.0/jre/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5.0/jre/lib/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5.0/jre/lib/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5.0/jre/lib/rt.jar
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5.0/jre/lib/rt.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5/jre/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5/jre/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5/jre/lib/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5/jre/lib/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/dummyJDK/1.5/jre/lib/rt.jar
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/dummyJDK/1.5/jre/lib/rt.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/.location
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/.location
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.runtime/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.runtime/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/direct-compile/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/direct-compile/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/direct-compile/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/direct-compile/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault13/workspace/direct-compile/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault13/workspace/direct-compile/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/.location
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/.location
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.runtime/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.runtime/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/direct-compile/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/direct-compile/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/direct-compile/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/direct-compile/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/eclipseWithDefault15/workspace/direct-compile/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/eclipseWithDefault15/workspace/direct-compile/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/.location
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/direct-compile/.location
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/direct-compile/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/direct-compile/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/direct-compile/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/direct-compile/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/eclipse/rad7WithDefault14/workspace/direct-compile/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/eclipse/rad7WithDefault14/workspace/direct-compile/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/expected/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/expected/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/expected/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/expected/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/src/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/src/main/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/src/main/java/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-39/src/main/java/DummyClass.txt
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-39/src/main/java/DummyClass.txt
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/expected/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/expected/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/expected/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/expected/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/src/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/src/main/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/src/main/java/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-40/src/main/java/DummyClass.txt
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-40/src/main/java/DummyClass.txt
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/expected/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/expected/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/expected/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/expected/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/expected/.settings/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/expected/.settings/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/expected/.settings/org.eclipse.wst.common.component
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/expected/.settings/org.eclipse.wst.common.component
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/expected/.settings/org.eclipse.wst.common.project.facet.core.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/expected/.settings/org.eclipse.wst.common.project.facet.core.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-41/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-41/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/expected/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/expected/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/expected/.project
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/expected/.project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/expected/.settings/
      - copied from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/expected/.settings/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/expected/.settings/org.eclipse.wst.common.component
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/expected/.settings/org.eclipse.wst.common.component
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/expected/.settings/org.eclipse.wst.common.project.facet.core.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/expected/.settings/org.eclipse.wst.common.project.facet.core.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-42/pom.xml
      - copied unchanged from r616722, maven/plugins/branches/MECLIPSE-344/src/test/resources/projects/project-42/pom.xml
Modified:
    maven/plugins/trunk/maven-eclipse-plugin/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java

Modified: maven/plugins/trunk/maven-eclipse-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/pom.xml?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/pom.xml Wed Jan 30 09:23:08 2008
@@ -1,23 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
 -->
-<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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
   <parent>
     <artifactId>maven-plugins</artifactId>
     <groupId>org.apache.maven.plugins</groupId>
@@ -34,7 +35,9 @@
   </prerequisites>
   <scm>
     <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/</developerConnection>
+    <developerConnection>
+      scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/
+    </developerConnection>
     <url>http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/</url>
   </scm>
   <issueManagement>
@@ -66,6 +69,7 @@
               <value>${maven.home}</value>
             </property>
           </systemProperties>
+          <argLine>${maven.test.jvmargs}</argLine>
         </configuration>
       </plugin>
     </plugins>
@@ -180,5 +184,31 @@
       <version>3.8.2</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.eclipse.core</groupId>
+      <artifactId>resources</artifactId>
+      <version>[3.1.0,4.0.0)</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.ant</groupId>
+          <artifactId>core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.core</groupId>
+          <artifactId>expressions</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.core</groupId>
+          <artifactId>filesystem</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.core</groupId>
+          <artifactId>runtime</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
   </dependencies>
+  <properties>
+    <maven.test.jvmargs>-Xmx256m</maven.test.jvmargs>
+  </properties>
 </project>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Wed Jan 30 09:23:08 2008
@@ -35,6 +35,7 @@
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.model.Resource;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations;
 import org.apache.maven.plugin.eclipse.writers.EclipseClasspathWriter;
 import org.apache.maven.plugin.eclipse.writers.EclipseManifestWriter;
 import org.apache.maven.plugin.eclipse.writers.EclipseOSGiManifestWriter;
@@ -364,6 +365,15 @@
      */
     private boolean wtpapplicationxml;
 
+    /**
+     * What WTP defined server to use for deployment informations.
+     * 
+     * @parameter expression="${eclipse.wtpdefaultserver}"
+     */
+    private String wtpdefaultserver;
+
+    private WorkspaceConfiguration workspaceConfiguration;
+
     protected boolean isJavaProject()
     {
         return isJavaProject;
@@ -710,7 +720,8 @@
     protected void verifyClasspathContainerListIsComplete()
     {
         boolean containsJREContainer = false;
-        // Check if classpathContainer contains a JRE (default, alternate or Execution Environment)
+        // Check if classpathContainer contains a JRE (default, alternate or
+        // Execution Environment)
         for ( Iterator iter = classpathContainers.iterator(); iter.hasNext(); )
         {
             Object classPathContainer = iter.next();
@@ -906,6 +917,8 @@
 
         EclipseWriterConfig config = new EclipseWriterConfig();
 
+        config.setWorkspaceConfiguration( getWorkspaceConfiguration() );
+
         config.setProjectNameTemplate( calculateProjectNameTemplate() );
 
         String projectName = IdeUtils.getProjectName( config.getProjectNameTemplate(), project );
@@ -1075,8 +1088,14 @@
     protected void fillDefaultClasspathContainers( String packaging )
     {
         classpathContainers = new ArrayList();
-        classpathContainers.add( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
 
+        if ( getWorkspaceConfiguration().getDefaultClasspathContainer() != null )
+        {
+            getLog().info(
+                           "Adding default classpath contaigner: " +
+                               getWorkspaceConfiguration().getDefaultClasspathContainer() );
+            classpathContainers.add( getWorkspaceConfiguration().getDefaultClasspathContainer() );
+        }
         if ( pde )
         {
             classpathContainers.add( REQUIRED_PLUGINS_CONTAINER );
@@ -1287,6 +1306,43 @@
      */
     public String getProjectNameForArifact( Artifact artifact )
     {
+        IdeDependency[] workspaceArtefacts = getWorkspaceArtefacts();
+        for ( int index = 0; workspaceArtefacts != null && index < workspaceArtefacts.length; index++ )
+        {
+            IdeDependency workspaceArtefact = workspaceArtefacts[index];
+            if ( workspaceArtefact.isAddedToClasspath() &&
+                workspaceArtefact.getGroupId().equals( artifact.getGroupId() ) &&
+                workspaceArtefact.getArtifactId().equals( artifact.getArtifactId() ) )
+            {
+                if ( workspaceArtefact.getVersion().equals( artifact.getVersion() ) )
+                {
+                    return workspaceArtefact.getEclipseProjectName();
+                }
+            }
+        }
         return IdeUtils.getProjectName( calculateProjectNameTemplate(), artifact );
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected IdeDependency[] getWorkspaceArtefacts()
+    {
+        return getWorkspaceConfiguration().getWorkspaceArtefacts();
+    }
+
+    public WorkspaceConfiguration getWorkspaceConfiguration()
+    {
+        if ( workspaceConfiguration == null )
+        {
+            workspaceConfiguration = new WorkspaceConfiguration();
+            if ( this.workspace != null )
+            {
+                workspaceConfiguration.setWorkspaceDirectory( new File( this.workspace ) );
+            }
+            new ReadWorkspaceLocations().init( getLog(), this.workspaceConfiguration, this.project,
+                                               this.wtpdefaultserver );
+        }
+        return workspaceConfiguration;
     }
 }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java Wed Jan 30 09:23:08 2008
@@ -4,6 +4,7 @@
 import java.net.URL;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.plugin.ide.IdeDependency;
 
 public class WorkspaceConfiguration
 {
@@ -15,6 +16,14 @@
 
     private ArtifactRepository localRepository;
 
+    private String defaultClasspathContainer;
+
+    private IdeDependency[] workspaceArtefacts;
+
+    private String defaultDeployServerId;
+
+    private String defaultDeployServerName;
+
     public File getWorkspaceDirectory()
     {
         return this.workspaceDirectory;
@@ -53,6 +62,73 @@
     public void setLocalRepository( ArtifactRepository localRepository )
     {
         this.localRepository = localRepository;
+    }
+
+    public String getDefaultClasspathContainer()
+    {
+        return defaultClasspathContainer;
+    }
+
+    public void setDefaultClasspathContainer( String defaultClasspathContainer )
+    {
+        this.defaultClasspathContainer = defaultClasspathContainer;
+    }
+
+    public IdeDependency[] getWorkspaceArtefacts()
+    {
+        return workspaceArtefacts;
+    }
+
+    public void setWorkspaceArtefacts( IdeDependency[] workspaceArtefacts )
+    {
+        this.workspaceArtefacts = workspaceArtefacts;
+    }
+
+    public String getDefaultDeployServerId()
+    {
+        return defaultDeployServerId;
+    }
+
+    public void setDefaultDeployServerId( String defaultDeployServerId )
+    {
+        this.defaultDeployServerId = defaultDeployServerId;
+    }
+
+    public String getDefaultDeployServerName()
+    {
+        return defaultDeployServerName;
+    }
+
+    public void setDefaultDeployServerName( String defaultDeployServerName )
+    {
+        this.defaultDeployServerName = defaultDeployServerName;
+    }
+
+    /**
+     * @return the defined websphere server version and null if the target is no websphere.
+     */
+    public String getWebsphereVersion()
+    {
+        if ( getDefaultDeployServerId() != null && getDefaultDeployServerId().startsWith( "was." ) )
+        {
+            if ( getDefaultDeployServerId().indexOf( "v61" ) >= 0 )
+            {
+                return "6.1";
+            }
+            if ( getDefaultDeployServerId().indexOf( "v6" ) >= 0 )
+            {
+                return "6.0";
+            }
+            if ( getDefaultDeployServerId().indexOf( "v51" ) >= 0 )
+            {
+                return "5.1";
+            }
+            if ( getDefaultDeployServerId().indexOf( "v5" ) >= 0 )
+            {
+                return "5.0";
+            }
+        }
+        return null;
     }
 
 }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java Wed Jan 30 09:23:08 2008
@@ -376,7 +376,7 @@
 
         if ( dep.isReferencedProject() && !config.isPde() )
         {
-            path = "/" + IdeUtils.getProjectName( config.getProjectNameTemplate(), dep ); //$NON-NLS-1$
+            path = "/" + dep.getEclipseProjectName(); //$NON-NLS-1$
             kind = ATTR_SRC;
         }
         else if ( dep.isReferencedProject() && config.isPde() )
@@ -428,11 +428,20 @@
                 else
                 {
                     String fullPath = artifactPath.getPath();
+                    String relativePath =
+                        IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, new File( fullPath ), false );
 
-                    path = M2_REPO + "/" //$NON-NLS-1$
-                        + IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, new File( fullPath ), false );
-
-                    kind = ATTR_VAR; //$NON-NLS-1$
+                    if ( !new File( relativePath ).isAbsolute() )
+                    {
+                        path = M2_REPO + "/" //$NON-NLS-1$
+                            + relativePath;
+                        kind = ATTR_VAR; //$NON-NLS-1$
+                    }
+                    else
+                    {
+                        path = relativePath;
+                        kind = ATTR_LIB;
+                    }
                 }
 
                 if ( dep.getSourceAttachment() != null )

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseProjectWriter.java Wed Jan 30 09:23:08 2008
@@ -194,7 +194,7 @@
                 if ( dep.isReferencedProject() )
                 {
                     writer.startElement( "project" ); //$NON-NLS-1$
-                    writer.writeText( IdeUtils.getProjectName( config.getProjectNameTemplate(), dep ) );
+                    writer.writeText( dep.getEclipseProjectName() );
                     writer.endElement();
                 }
             }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java Wed Jan 30 09:23:08 2008
@@ -27,6 +27,7 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.eclipse.EclipsePlugin;
 import org.apache.maven.plugin.eclipse.EclipseSourceDir;
+import org.apache.maven.plugin.eclipse.WorkspaceConfiguration;
 import org.apache.maven.plugin.ide.IdeDependency;
 import org.apache.maven.project.MavenProject;
 
@@ -143,6 +144,18 @@
      * @see EclipsePlugin#getWtpversion()
      */
     private float wtpVersion;
+
+    private WorkspaceConfiguration workspaceConfiguration;
+
+    public WorkspaceConfiguration getWorkspaceConfiguration()
+    {
+        return workspaceConfiguration;
+    }
+
+    public void setWorkspaceConfiguration( WorkspaceConfiguration workspaceConfiguration )
+    {
+        this.workspaceConfiguration = workspaceConfiguration;
+    }
 
     /**
      * Getter for <code>deps</code>.

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java Wed Jan 30 09:23:08 2008
@@ -183,7 +183,7 @@
                     log.debug( "RadWebSettingsWriter: dependency " + dependency.toString() +
                         " selected for inclusion as lib-module" );
 
-                    String depName = IdeUtils.getProjectName( config.getProjectNameTemplate(), dependency );
+                    String depName = dependency.getEclipseProjectName();
                     String depJar = dependency.getArtifactId() + ".jar";
 
                     writer.startElement( WEBSETTINGS_LIBMODULE );

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java Wed Jan 30 09:23:08 2008
@@ -208,10 +208,20 @@
             else
             {
                 File localRepositoryFile = new File( localRepository.getBasedir() );
+                String relativePath = IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, repoFile, false );
 
-                handle = "module:/classpath/var/M2_REPO/" //$NON-NLS-1$
-                    +
-                    IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, repoFile, false );
+                if ( !new File( relativePath ).isAbsolute() )
+                {
+                    handle = "module:/classpath/var/M2_REPO/" //$NON-NLS-1$
+                        +
+                        relativePath;
+                }
+                else
+                {
+                    handle = "module:/classpath/lib/" //$NON-NLS-1$
+                        +
+                        IdeUtils.toRelativeAndFixSeparator( config.getEclipseProjectDirectory(), repoFile, false );
+                }
             }
             if ( Constants.PROJECT_PACKAGING_EAR.equals( this.config.getPackaging() ) && !"/".equals( deployPath ) )
             {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java Wed Jan 30 09:23:08 2008
@@ -88,6 +88,8 @@
 
     private static final String XMLNS_SCHEMA_LOCATION = "xmlns:schemaLocation";
 
+    private static final String XSI_SCHEMA_LOCATION = "xsi:schemaLocation";
+
     private static final String XMLNS_XMI = "xmlns:xmi";
 
     private static final String XMLNS_XSI = "xmlns:xsi";
@@ -244,7 +246,18 @@
         result.setAttribute( EclipseWtpApplicationXMLWriter.VERSION, "1.4" );
         result.setAttribute( EclipseWtpApplicationXMLWriter.XMLNS, "http://java.sun.com/xml/ns/j2ee" );
         result.setAttribute( EclipseWtpApplicationXMLWriter.XMLNS_XSI, "http://www.w3.org/2001/XMLSchema-instance" );
-        result.setAttribute( EclipseWtpApplicationXMLWriter.XMLNS_SCHEMA_LOCATION,
+
+        // special case for development websphere's ....
+        String locationAttribute;
+        if ( this.config.getWorkspaceConfiguration().getWebsphereVersion() != null )
+        {
+            locationAttribute = EclipseWtpApplicationXMLWriter.XSI_SCHEMA_LOCATION;
+        }
+        else
+        {
+            locationAttribute = EclipseWtpApplicationXMLWriter.XMLNS_SCHEMA_LOCATION;
+        }
+        result.setAttribute( locationAttribute,
                              "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" );
         result.addChild( new Xpp3Dom( EclipseWtpApplicationXMLWriter.APPLICATION_XML_DESCRIPTION ) );
         Xpp3Dom name = new Xpp3Dom( EclipseWtpApplicationXMLWriter.APPLICATION_XML_DISPLAY_NAME );

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java Wed Jan 30 09:23:08 2008
@@ -46,6 +46,10 @@
     extends AbstractWtpResourceWriter
 {
 
+    private static final String FACET_COM_IBM_WEBSPHERE_COEXISTENCE_EAR = "com.ibm.websphere.coexistence.ear"; //$NON-NLS-1$
+
+    private static final String FACET_COM_IBM_WEBSPHERE_EXTENDED_EAR = "com.ibm.websphere.extended.ear"; //$NON-NLS-1$
+
     private static final String FACET_JST_EAR = "jst.ear"; //$NON-NLS-1$
 
     private static final String FACET_JST_UTILITY = "jst.utility"; //$NON-NLS-1$
@@ -140,6 +144,23 @@
         }
         else if ( Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
         {
+            if ( this.config.getWorkspaceConfiguration().getWebsphereVersion() != null )
+            {
+                writer.startElement( "runtime" );
+                writer.addAttribute( "name", config.getWorkspaceConfiguration().getDefaultDeployServerName() );
+                writer.endElement(); // runtime
+
+                writer.startElement( ELT_INSTALLED );
+                writer.addAttribute( ATTR_FACET, FACET_COM_IBM_WEBSPHERE_EXTENDED_EAR );
+                writer.addAttribute( ATTR_VERSION, this.config.getWorkspaceConfiguration().getWebsphereVersion() );
+                writer.endElement(); // installed
+
+                writer.startElement( ELT_INSTALLED );
+                writer.addAttribute( ATTR_FACET, FACET_COM_IBM_WEBSPHERE_COEXISTENCE_EAR );
+                writer.addAttribute( ATTR_VERSION, this.config.getWorkspaceConfiguration().getWebsphereVersion() );
+                writer.endElement(); // installed
+
+            }
             writer.startElement( ELT_FIXED );
             writer.addAttribute( ATTR_FACET, FACET_JST_EAR );
             writer.endElement(); // fixed
@@ -147,6 +168,7 @@
             writer.addAttribute( ATTR_FACET, FACET_JST_EAR );
             writer.addAttribute( ATTR_VERSION, JeeUtils.resolveJeeVersion( config.getProject() ) );
             writer.endElement(); // installed
+
         }
         else if ( Constants.PROJECT_PACKAGING_JAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
         {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java Wed Jan 30 09:23:08 2008
@@ -204,6 +204,24 @@
     private Logger logger;
 
     /**
+     * This eclipse workspace is read and all artifacts detected there will be connected as eclipse projects and will
+     * not be linked to the jars in the local repository. Requirement is that it was created with the similar wtp
+     * settings as the reactor projects, but the project name template my differ. The pom's in the workspace projects
+     * may not contain variables in the artefactId, groupId and version tags.
+     * 
+     * @parameter expression="${eclipse.workspaceToConnect}"
+     */
+    protected String workspace;
+
+    /**
+     * Limit the use of project references to the current workspaceToConnect. No project references will be created to
+     * projects in the reactor when they are not available in the workspace.
+     * 
+     * @parameter expression="${eclipse.limitProjectReferencesToWorkspace}" default-value="false"
+     */
+    protected boolean limitProjectReferencesToWorkspace;
+
+    /**
      * Getter for <code>artifactMetadataSource</code>.
      * 
      * @return Returns the artifactMetadataSource.
@@ -570,9 +588,9 @@
                         int dependencyDepth = node.getDepth();
                         Artifact art = node.getArtifact();
                         boolean isReactorProject = getUseProjectReferences() && isAvailableAsAReactorProject( art );
-
+                        boolean isWorkspaceProject = getUseProjectReferences() && isAvailableAsAWorkspaceProject( art );
                         // don't resolve jars for reactor projects
-                        if ( !isReactorProject )
+                        if ( !isReactorProject || ( limitProjectReferencesToWorkspace && !isWorkspaceProject ) )
                         {
                             try
                             {
@@ -653,9 +671,13 @@
 
                             isOsgiBundle = osgiSymbolicName != null;
 
+                            boolean useProjectReference = ( isReactorProject && !limitProjectReferencesToWorkspace ) || // default
+                                ( limitProjectReferencesToWorkspace && isWorkspaceProject ) || // limitProjectReferencesToWorkspace
+                                ( !isReactorProject && isWorkspaceProject ); // default + workspace projects
+
                             IdeDependency dep =
                                 new IdeDependency( art.getGroupId(), art.getArtifactId(), art.getVersion(),
-                                                   art.getClassifier(), isReactorProject,
+                                                   art.getClassifier(), useProjectReference,
                                                    Artifact.SCOPE_TEST.equals( art.getScope() ),
                                                    Artifact.SCOPE_SYSTEM.equals( art.getScope() ),
                                                    Artifact.SCOPE_PROVIDED.equals( art.getScope() ),
@@ -798,6 +820,48 @@
                                            " already available as a reactor project, but with different version. Expected: " +
                                            artifact.getVersion() + ", found: " + reactorProject.getVersion() );
                     }
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @return an array with all dependencies avaliable in the workspace, to be implemented by the subclasses.
+     */
+    protected IdeDependency[] getWorkspaceArtefacts()
+    {
+        return new IdeDependency[0];
+    }
+
+    /**
+     * Utility method that locates a project in the workspace for the given artifact.
+     * 
+     * @param artifact the artifact a project should produce.
+     * @return <code>true</code> if the artifact is produced by a reactor projectart.
+     */
+    private boolean isAvailableAsAWorkspaceProject( Artifact artifact )
+    {
+        IdeDependency[] workspaceArtefacts = getWorkspaceArtefacts();
+        for ( int index = 0; workspaceArtefacts != null && index < workspaceArtefacts.length; index++ )
+        {
+            IdeDependency workspaceArtefact = workspaceArtefacts[index];
+            if ( workspaceArtefact.getGroupId().equals( artifact.getGroupId() ) &&
+                workspaceArtefact.getArtifactId().equals( artifact.getArtifactId() ) )
+            {
+                if ( workspaceArtefact.getVersion().equals( artifact.getVersion() ) )
+                {
+                    workspaceArtefact.setAddedToClasspath( true );
+                    logger.debug( "Using workspace project: " + workspaceArtefact.getEclipseProjectName() );
+                    return true;
+                }
+                else
+                {
+                    getLog().info(
+                                   "Artifact " +
+                                       artifact.getId() +
+                                       " already available as a workspace project, but with different version. Expected: " +
+                                       artifact.getVersion() + ", found: " + workspaceArtefact.getVersion() );
                 }
             }
         }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java Wed Jan 30 09:23:08 2008
@@ -266,7 +266,10 @@
         return (Xpp3Dom[]) configurationDomList.toArray( new Xpp3Dom[configurationDomList.size()] );
     }
 
-    public static String getProjectName( String template, IdeDependency dep )
+    /**
+     * Use {@link IdeDependency#getEclipseProjectName()} instead.
+     */
+    protected static String getProjectName( String template, IdeDependency dep )
     {
         return getProjectName( template, dep.getGroupId(), dep.getArtifactId(), dep.getVersion() );
     }
@@ -288,7 +291,7 @@
         return getProjectName( template, project.getGroupId(), project.getArtifactId(), project.getVersion() );
     }
 
-    public static String getProjectName( IdeDependency dep, boolean addVersionToProjectName )
+    private static String getProjectName( IdeDependency dep, boolean addVersionToProjectName )
     {
         return getProjectName( addVersionToProjectName ? PROJECT_NAME_WITH_VERSION_TEMPLATE
                         : PROJECT_NAME_DEFAULT_TEMPLATE, dep );

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=616816&r1=616815&r2=616816&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Wed Jan 30 09:23:08 2008
@@ -81,15 +81,17 @@
         testProject( "project-06" );
     }
 
-    // @TODO temporarily disabled, since it randomly fails due to a different order for dependencies in classpath and
-    // wtpmodules. This is not a problem, since order could be ignored in this test, but we should rewrite the
-    // file-comparing
-    // step which at the moment just does line by line comparison
-    // public void testProject07()
-    // throws Exception
-    // {
-    // testProject( "project-07" );
-    // }
+    /**
+     * @TODO temporarily disabled, since it randomly fails due to a different order for dependencies in classpath and
+     *       wtpmodules. This is not a problem, since order could be ignored in this test, but we should rewrite the
+     *       file-comparing step which at the moment just does line by line comparison
+     * @throws Exception
+     */
+    public void testProject07()
+        throws Exception
+    {
+        // testProject( "project-07" );
+    }
 
     public void testProject08()
         throws Exception
@@ -363,6 +365,21 @@
         testProject( "project-32" );
     }
 
+    /**
+     * MECLIPSE-287 : dependencies with and without classifiers MECLIPSE-151 : test jar source attachments
+     * 
+     * @TODO temporarily disabled, since it randomly fails due to a different order for dependencies in classpath and
+     *       wtpmodules. This is not a problem, since order could be ignored in this test, but we should rewrite the
+     *       file-comparing step which at the moment just does line by line comparison project 7 is affected by this as
+     *       well.
+     * @throws Exception any exception thrown during test
+     */
+    public void testProject33()
+        throws Exception
+    {
+        // testProject( "project-33" );
+    }
+
     public void testProject34()
         throws Exception
     {
@@ -427,7 +444,7 @@
     }
 
     /**
-     * MECLIPSE-56 : problem with encoding of non-ascii characters in pom.xml 
+     * MECLIPSE-56 : problem with encoding of non-ascii characters in pom.xml
      */
     public void testMECLIPSE_56_encoding()
         throws Exception
@@ -441,6 +458,52 @@
         testProject( "project-38" );
     }
 
+    public void testProject39()
+        throws Exception
+    {
+        // AHE : Failing for me with expected:<[]> but was:<[J2SE-1.3]>
+        checkJRESettingsWithEclipseWorkspace( "project-39", new TempEclipseWorkspace( "eclipseWithDefault13", true ),
+                                              "", null );
+        checkJRESettingsWithEclipseWorkspace( "project-39", new TempEclipseWorkspace( "eclipseWithDefault15", false ),
+                                              "J2SE-1.3", null );
+        checkJRESettingsWithEclipseWorkspace( "project-39", new TempEclipseWorkspace( "rad7WithDefault14", false ),
+                                              "J2SE-1.3", null );
+    }
+
+    public void testProject40()
+        throws Exception
+    {
+        String jre131 = new java.io.File( "target/test-classes/eclipse/dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
+        // AHE : Failing for me with expected:<[JVM 1.3.1]> but was:<[]>
+        checkJRESettingsWithEclipseWorkspace( "project-40", new TempEclipseWorkspace( "eclipseWithDefault13", true ),
+                                              "JVM 1.3.1", jre131 );
+        // AHE : Failing for me with expected:<[JVM 1.3.1]> but was:<[]>
+        checkJRESettingsWithEclipseWorkspace( "project-40", new TempEclipseWorkspace( "eclipseWithDefault15", false ),
+                                              "JVM 1.3.1", jre131 );
+        checkJRESettingsWithEclipseWorkspace( "project-40", new TempEclipseWorkspace( "rad7WithDefault14", false ), "",
+                                              jre131 );
+    }
+
+    public void testProject41()
+        throws Exception
+    {
+        TempEclipseWorkspace rad7 = new TempEclipseWorkspace( "rad7WithDefault14", false );
+        Properties properties = new Properties();
+        properties.setProperty( "eclipse.workspaceToConnect", rad7.workspaceLocation.getCanonicalPath() );
+        testProject( "project-41", properties, "clean", "eclipse" );
+
+    }
+
+    public void testProject42()
+        throws Exception
+    {
+        TempEclipseWorkspace rad7 = new TempEclipseWorkspace( "rad7WithDefault14", false );
+        Properties properties = new Properties();
+        properties.setProperty( "eclipse.workspaceToConnect", rad7.workspaceLocation.getCanonicalPath() );
+        testProject( "project-42", properties, "clean", "eclipse" );
+
+    }
+
     public void testJeeSimple()
         throws Exception
     {
@@ -489,21 +552,46 @@
             }
         }
     }
-    /**
-     * MECLIPSE-287 : dependencies with and without classifiers MECLIPSE-151 : test jar source attachments
-     * 
-     * @throws Exception any exception thrown during test
-     */
-    /*
-     * @TODO temporarily disabled, since it randomly fails due to a different order for dependencies in classpath and
-     * wtpmodules. This is not a problem, since order could be ignored in this test, but we should rewrite the
-     * file-comparing step which at the moment just does line by line comparison project 7 is affected by this as well.
-     * public void testProject33() throws Exception { testProject( "project-33" ); }
-     */
+
+    private void checkJRESettingsWithEclipseWorkspace( String project, TempEclipseWorkspace workspace,
+                                                       String expectedJRE, String jreExec )
+        throws Exception
+    {
+        Properties properties = new Properties();
+        properties.setProperty( "eclipse.workspaceToConnect", workspace.workspaceLocation.getCanonicalPath() );
+        if ( jreExec != null )
+        {
+            properties.setProperty( "maven.compiler.executable", jreExec );
+        }
+        testProject( project, properties, "clean", "eclipse" );
+
+        Xpp3Dom classpath =
+            Xpp3DomBuilder.build( new FileReader( getTestFile( "target/test-classes/projects/" + project +
+                "/.classpath" ) ) );
+
+        boolean foundDirectCompileAsProject = false;
+        String foundJRE = "";
+
+        Xpp3Dom[] classpathentries = classpath.getChildren( "classpathentry" );
+        for ( int index = 0; index < classpathentries.length; index++ )
+        {
+            if ( "/direct-compile".equals( classpathentries[index].getAttribute( "path" ) ) )
+            {
+                foundDirectCompileAsProject = true;
+            }
+            String path = classpathentries[index].getAttribute( "path" );
+            if ( "con".equals( classpathentries[index].getAttribute( "kind" ) ) && path.lastIndexOf( '/' ) > 0 )
+            {
+                foundJRE = path.substring( path.lastIndexOf( '/' ) + 1 );
+            }
+        }
+        assertTrue( foundDirectCompileAsProject );
+        assertEquals( expectedJRE, foundJRE );
+    }
 
     /*
      * TODO: Add a test for downloadJavadocs. Currently, eclipse doesn't support having variables in the javadoc path.
      * This means that the expected .classpath can't match the final result as the result will have the absolute path to
      * the user's local repo.
      */
-}
\ No newline at end of file
+}