You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/11/13 17:10:44 UTC

svn commit: r474384 [1/2] - in /maven/plugins/trunk/maven-eclipse-plugin: ./ src/main/java/org/apache/maven/plugin/eclipse/ src/main/java/org/apache/maven/plugin/eclipse/writers/ src/main/java/org/apache/maven/plugin/eclipse/writers/rad/ src/main/java/...

Author: jdcasey
Date: Mon Nov 13 08:10:39 2006
New Revision: 474384

URL: http://svn.apache.org/viewvc?view=rev&rev=474384
Log:
[MECLIPSE-137] Merging MECLIPSE-137 branch back to the trunk.

Added:
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/Constants.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/Constants.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/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/rad/RadWebsiteConfigWriter.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/ExecutionFailedException.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/ExecutionFailedException.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-25/src/main/java/test.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/.modulemaps
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/.modulemaps
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/META-INF/application.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/j2ee
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/j2ee
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/classpath
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/settings
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/settings
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/java/DummyClass.txt
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/WEB-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/WEB-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/websettings
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/websettings
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/classpath
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/ejb-jar.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/j2ee
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/j2ee
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/src/main/java/DummyClass.txt
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/classpath
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/java/DummyClass.txt
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/.modulemaps
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/.modulemaps
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/application.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF-2/application.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF/.modulemaps
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF/.modulemaps
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF/application.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/META-INF/application.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/j2ee
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/j2ee
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-1/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/classpath
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/settings
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/settings
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/java/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/java/DummyClass.txt
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/java/DummyClass.txt
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/META-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/META-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/META-INF/expected_MANIFEST.MF
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/WEB-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/WEB-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/WEB-INF/web.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/src/main/webapp/WEB-INF/web.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/websettings
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-2/websettings
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/classpath
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/META-INF/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/META-INF/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/META-INF/ejb-jar.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/META-INF/ejb-jar.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/ejbModule/META-INF/expected_MANIFEST.MF
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/j2ee
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/j2ee
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/pom.xml
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/project
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/main/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/main/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/main/java/
      - copied from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/main/java/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/main/java/DummyClass.txt
      - copied unchanged from r474380, maven/plugins/branches/MECLIPSE-137/maven-eclipse-plugin/src/test/resources/projects/project-rad-5/project-rad-3/src/main/java/DummyClass.txt
Modified:
    maven/plugins/trunk/maven-eclipse-plugin/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
    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/writers/EclipseProjectWriter.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/resources/org/apache/maven/plugin/eclipse/messages.properties
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/InstallPluginsMojoTest.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-01/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-02/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-03/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-04/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-05/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-06/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-07/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-08/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-09/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-10/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-11/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-12/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-14/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-18/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-19/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-20/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-21/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-23/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-24/pom.xml

Modified: maven/plugins/trunk/maven-eclipse-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/pom.xml?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/pom.xml Mon Nov 13 08:10:39 2006
@@ -36,6 +36,12 @@
             <exclude>**/EclipsePluginMasterProjectTest.java</exclude>
             <exclude>**/InstallPluginsMojoTest.java</exclude>
           </excludes>
+          <systemProperties>
+            <property>
+              <name>maven.home</name>
+              <value>${env.M2_HOME}</value>
+            </property>
+          </systemProperties>
         </configuration>
       </plugin>
     </plugins>
@@ -56,6 +62,12 @@
       <groupId>easymock</groupId>
       <artifactId>easymock</artifactId>
       <version>1.2_Java1.3</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-plugin-testing-tools</artifactId>
+      <version>1.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java Mon Nov 13 08:10:39 2006
@@ -122,7 +122,14 @@
         {
             delete( settingsDir );
         }
+        
+        cleanExtras();
+    }
 
+    protected void cleanExtras()
+        throws MojoExecutionException
+    {
+        // extension point.
     }
 
     /**
@@ -131,7 +138,7 @@
      * @param f File to be deleted
      * @throws MojoExecutionException only if a file exists and can't be deleted
      */
-    private void delete( File f )
+    protected void delete( File f )
         throws MojoExecutionException
     {
         if ( f.isDirectory() )

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?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- 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 Mon Nov 13 08:10:39 2006
@@ -21,6 +21,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Set;
@@ -92,7 +94,7 @@
 
     private static final String COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER = "org.eclipse.jdt.launching.JRE_CONTAINER"; //$NON-NLS-1$
 
-    private static final String REQUIRED_PLUGINS_CONTAINER = "org.eclipse.pde.core.requiredPlugins"; //$NON-NLS-1$
+    private static final String REQUIRED_PLUGINS_CONTAINER = "org.eclipse.pde.core.requiredPlugins"; //$NON-NLS-1$  
 
     //  warning, order is important for binary search
     public static final String[] WTP_SUPPORTED_VERSIONS = new String[] { "1.0", "1.5", "R7", "none" }; //$NON-NLS-1$ //$NON-NLS-2$  //$NON-NLS-3$
@@ -111,27 +113,27 @@
      * List of eclipse project natures. By default the
      * <code>org.eclipse.jdt.core.javanature</code> nature plus the needed WTP
      * natures are added. Natures added using this property <strong>replace</strong> the default list.
-     *
+     * 
      * <pre>
      * &lt;projectnatures&gt;
      *    &lt;projectnature&gt;org.eclipse.jdt.core.javanature&lt;/projectnature&gt;
      *    &lt;projectnature&gt;org.eclipse.wst.common.modulecore.ModuleCoreNature&lt;/projectnature&gt;
      * &lt;/projectnatures&gt;
      * </pre>
-     *
+     * 
      * @parameter
      */
     private List projectnatures;
 
     /**
      * List of eclipse project natures to be added to the default ones.
-     *
+     * 
      * <pre>
      * &lt;additionalProjectnatures&gt;
      *    &lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;/projectnature&gt;
      * &lt;/additionalProjectnatures&gt;
      * </pre>
-     *
+     * 
      * @parameter
      */
     private List additionalProjectnatures;
@@ -139,7 +141,7 @@
     /**
      * List of eclipse build commands. By default the <code>org.eclipse.jdt.core.javabuilder</code> builder plus the needed
      * WTP builders are added. Configuration example:
-     *
+     * 
      * <pre>
      * &lt;buildcommands&gt;
      *    &lt;buildcommand&gt;org.eclipse.wst.common.modulecore.ComponentStructuralBuilder&lt;/buildcommand&gt;
@@ -147,27 +149,27 @@
      *    &lt;buildcommand&gt;org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver&lt;/buildcommand&gt;
      * &lt;/buildcommands&gt;
      * </pre>
-     *
+     * 
      * @parameter
      */
     private List buildcommands;
 
     /**
      * List of eclipse build commands to be added to the default ones.
-     *
+     * 
      * <pre>
      * &lt;additionalBuildcommands&gt;
      *    &lt;buildcommand&gt;org.springframework.ide.eclipse.core.springbuilder&lt;/buildcommand&gt;
      * &lt;/additionalBuildcommands&gt;
      * </pre>
-     *
+     * 
      * @parameter
      */
     private List additionalBuildcommands;
 
     /**
      * List of container classpath entries. By default the <code>org.eclipse.jdt.launching.JRE_CONTAINER</code> classpath
-     * container is added. Configuration example:
+     * container is added. Configuration example: 
      * <pre>
      * &lt;classpathContainers&gt;
      *    &lt;classpathContainer&gt;org.eclipse.jdt.launching.JRE_CONTAINER&lt;/classpathContainer&gt;
@@ -175,7 +177,7 @@
      *    &lt;classpathContainer&gt;org.eclipse.jst.j2ee.internal.web.container/artifact&lt;/classpathContainer&gt;
      * &lt;/classpathContainers&gt;
      * </pre>
-     *
+     * 
      * @parameter
      */
     private List classpathContainers;
@@ -190,7 +192,7 @@
 
     /**
      * Eclipse workspace directory.
-     *
+     * 
      * @parameter expression="${eclipse.workspace}" alias="outputDir"
      */
     private File eclipseProjectDir;
@@ -199,7 +201,7 @@
      * When set to false, the plugin will not create sub-projects and instead
      * reference those sub-projects using the installed package in the local
      * repository
-     *
+     * 
      * @parameter expression="${eclipse.useProjectReferences}" default-value="true"
      * @required
      */
@@ -207,7 +209,7 @@
 
     /**
      * The default output directory
-     *
+     * 
      * @parameter expression="${outputDirectory}" alias="outputDirectory" default-value="${project.build.outputDirectory}"
      * @required
      */
@@ -216,7 +218,7 @@
     /**
      * The version of WTP for which configuration files will be generated.
      * The default value is "none" (don't generate WTP configuration), supported versions are "R7" and "1.0"
-     *
+     * 
      * @parameter expression="${wtpversion}" default-value="none"
      */
     private String wtpversion;
@@ -226,22 +228,22 @@
      * the .project file. Additionally it copies all libraries to a project local directory and
      * references them instead of referencing the files in the local Maven repository. It also
      * ensured that the "Bundle-Classpath" in META-INF/MANIFEST.MF is synchronized.
-     *
+     * 
      * @parameter expression="${eclipse.pde}" default-value="false"
      */
     private boolean pde;
 
     /**
      * The relative path of the manifest file
-     *
+     * 
      * @parameter expression="${eclipse.manifest}" default-value="${basedir}/META-INF/MANIFEST.MF"
      */
     private File manifest;
 
     /**
      * Allow to configure additional generic configuration files for eclipse that will be written out to disk when
-     * running eclipse:eclipse. For each file you can specify the name and the text content.
-     *
+     * running eclipse:eclipse. FOr each file you can specify the name and the text content.
+     * 
      * <pre>
      * &lt;additionalConfig&gt;
      *    &lt;file&gt;
@@ -257,7 +259,7 @@
      *    &lt;/file&gt;
      * &lt;/additionalConfig&gt;
      * </pre>
-     *
+     * 
      * @parameter
      */
     private EclipseConfigFile[] additionalConfig;
@@ -271,6 +273,11 @@
      * Not a plugin parameter. Is this a java project?
      */
     private boolean isJavaProject;
+    
+    protected boolean isJavaProject()
+    {
+        return isJavaProject;
+    }
 
     /**
      * Getter for <code>buildcommands</code>.
@@ -440,23 +447,83 @@
     public boolean setup()
         throws MojoExecutionException
     {
+        boolean ready = true;
 
-        if ( eclipseDownloadSources )
+        checkDeprecations();
+
+        ready = validate();
+
+        String packaging = executedProject.getPackaging();
+
+        // TODO: Why are we using project in some places, and executedProject in others??
+        ArtifactHandler artifactHandler = this.project.getArtifact().getArtifactHandler();
+
+        // ear projects don't contain java sources
+        isJavaProject = Constants.LANGUAGE_JAVA.equals( artifactHandler.getLanguage() )
+            && !Constants.PROJECT_PACKAGING_EAR.equals( packaging );
+
+        setupExtras();
+
+        parseConfigurationOptions();
+
+        // defaults
+        if ( projectnatures == null )
         {
-            // deprecated warning
-            getLog().warn( Messages.getString( "EclipsePlugin.deprecatedpar", new Object[] { //$NON-NLS-1$
-                                               "eclipse.downloadSources", //$NON-NLS-1$
-                                                   "downloadSources" } ) ); //$NON-NLS-1$
-            downloadSources = true;
+            fillDefaultNatures( packaging );
         }
 
-        if ( Arrays.binarySearch( WTP_SUPPORTED_VERSIONS, wtpversion ) < 0 )
+        if ( additionalProjectnatures != null )
         {
-            throw new MojoExecutionException( Messages
-                .getString( "EclipsePlugin.unsupportedwtp", new Object[] { //$NON-NLS-1$
-                            wtpversion, StringUtils.join( WTP_SUPPORTED_VERSIONS, " " ) } ) ); //$NON-NLS-1$
+            projectnatures.addAll( additionalProjectnatures );
+        }
+
+        if ( buildcommands == null )
+        {
+            fillDefaultBuilders( packaging );
+        }
+        else
+        {
+            convertBuildCommandList( buildcommands );
+        }
+
+        if ( additionalBuildcommands != null )
+        {
+            convertBuildCommandList( additionalBuildcommands );
+            buildcommands.addAll( additionalBuildcommands );
+        }
+
+        if ( classpathContainers == null )
+        {
+            fillDefaultClasspathContainers( packaging );
+        }
+        else
+        {
+            verifyClasspathContainerListIsComplete();
+        }
+
+        // ready to start
+        return ready;
+    }
+
+    protected void convertBuildCommandList( List commands )
+    {
+        if ( commands != null )
+        {
+            for ( ListIterator i = commands.listIterator(); i.hasNext(); )
+            {
+                Object command = i.next();
+
+                if ( command instanceof String )
+                {
+                    command = new BuildCommand( (String) command );
+                    i.set( command );
+                }
+            }
         }
+    }
 
+    private void parseConfigurationOptions()
+    {
         if ( "R7".equalsIgnoreCase( wtpversion ) ) //$NON-NLS-1$
         {
             wtpVersionFloat = 0.7f;
@@ -473,10 +540,37 @@
         {
             getLog().info( Messages.getString( "EclipsePlugin.wtpversion", wtpversion ) );
         }
+    }
 
-        String packaging = executedProject.getPackaging();
+    protected void setupExtras()
+        throws MojoExecutionException
+    {
+        // extension point.
+    }
 
+    protected void verifyClasspathContainerListIsComplete()
+    {
+        // this is an extension point.
+        if ( !classpathContainers.contains( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER ) ) //$NON-NLS-1$
+        {
+            getLog().warn( Messages.getString( "EclipsePlugin.missingjrecontainer" ) ); //$NON-NLS-1$
+            classpathContainers.add( 0, COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
+        }
+    }
+
+    private boolean validate()
+        throws MojoExecutionException
+    {
         // validate sanity of the current m2 project
+        if ( Arrays.binarySearch( WTP_SUPPORTED_VERSIONS, wtpversion ) < 0 )
+        {
+            throw new MojoExecutionException( Messages
+                .getString( "EclipsePlugin.unsupportedwtp", new Object[] { //$NON-NLS-1$
+                            wtpversion, StringUtils.join( WTP_SUPPORTED_VERSIONS, " " ) } ) ); //$NON-NLS-1$
+        }
+
+        String packaging = executedProject.getPackaging();
+
         assertNotEmpty( executedProject.getGroupId(), POM_ELT_GROUP_ID ); //$NON-NLS-1$
         assertNotEmpty( executedProject.getArtifactId(), POM_ELT_ARTIFACT_ID ); //$NON-NLS-1$
 
@@ -500,7 +594,13 @@
         {
             eclipseProjectDir = executedProject.getFile().getParentFile();
         }
-        else if ( !eclipseProjectDir.equals( executedProject.getFile().getParentFile() ) )
+        
+        if ( !eclipseProjectDir.exists() && !eclipseProjectDir.mkdirs() )
+        {
+            throw new MojoExecutionException( Messages.getString( "EclipsePlugin.cantcreatedir", eclipseProjectDir ) ); //$NON-NLS-1$
+        }
+        
+        if ( !eclipseProjectDir.equals( executedProject.getFile().getParentFile() ) )
         {
             if ( !eclipseProjectDir.isDirectory() )
             {
@@ -513,104 +613,42 @@
             }
         }
 
-        // end validate
-
-        ArtifactHandler artifactHandler = this.project.getArtifact().getArtifactHandler();
-        // ear projects don't contain java sources
-        isJavaProject = "java".equals( artifactHandler.getLanguage() ) && !"ear".equals( packaging );
+        validateExtras();
 
-        // defaults
-        if ( projectnatures == null )
-        {
-            fillDefaultNatures( packaging );
-        }
-
-        if ( additionalProjectnatures != null )
-        {
-            projectnatures.addAll( additionalProjectnatures );
-        }
-
-        if ( buildcommands == null )
-        {
-            fillDefaultBuilders( packaging );
-        }
-        else
-        {
-            convertBuildCommandList( buildcommands );
-        }
+        return true;
+    }
 
-        if ( additionalBuildcommands != null )
-        {
-            convertBuildCommandList( additionalBuildcommands );
-            buildcommands.addAll( additionalBuildcommands );
-        }
+    protected void validateExtras()
+    {
+        // provided for extension.
+    }
 
-        if ( classpathContainers == null )
-        {
-            fillDefaultClasspathContainers( packaging );
-        }
-        else if ( !classpathContainers.contains( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER ) ) //$NON-NLS-1$
+    private void checkDeprecations()
+    {
+        if ( eclipseDownloadSources )
         {
-            getLog().warn( Messages.getString( "EclipsePlugin.missingjrecontainer" ) ); //$NON-NLS-1$
-            classpathContainers.add( 0, COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
+            // deprecated warning
+            getLog().warn( Messages.getString( "EclipsePlugin.deprecatedpar", new Object[] { //$NON-NLS-1$
+                                               "eclipse.downloadSources", //$NON-NLS-1$
+                                                   "downloadSources" } ) ); //$NON-NLS-1$
+            downloadSources = true;
         }
 
-        // ready to start
-        return true;
+        checkExtraDeprecations();
     }
 
-    protected void convertBuildCommandList( List commands )
+    protected void checkExtraDeprecations()
     {
-        if ( commands != null )
-        {
-            for ( ListIterator i = commands.listIterator(); i.hasNext(); )
-            {
-                Object command = i.next();
-
-                if ( command instanceof String )
-                {
-                    command = new BuildCommand( (String) command );
-                    i.set( command );
-                }
-            }
-        }
+        // provided for extension.
     }
 
     public void writeConfiguration( IdeDependency[] deps )
         throws MojoExecutionException
     {
-        File projectBaseDir = executedProject.getFile().getParentFile();
+        EclipseWriterConfig config = createEclipseWriterConfig( deps );
 
-        // build a list of UNIQUE source dirs (both src and resources) to be
-        // used in classpath and wtpmodules
-        EclipseSourceDir[] sourceDirs = buildDirectoryList( executedProject, eclipseProjectDir, buildOutputDirectory );
-
-        EclipseWriterConfig config = new EclipseWriterConfig();
-
-        // TODO: add mojo param 'addVersionToProjectName' and if set append
-        // -version to the project name.
-        config.setEclipseProjectName( project.getArtifactId() );
-
-        // XXX TODO: change the buildCommands param to match
-        // <buildCommands>
-        //   <buildCommand>
-        //     <name>....</name>
-        //     <arguments>
-        //       <somekey>somevalue</somekey>
-        //     </arguments>
-
-        config.setBuildCommands( buildcommands );
-        config.setBuildOutputDirectory( buildOutputDirectory );
-        config.setClasspathContainers( classpathContainers );
-        config.setDeps( deps );
-        config.setEclipseProjectDirectory( eclipseProjectDir );
-        config.setLocalRepository( localRepository );
-        config.setManifestFile( manifest );
-        config.setPde( pde );
-        config.setProject( project );
-        config.setProjectBaseDir( projectBaseDir );
-        config.setProjectnatures( projectnatures );
-        config.setSourceDirs( sourceDirs );
+        // NOTE: This could change the config!
+        writeExtraConfiguration( config );
 
         if ( wtpVersionFloat == 0.7f )
         {
@@ -621,17 +659,18 @@
         {
             new EclipseWtpFacetsWriter().init( getLog(), config ).write();
         }
-
         if ( wtpVersionFloat == 1.0f )
         {
+
             new EclipseWtpComponentWriter().init( getLog(), config ).write();
         }
-
         if ( wtpVersionFloat >= 1.5 )
         {
             new EclipseWtpComponent15Writer().init( getLog(), config ).write();
         }
 
+        new EclipseProjectWriter().init( getLog(), config ).write();
+
         new EclipseSettingsWriter().init( getLog(), config ).write();
 
         if ( isJavaProject )
@@ -639,8 +678,6 @@
             new EclipseClasspathWriter().init( getLog(), config ).write();
         }
 
-        new EclipseProjectWriter().init( getLog(), config ).write();
-
         if ( pde )
         {
             this.getLog().info( "The Maven Eclipse plugin runs in 'pde'-mode." );
@@ -676,6 +713,74 @@
                                            project.getArtifactId(), eclipseProjectDir.getAbsolutePath() } ) );
     }
 
+    protected EclipseWriterConfig createEclipseWriterConfig( IdeDependency[] deps )
+        throws MojoExecutionException
+    {
+        File projectBaseDir = executedProject.getFile().getParentFile();
+
+        // build a list of UNIQUE source dirs (both src and resources) to be
+        // used in classpath and wtpmodules
+        EclipseSourceDir[] sourceDirs = buildDirectoryList( executedProject, eclipseProjectDir, buildOutputDirectory );
+
+        EclipseWriterConfig config = new EclipseWriterConfig();
+
+        // TODO: add mojo param 'addVersionToProjectName' and if set append
+        // -version to the project name.
+        config.setEclipseProjectName( project.getArtifactId() );
+        
+        Set convertedBuildCommands = new LinkedHashSet();
+        
+        if ( buildcommands != null )
+        {
+            for ( Iterator it = buildcommands.iterator(); it.hasNext(); )
+            {
+                Object cmd = it.next();
+                
+                if ( cmd instanceof BuildCommand )
+                {
+                    convertedBuildCommands.add( (BuildCommand) cmd );
+                }
+                else
+                {
+                    convertedBuildCommands.add( new BuildCommand( (String) cmd ) );
+                }
+            }
+        }
+        
+        config.setBuildCommands( new LinkedList( convertedBuildCommands ) );
+
+        config.setBuildOutputDirectory( buildOutputDirectory );
+        config.setClasspathContainers( classpathContainers );
+        config.setDeps( deps );
+        config.setEclipseProjectDirectory( eclipseProjectDir );
+        config.setLocalRepository( localRepository );
+        config.setManifestFile( manifest );
+        config.setPde( pde );
+        config.setProject( project );
+        config.setProjectBaseDir( projectBaseDir );
+        config.setProjectnatures( projectnatures );
+        config.setSourceDirs( sourceDirs );
+
+        return config;
+    }
+
+    /**
+     * Write any extra configuration information for the Eclipse project. This is an extension
+     * point, called before the main configurations are written.
+     * <br/>
+     * <b>
+     * NOTE: This could change the config!
+     * </b>
+     * 
+     * @param config
+     * @throws MojoExecutionException
+     */
+    protected void writeExtraConfiguration( EclipseWriterConfig config )
+        throws MojoExecutionException
+    {
+        // extension point.
+    }
+
     private void assertNotEmpty( String string, String elementName )
         throws MojoExecutionException
     {
@@ -685,7 +790,7 @@
         }
     }
 
-    private void fillDefaultNatures( String packaging )
+    protected void fillDefaultNatures( String packaging )
     {
         projectnatures = new ArrayList();
 
@@ -716,7 +821,7 @@
 
     }
 
-    private void fillDefaultClasspathContainers( String packaging )
+    protected void fillDefaultClasspathContainers( String packaging )
     {
         classpathContainers = new ArrayList();
         classpathContainers.add( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
@@ -727,7 +832,7 @@
         }
     }
 
-    private void fillDefaultBuilders( String packaging )
+    protected void fillDefaultBuilders( String packaging )
     {
         buildcommands = new ArrayList();
 
@@ -795,12 +900,13 @@
         return (EclipseSourceDir[]) directories.toArray( new EclipseSourceDir[directories.size()] );
     }
 
-    private void extractSourceDirs( Set directories, List sourceRoots, File basedir, File projectBaseDir,
-                                           boolean test, String output )
+    private void extractSourceDirs( Set directories, List sourceRoots, File basedir, File projectBaseDir, boolean test,
+                                    String output )
         throws MojoExecutionException
     {
         for ( Iterator it = sourceRoots.iterator(); it.hasNext(); )
         {
+
             File sourceRootFile = new File( (String) it.next() );
 
             if ( sourceRootFile.isDirectory() )
@@ -808,10 +914,7 @@
                 String sourceRoot = IdeUtils.toRelativeAndFixSeparator( projectBaseDir, sourceRootFile, !projectBaseDir
                     .equals( basedir ) );
 
-                if ( !directories.add( new EclipseSourceDir( sourceRoot, output, false, test, null, null, false ) ) )
-                {
-                    getLog().warn( "Not adding source dir " + sourceRoot + "; path already present");
-                }
+                directories.add( new EclipseSourceDir( sourceRoot, output, false, test, null, null, false ) );
             }
         }
     }
@@ -823,6 +926,9 @@
         for ( Iterator it = resources.iterator(); it.hasNext(); )
         {
             Resource resource = (Resource) it.next();
+
+            System.out.println( "Processing resource dir: " + resource.getDirectory() );
+
             String includePattern = null;
             String excludePattern = null;
 
@@ -843,6 +949,7 @@
 
             if ( !resourceDirectory.exists() || !resourceDirectory.isDirectory() )
             {
+                System.out.println( "Resource dir: " + resourceDirectory + " either missing or not a directory." );
                 continue;
             }
 
@@ -865,10 +972,10 @@
                 output = IdeUtils.toRelativeAndFixSeparator( projectBaseDir, outputFile, false );
             }
 
-            if ( !directories.add( new EclipseSourceDir( resourceDir, output, true, test, includePattern, excludePattern, resource.isFiltering() ) ) )
-            {
-                getLog().warn( "Not adding resource dir " + resourceDir + "; path already present");
-            }
+            System.out.println( "Adding eclipse source dir: { " + resourceDir + ", " + output + ", true, " + test
+                + ", " + includePattern + ", " + excludePattern + " }." );
+
+            directories.add( new EclipseSourceDir( resourceDir, output, true, test, includePattern, excludePattern, resource.isFiltering() ) );
         }
     }
 

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?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- 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 Mon Nov 13 08:10:39 2006
@@ -143,7 +143,7 @@
 
         for ( Iterator iter = config.getBuildCommands().iterator(); iter.hasNext(); )
         {
-            buildCommands.add( iter.next() );
+            buildCommands.add( (BuildCommand) iter.next() );
         }
 
         Writer w;

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?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- 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 Mon Nov 13 08:10:39 2006
@@ -368,6 +368,11 @@
     private List missingSourceDependencies = new ArrayList();
 
     /**
+     * Cached array of resolved dependencies.
+     */
+    private IdeDependency[] ideDeps;
+
+    /**
      * @see org.codehaus.plexus.logging.LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
      */
     public void enableLogging( Logger logger )
@@ -408,162 +413,165 @@
     protected IdeDependency[] doDependencyResolution()
         throws MojoExecutionException
     {
-        MavenProject project = getProject();
-        ArtifactRepository localRepo = getLocalRepository();
-
-        List dependencies = getProject().getDependencies();
-
-        // Collect the list of resolved IdeDependencies.
-        List dependencyList = new ArrayList();
-
-        if ( dependencies != null )
+        if ( ideDeps == null )
         {
-            Map managedVersions = createManagedVersionMap( getArtifactFactory(), project.getId(), project
-                .getDependencyManagement() );
+            MavenProject project = getProject();
+            ArtifactRepository localRepo = getLocalRepository();
 
-            ArtifactResolutionResult artifactResolutionResult = null;
+            List deps = getProject().getDependencies();
 
-            try
+            // Collect the list of resolved IdeDependencies.
+            List dependencies = new ArrayList();
+
+            if ( deps != null )
             {
+                Map managedVersions = createManagedVersionMap( getArtifactFactory(), project.getId(), project
+                    .getDependencyManagement() );
 
-                List listeners = new ArrayList();
+                ArtifactResolutionResult artifactResolutionResult = null;
 
-                if ( logger.isDebugEnabled() )
+                try
                 {
-                    listeners.add( new DebugResolutionListener( logger ) );
-                }
-
-                listeners.add( new WarningResolutionListener( logger ) );
 
-                artifactResolutionResult = artifactCollector.collect( getProjectArtifacts(), project.getArtifact(),
-                                                                      managedVersions, localRepo, project
-                                                                          .getRemoteArtifactRepositories(),
-                                                                      getArtifactMetadataSource(), null, listeners );
-            }
-            catch ( ArtifactResolutionException e )
-            {
-                getLog().debug( e.getMessage(), e );
-                getLog().error(
-                                Messages
-                                    .getString( "artifactresolution", new Object[] { //$NON-NLS-1$
-                                                e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage() } ) );
-
-                // if we are here artifactResolutionResult is null, create a project without dependencies but don't fail
-                // (this could be a reactor projects, we don't want to fail everything)
-                return new IdeDependency[0];
-            }
+                    List listeners = new ArrayList();
 
-            // keep track of added reactor projects in order to avoid duplicates
-            Set emittedReactorProjectId = new HashSet();
-
-            for ( Iterator i = artifactResolutionResult.getArtifactResolutionNodes().iterator(); i.hasNext(); )
-            {
+                    if ( logger.isDebugEnabled() )
+                    {
+                        listeners.add( new DebugResolutionListener( logger ) );
+                    }
 
-                ResolutionNode node = (ResolutionNode) i.next();
-                int dependencyDepth = node.getDepth();
-                Artifact art = node.getArtifact();
-                boolean isReactorProject = getUseProjectReferences() && isAvailableAsAReactorProject( art );
+                    listeners.add( new WarningResolutionListener( logger ) );
 
-                // don't resolve jars for reactor projects
-                if ( !isReactorProject )
+                    artifactResolutionResult = artifactCollector.collect( getProjectArtifacts(), project.getArtifact(),
+                                                                          managedVersions, localRepo, project
+                                                                              .getRemoteArtifactRepositories(),
+                                                                          getArtifactMetadataSource(), null, listeners );
+                }
+                catch ( ArtifactResolutionException e )
                 {
-                    try
-                    {
-                        artifactResolver.resolve( art, node.getRemoteRepositories(), localRepository );
-                    }
-                    catch ( ArtifactNotFoundException e )
-                    {
-                        getLog().debug( e.getMessage(), e );
-                        getLog().warn(
-                                       Messages.getString( "artifactdownload", new Object[] { //$NON-NLS-1$
-                                                               e.getGroupId(),
-                                                               e.getArtifactId(),
-                                                               e.getVersion(),
-                                                               e.getMessage() } ) );
-                    }
-                    catch ( ArtifactResolutionException e )
-                    {
-                        getLog().debug( e.getMessage(), e );
-                        getLog().warn(
-                                       Messages.getString( "artifactresolution", new Object[] { //$NON-NLS-1$
-                                                               e.getGroupId(),
-                                                               e.getArtifactId(),
-                                                               e.getVersion(),
-                                                               e.getMessage() } ) );
-                    }
+                    getLog().debug( e.getMessage(), e );
+                    getLog().error(
+                                    Messages
+                                        .getString( "artifactresolution", new Object[] { //$NON-NLS-1$
+                                                    e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage() } ) );
+
+                    // if we are here artifactResolutionResult is null, create a project without dependencies but don't fail
+                    // (this could be a reactor projects, we don't want to fail everything)
+                    return new IdeDependency[0];
                 }
 
-                if ( !isReactorProject || emittedReactorProjectId.add( art.getGroupId() + '-' + art.getArtifactId() ) )
+                // keep track of added reactor projects in order to avoid duplicates
+                Set emittedReactorProjectId = new HashSet();
+
+                for ( Iterator i = artifactResolutionResult.getArtifactResolutionNodes().iterator(); i.hasNext(); )
                 {
 
-                    // the following doesn't work: art.getArtifactHandler().getPackaging() always returns "jar" also
-                    // if the packaging specified in pom.xml is different.
+                    ResolutionNode node = (ResolutionNode) i.next();
+                    int dependencyDepth = node.getDepth();
+                    Artifact art = node.getArtifact();
+                    boolean isReactorProject = getUseProjectReferences() && isAvailableAsAReactorProject( art );
 
-                    // osgi-bundle packaging is provided by the felix osgi plugin
-                    // eclipse-plugin packaging is provided by this eclipse plugin
-                    // String packaging = art.getArtifactHandler().getPackaging();
-                    // boolean isOsgiBundle = "osgi-bundle".equals( packaging ) || "eclipse-plugin".equals( packaging );
-
-                    // we need to check the manifest, if "Bundle-SymbolicName" is there the artifact can be considered
-                    // an osgi bundle
-                    boolean isOsgiBundle = false;
-                    String osgiSymbolicName = null;
-                    if ( art.getFile() != null )
+                    // don't resolve jars for reactor projects
+                    if ( !isReactorProject )
                     {
-                        JarFile jarFile = null;
                         try
                         {
-                            jarFile = new JarFile( art.getFile(), false, ZipFile.OPEN_READ );
-
-                            Manifest manifest = jarFile.getManifest();
-                            if ( manifest != null )
-                            {
-                                osgiSymbolicName = manifest.getMainAttributes()
-                                    .getValue( new Attributes.Name( "Bundle-SymbolicName" ) );
-                            }
+                            artifactResolver.resolve( art, node.getRemoteRepositories(), localRepository );
+                        }
+                        catch ( ArtifactNotFoundException e )
+                        {
+                            getLog().debug( e.getMessage(), e );
+                            getLog().warn(
+                                           Messages.getString( "artifactdownload", new Object[] { //$NON-NLS-1$
+                                                                   e.getGroupId(),
+                                                                   e.getArtifactId(),
+                                                                   e.getVersion(),
+                                                                   e.getMessage() } ) );
                         }
-                        catch ( IOException e )
+                        catch ( ArtifactResolutionException e )
                         {
-                            getLog().info( "Unable to read jar manifest from " + art.getFile() );
+                            getLog().debug( e.getMessage(), e );
+                            getLog().warn(
+                                           Messages.getString( "artifactresolution", new Object[] { //$NON-NLS-1$
+                                                                   e.getGroupId(),
+                                                                   e.getArtifactId(),
+                                                                   e.getVersion(),
+                                                                   e.getMessage() } ) );
                         }
-                        finally
+                    }
+
+                    if ( !isReactorProject || emittedReactorProjectId.add( art.getGroupId() + '-' + art.getArtifactId() ) )
+                    {
+
+                        // the following doesn't work: art.getArtifactHandler().getPackaging() always returns "jar" also
+                        // if the packaging specified in pom.xml is different.
+
+                        // osgi-bundle packaging is provided by the felix osgi plugin
+                        // eclipse-plugin packaging is provided by this eclipse plugin
+                        // String packaging = art.getArtifactHandler().getPackaging();
+                        // boolean isOsgiBundle = "osgi-bundle".equals( packaging ) || "eclipse-plugin".equals( packaging );
+
+                        // we need to check the manifest, if "Bundle-SymbolicName" is there the artifact can be considered
+                        // an osgi bundle
+                        boolean isOsgiBundle = false;
+                        String osgiSymbolicName = null;
+                        if ( art.getFile() != null )
                         {
-                            if ( jarFile != null )
+                            JarFile jarFile = null;
+                            try
                             {
-                                try
+                                jarFile = new JarFile( art.getFile(), false, ZipFile.OPEN_READ );
+
+                                Manifest manifest = jarFile.getManifest();
+                                if ( manifest != null )
                                 {
-                                    jarFile.close();
+                                    osgiSymbolicName = manifest.getMainAttributes()
+                                        .getValue( new Attributes.Name( "Bundle-SymbolicName" ) );
                                 }
-                                catch ( IOException e )
+                            }
+                            catch ( IOException e )
+                            {
+                                getLog().info( "Unable to read jar manifest from " + art.getFile() );
+                            }
+                            finally
+                            {
+                                if ( jarFile != null )
                                 {
-                                    // ignore
+                                    try
+                                    {
+                                        jarFile.close();
+                                    }
+                                    catch ( IOException e )
+                                    {
+                                        // ignore
+                                    }
                                 }
                             }
                         }
-                    }
 
-                    isOsgiBundle = osgiSymbolicName != null;
+                        isOsgiBundle = osgiSymbolicName != null;
 
-                    IdeDependency dep = new IdeDependency( art.getGroupId(), art.getArtifactId(), art.getVersion(),
-                                                           isReactorProject, Artifact.SCOPE_TEST
-                                                               .equals( art.getScope() ), Artifact.SCOPE_SYSTEM
-                                                               .equals( art.getScope() ), Artifact.SCOPE_PROVIDED
-                                                               .equals( art.getScope() ), art.getArtifactHandler()
-                                                               .isAddedToClasspath(), art.getFile(), art.getType(),
-                                                           isOsgiBundle, osgiSymbolicName, dependencyDepth );
+                        IdeDependency dep = new IdeDependency( art.getGroupId(), art.getArtifactId(), art.getVersion(),
+                                                               isReactorProject, Artifact.SCOPE_TEST
+                                                                   .equals( art.getScope() ), Artifact.SCOPE_SYSTEM
+                                                                   .equals( art.getScope() ), Artifact.SCOPE_PROVIDED
+                                                                   .equals( art.getScope() ), art.getArtifactHandler()
+                                                                   .isAddedToClasspath(), art.getFile(), art.getType(),
+                                                               isOsgiBundle, osgiSymbolicName, dependencyDepth );
+
+                        dependencies.add( dep );
+                    }
 
-                    dependencyList.add( dep );
                 }
 
-            }
+                //@todo a final report with the list of missingArtifacts?
 
-            //@todo a final report with the list of missingArtifacts?
+            }
 
+            ideDeps = (IdeDependency[]) dependencies.toArray( new IdeDependency[dependencies.size()] );
         }
 
-        IdeDependency[] deps = (IdeDependency[]) dependencyList.toArray( new IdeDependency[dependencyList.size()] );
-
-        return deps;
+        return ideDeps;
     }
 
     /**

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties Mon Nov 13 08:10:39 2006
@@ -38,4 +38,6 @@
 
 EclipseOSGiManifestWriter.nomanifestfile=The references manifest file doesn''t exist, plugin dependencies will not be updated: {0}
 
-IdeDependency.cantreadfile=Unable to read file: {0}
\ No newline at end of file
+IdeDependency.cantreadfile=Unable to read file: {0}
+
+Rad6LibCopier.cantdeletefile=Failed to delete file: {0}
\ No newline at end of file

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java Mon Nov 13 08:10:39 2006
@@ -15,29 +15,32 @@
  */
 package org.apache.maven.plugin.eclipse;
 
+import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.invoker.InvocationRequest;
+import org.apache.maven.shared.invoker.InvocationResult;
+import org.apache.maven.shared.test.plugin.BuildTool;
+import org.apache.maven.shared.test.plugin.PluginTestTool;
+import org.apache.maven.shared.test.plugin.ProjectTool;
+import org.apache.maven.shared.test.plugin.TestToolsException;
+import org.codehaus.classworlds.ClassRealm;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.net.MalformedURLException;
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.maven.cli.ConsoleDownloadMonitor;
-import org.apache.maven.embedder.MavenEmbedder;
-import org.apache.maven.embedder.MavenEmbedderConsoleLogger;
-import org.apache.maven.embedder.PlexusLoggerAdapter;
-import org.apache.maven.monitor.event.DefaultEventMonitor;
-import org.apache.maven.monitor.event.EventMonitor;
-import org.apache.maven.plugin.ide.IdeUtils;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.StringUtils;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @author <a href="mailto:fgiust@apache.org">Fabrizio Giustina</a>
@@ -47,15 +50,34 @@
     extends PlexusTestCase
 {
 
+    private BuildTool buildTool;
+
+    private ProjectTool projectTool;
+
     /**
-     * The embedder.
+     * Test repository directory.
      */
-    protected MavenEmbedder maven;
+    protected static File localRepositoryDirectory = getTestFile( "target/test-classes/m2repo" );
 
     /**
-     * Test repository directory.
+     * Group-Id for running test builds.
      */
-    protected File localRepositoryDir = getTestFile( "target/test-classes/m2repo" );
+    protected static final String GROUP_ID = "org.apache.maven.plugins";
+
+    /**
+     * Artifact-Id for running test builds.
+     */
+    protected static final String ARTIFACT_ID = "maven-eclipse-plugin";
+
+    /**
+     * Version under which the plugin was installed to the test-time local repository for running 
+     * test builds.
+     */
+    protected static final String VERSION = "test";
+
+    private static final String BUILD_OUTPUT_DIRECTORY = "target/surefire-reports/build-output";
+
+    private static boolean installed = false;
 
     /**
      * @see org.codehaus.plexus.PlexusTestCase#setUp()
@@ -63,16 +85,33 @@
     protected void setUp()
         throws Exception
     {
-
-        this.maven = new MavenEmbedder();
-        this.maven.setClassLoader( Thread.currentThread().getContextClassLoader() );
-        this.maven.setLogger( new MavenEmbedderConsoleLogger() );
-        this.maven.setLocalRepositoryDirectory( localRepositoryDir );
-        this.maven.setOffline( true );
-        this.maven.setInteractiveMode( false );
-        this.maven.start();
+        if ( !installed )
+        {
+            System.out
+                .println( "*** Running test builds; output will be directed to: " + BUILD_OUTPUT_DIRECTORY + "\n" );
+        }
 
         super.setUp();
+
+        buildTool = (BuildTool) lookup( BuildTool.ROLE, "default" );
+
+        projectTool = (ProjectTool) lookup( ProjectTool.ROLE, "default" );
+
+        synchronized ( AbstractEclipsePluginTestCase.class )
+        {
+            if ( !installed )
+            {
+                PluginTestTool pluginTestTool = (PluginTestTool) lookup( PluginTestTool.ROLE, "default" );
+
+                localRepositoryDirectory = pluginTestTool.preparePluginForUnitTestingWithMavenBuilds( "test", localRepositoryDirectory );
+
+                System.out.println( "*** Installed test-version of the Eclipse plugin to: " + localRepositoryDirectory
+                    + "\n" );
+
+                installed = true;
+            }
+        }
+
     }
 
     /**
@@ -81,8 +120,28 @@
     protected void tearDown()
         throws Exception
     {
-        maven.stop();
         super.tearDown();
+
+        List containers = new ArrayList();
+
+        containers.add( getContainer() );
+
+        for ( Iterator iter = containers.iterator(); iter.hasNext(); )
+        {
+            PlexusContainer container = (PlexusContainer) iter.next();
+
+            if ( container != null )
+            {
+                container.dispose();
+
+                ClassRealm realm = container.getContainerRealm();
+
+                if ( realm != null )
+                {
+                    realm.getWorld().disposeRealm( realm.getId() );
+                }
+            }
+        }
     }
 
     /**
@@ -93,7 +152,7 @@
     protected void testProject( String projectName )
         throws Exception
     {
-        testProject( projectName, new Properties() );
+        testProject( projectName, new Properties(), "clean", "eclipse" );
     }
 
     /**
@@ -101,16 +160,39 @@
      * @param projectName project directory
      * @param properties additional properties
      * @throws Exception any exception generated during test
+     * @deprecated Use {@link #testProject(String,Properties,String,String)} instead
      */
     protected void testProject( String projectName, Properties properties )
         throws Exception
     {
+        testProject( projectName, properties, "clean", "eclipse" );
+    }
 
+    /**
+     * Execute the eclipse:eclipse goal on a test project and verify generated files.
+     * @param projectName project directory
+     * @param properties additional properties
+     * @param cleanGoal TODO
+     * @param genGoal TODO
+     * @throws Exception any exception generated during test
+     */
+    protected void testProject( String projectName, Properties properties, String cleanGoal, String genGoal )
+        throws Exception
+    {
         File basedir = getTestFile( "target/test-classes/projects/" + projectName );
 
-        MavenProject project = maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) );
+        File pom = new File( basedir, "pom.xml" );
+
+        String pluginSpec = getPluginCLISpecification();
 
-        EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
+        List goals = new ArrayList();
+
+        goals.add( pluginSpec + cleanGoal );
+        goals.add( pluginSpec + genGoal );
+
+        executeMaven( pom, properties, goals );
+
+        MavenProject project = readProject( pom );
 
         String outputDirPath = IdeUtils.getPluginSetting( project, "maven-eclipse-plugin", "outputDir", null );
         File outputDir;
@@ -127,17 +209,101 @@
             projectOutputDir = new File( outputDir, project.getArtifactId() );
         }
 
-        this.maven.execute( project, Arrays.asList( new String[] {
-            "org.apache.maven.plugins:maven-eclipse-plugin:clean",
-            "org.apache.maven.plugins:maven-eclipse-plugin:eclipse" } ), eventMonitor, new ConsoleDownloadMonitor(),
-                            properties, basedir );
-
         compareDirectoryContent( basedir, projectOutputDir, "" );
         compareDirectoryContent( basedir, projectOutputDir, ".settings/" );
         compareDirectoryContent( basedir, projectOutputDir, "META-INF/" );
 
     }
 
+    protected void executeMaven( File pom, Properties properties, List goals )
+        throws TestToolsException, ExecutionFailedException
+    {
+        executeMaven( pom, properties, goals, true );
+    }
+
+    protected void executeMaven( File pom, Properties properties, List goals, boolean switchLocalRepo )
+        throws TestToolsException, ExecutionFailedException
+    {
+        new File( BUILD_OUTPUT_DIRECTORY ).mkdirs();
+        
+        NullPointerException npe = new NullPointerException();
+        StackTraceElement[] trace = npe.getStackTrace();
+
+        File buildLog = null;
+
+        for ( int i = 0; i < trace.length; i++ )
+        {
+            StackTraceElement element = trace[i];
+
+            String methodName = element.getMethodName();
+
+            if ( methodName.startsWith( "test" ) && !methodName.equals( "testProject" ) )
+            {
+                String classname = element.getClassName();
+
+                buildLog = new File( BUILD_OUTPUT_DIRECTORY, classname + "_" + element.getMethodName() + ".build.log" );
+
+                break;
+            }
+        }
+
+        if ( buildLog == null )
+        {
+            buildLog = new File( BUILD_OUTPUT_DIRECTORY, "unknown.build.log" );
+        }
+
+        InvocationRequest request = buildTool.createBasicInvocationRequest( pom, properties, goals, buildLog );
+
+        request.setDebug( true );
+
+        if ( switchLocalRepo )
+        {
+            request.setLocalRepositoryDirectory( localRepositoryDirectory );
+        }
+
+        InvocationResult result = buildTool.executeMaven( request );
+        
+        if ( result.getExitCode() != 0 )
+        {
+            String buildLogUrl = buildLog.getAbsolutePath();
+            
+            try
+            {
+                buildLogUrl = buildLog.toURL().toExternalForm();
+            }
+            catch ( MalformedURLException e )
+            {
+            }
+            
+            throw new ExecutionFailedException( "Failed to execute build.\nPOM: " + pom + "\nGoals: " + StringUtils.join( goals.iterator(), ", " ) + "\nExit Code: " + result.getExitCode() + "\nError: " + result.getExecutionException() + "\nBuild Log: " + buildLogUrl + "\n", result );
+        }
+    }
+
+    protected MavenProject readProject( File pom )
+        throws TestToolsException
+    {
+        return projectTool.readProject( pom, localRepositoryDirectory );
+    }
+
+    protected String getPluginCLISpecification()
+    {
+        String pluginSpec = GROUP_ID + ":" + ARTIFACT_ID + ":";
+
+        //        String pluginVersion = System.getProperty( "pluginVersion" );
+        //        
+        //        if ( pluginVersion != null )
+        //        {
+        //            pluginSpec += pluginVersion + ":";
+        //        }
+        //
+        //        System.out.println( "\n\nUsing Eclipse plugin version: " + pluginVersion + "\n\n" );
+
+        // try using the test-version installed during setUp()
+        pluginSpec += VERSION + ":";
+
+        return pluginSpec;
+    }
+
     /**
      * @param basedir
      * @param projectOutputDir
@@ -162,8 +328,9 @@
             {
                 File file = files[j];
 
-                assertFileEquals( localRepositoryDir.getCanonicalPath(), file,
-                                  new File( projectOutputDir, additionalDir + file.getName() ) );
+                assertFileEquals( localRepositoryDirectory.getCanonicalPath(), file, new File( projectOutputDir,
+                                                                                               additionalDir
+                                                                                                   + file.getName() ) );
 
             }
         }
@@ -185,7 +352,7 @@
             // replace some vars in the expected line, to account
             // for absolute paths that are different on each installation.
             expected = StringUtils.replace( expected, "${basedir}", basedir );
-            expected = StringUtils.replace( expected, "${M2_REPO}", localRepositoryDir.getCanonicalPath()
+            expected = StringUtils.replace( expected, "${M2_REPO}", localRepositoryDirectory.getCanonicalPath()
                 .replace( '\\', '/' ) );
 
             if ( actualLines.size() <= i )
@@ -260,4 +427,5 @@
 
         return lines;
     }
+
 }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java Mon Nov 13 08:10:39 2006
@@ -22,7 +22,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Writer;
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import java.util.Properties;
 
 import org.apache.maven.cli.ConsoleDownloadMonitor;
@@ -99,16 +101,27 @@
     public void executeMaven2WithEmbedder()
         throws Exception
     {
-        MavenProject project = maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) );
-        EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
-
+        File pom = new File( basedir, "pom.xml" );
+        
         Properties properties = new Properties();
         properties.setProperty( "wtpversion", "R7" );
 
-        this.maven.execute( project, Arrays.asList( new String[] {
-            "org.apache.maven.plugins:maven-eclipse-plugin:clean",
-            "org.apache.maven.plugins:maven-eclipse-plugin:eclipse" } ), eventMonitor, new ConsoleDownloadMonitor(),
-                            properties, this.basedir );
+        String pluginSpec = getPluginCLISpecification();
+
+        List goals = new ArrayList();
+
+        goals.add( pluginSpec + "clean" );
+        goals.add( pluginSpec + "eclipse" );
+        
+        executeMaven( pom, properties, goals );
+        
+//        MavenProject project = maven.readProjectWithDependencies( pom );
+//        EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
+//
+//        this.maven.execute( project, Arrays.asList( new String[] {
+//            "org.apache.maven.plugins:maven-eclipse-plugin:clean",
+//            "org.apache.maven.plugins:maven-eclipse-plugin:eclipse" } ), eventMonitor, new ConsoleDownloadMonitor(),
+//                            properties, this.basedir );
     }
 
     protected void executeMaven2()

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?view=diff&rev=474384&r1=474383&r2=474384
==============================================================================
--- 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 Mon Nov 13 08:10:39 2006
@@ -138,7 +138,7 @@
     {
         Properties props = new Properties();
         props.put( "outputDirectory", "bin" );
-        testProject( "project-15", props );
+        testProject( "project-15", props, "clean", "eclipse" );
     }
 
     //Commented out: failing due to MNG-2025