You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by fg...@apache.org on 2005/11/27 14:30:15 UTC

svn commit: r349230 - in /maven/plugins/trunk/maven-eclipse-plugin: ./ src/main/java/org/apache/maven/plugin/eclipse/ src/test/java/org/apache/maven/plugin/eclipse/ src/test/m2repo/junit/ src/test/m2repo/junit/junit/ src/test/m2repo/junit/junit/2.0/ sr...

Author: fgiust
Date: Sun Nov 27 05:29:44 2005
New Revision: 349230

URL: http://svn.apache.org/viewcvs?rev=349230&view=rev
Log:
change non-reactor testcases to use MavenEmbedder.
Move files in test repository to match the default m2 repository layout (legacy layout can't be used with embedder).
Fix repository paths in classpath/wtpmodules.
Fix plugin configuration in pom.xml's (not used before).
Rename a couple of parameters with a similar name (outputDir vs outputDirectory).

Added:
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.pom
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0-sources.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0-tests.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.jar
    maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.pom
Removed:
    maven/plugins/trunk/maven-eclipse-plugin/src/test/repository/
Modified:
    maven/plugins/trunk/maven-eclipse-plugin/   (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseClasspathWriter.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/EclipseUtils.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWtpmodulesWriter.java
    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/projects/master-test/module-1/   (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/   (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/   (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/   (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/project
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/wtpmodules
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/wtpmodules
    maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-8/pom.xml

Propchange: maven/plugins/trunk/maven-eclipse-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 27 05:29:44 2005
@@ -5,3 +5,4 @@
 .project
 .classpath
 .settings
+.deployables

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseClasspathWriter.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseClasspathWriter.java?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseClasspathWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseClasspathWriter.java Sun Nov 27 05:29:44 2005
@@ -213,7 +213,7 @@
 
             if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
             {
-                path = EclipseUtils.toRelativeAndFixSeparator( projectBaseDir, artifactPath, true );
+                path = EclipseUtils.toRelativeAndFixSeparator( projectBaseDir, artifactPath, false );
 
                 if ( log.isDebugEnabled() )
                 {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=349230&r1=349229&r2=349230&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 Sun Nov 27 05:29:44 2005
@@ -107,8 +107,8 @@
      * needed WTP natures are added.
      * <pre>
      *    &lt;projectnatures>
-     *      &lt;java.lang.String>org.eclipse.jdt.core.javanature&lt;/java.lang.String>
-     *      &lt;java.lang.String>org.eclipse.wst.common.modulecore.ModuleCoreNature&lt;/java.lang.String>
+     *      &lt;projectnature>org.eclipse.jdt.core.javanature&lt;/projectnature>
+     *      &lt;projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature&lt;/projectnature>
      *    &lt;/projectnatures>
      * </pre>
      *
@@ -138,9 +138,9 @@
      * Configuration example:
      * <pre>
      *    &lt;classpathContainers>
-     *      &lt;java.lang.String>org.eclipse.jdt.launching.JRE_CONTAINER&lt;/java.lang.String>
-     *      &lt;java.lang.String>org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5&lt;/java.lang.String>
-     *      &lt;java.lang.String>org.eclipse.jst.j2ee.internal.web.container/artifact&lt;/java.lang.String>
+     *      &lt;buildcommand>org.eclipse.jdt.launching.JRE_CONTAINER&lt;/buildcommand>
+     *      &lt;buildcommand>org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5&lt;/buildcommand>
+     *      &lt;buildcommand>org.eclipse.jst.j2ee.internal.web.container/artifact&lt;/buildcommand>
      *    &lt;/classpathContainers>
      * </pre>
      *
@@ -149,7 +149,7 @@
     private List classpathContainers;
 
     /**
-     * Disables the downloading of source attachments.
+     * Enables/disables the downloading of source attachments. Defaults to false.
      *
      * @parameter expression="${eclipse.downloadSources}"
      */
@@ -158,9 +158,9 @@
     /**
      * Eclipse workspace directory.
      *
-     * @parameter expression="${eclipse.workspace}"
+     * @parameter expression="${eclipse.workspace}" alias="outputDir"
      */
-    private File outputDir;
+    private File eclipseWorkspaceDir;
 
     /**
      * When set to false, the plugin will not create sub-projects and instead reference those sub-projects 
@@ -174,9 +174,9 @@
     /**
      * The default output directory
      *
-     * @parameter expression="${project.build.outputDirectory}"
+     * @parameter expression="${project.build.outputDirectory}" alias="outputDirectory"
      */
-    String outputDirectory;
+    private String buildOutputDirectory;
 
     /**
      * The version of WTP for which configuration files will be generated. At the moment the only supported version is "R7",
@@ -185,7 +185,7 @@
      *
      * @parameter expression="${wtpversion}" default-value="R7"
      */
-    String wtpversion;
+    private String wtpversion;
 
     /**
      * Setter for <code>project</code>. Needed for tests.
@@ -272,9 +272,18 @@
      *
      * @param outputDir The outputDir to set.
      */
-    public void setOutputDir( File outputDir )
+    public void setEclipseWorkspaceDir( File outputDir )
     {
-        this.outputDir = outputDir;
+        this.eclipseWorkspaceDir = outputDir;
+    }
+
+    /**
+     * Getter for <code>outputDir</code>. Needed for tests.
+     * @return Returns the outputDir.
+     */
+    public File getEclipseWorkspaceDir()
+    {
+        return this.eclipseWorkspaceDir;
     }
 
     /**
@@ -290,9 +299,18 @@
      * Setter for <code>outputDirectory</code>.
      * @param outputDirectory The outputDirectory to set.
      */
-    public void setOutputDirectory( String outputDirectory )
+    public void setBuildOutputDirectory( String outputDirectory )
+    {
+        this.buildOutputDirectory = outputDirectory;
+    }
+
+    /**
+     * Getter for <code>buildOutputDirectory</code>.
+     * @return Returns the buildOutputDirectory.
+     */
+    public String getBuildOutputDirectory()
     {
-        this.outputDirectory = outputDirectory;
+        return this.buildOutputDirectory;
     }
 
     /**
@@ -358,28 +376,29 @@
             throw new MojoExecutionException( Messages.getString( "EclipsePlugin.missingpom" ) ); //$NON-NLS-1$
         }
 
-        if ( "pom".equals( executedProject.getPackaging() ) && outputDir == null ) //$NON-NLS-1$
+        if ( "pom".equals( executedProject.getPackaging() ) && eclipseWorkspaceDir == null ) //$NON-NLS-1$
         {
             getLog().info( Messages.getString( "EclipsePlugin.pompackaging" ) ); //$NON-NLS-1$
             return;
         }
 
-        if ( outputDir == null )
+        if ( eclipseWorkspaceDir == null )
         {
-            outputDir = executedProject.getFile().getParentFile();
+            eclipseWorkspaceDir = executedProject.getFile().getParentFile();
         }
-        else if ( !outputDir.equals( executedProject.getFile().getParentFile() ) )
+        else if ( !eclipseWorkspaceDir.equals( executedProject.getFile().getParentFile() ) )
         {
-            if ( !outputDir.isDirectory() )
+            if ( !eclipseWorkspaceDir.isDirectory() )
             {
-                throw new MojoExecutionException( Messages.getString( "EclipsePlugin.notadir", outputDir ) ); //$NON-NLS-1$
+                throw new MojoExecutionException( Messages.getString( "EclipsePlugin.notadir", eclipseWorkspaceDir ) ); //$NON-NLS-1$
             }
 
-            outputDir = new File( outputDir, executedProject.getArtifactId() );
+            eclipseWorkspaceDir = new File( eclipseWorkspaceDir, executedProject.getArtifactId() );
 
-            if ( !outputDir.isDirectory() && !outputDir.mkdir() )
+            if ( !eclipseWorkspaceDir.isDirectory() && !eclipseWorkspaceDir.mkdir() )
             {
-                throw new MojoExecutionException( Messages.getString( "EclipsePlugin.cantcreatedir", outputDir ) ); //$NON-NLS-1$
+                throw new MojoExecutionException( Messages
+                    .getString( "EclipsePlugin.cantcreatedir", eclipseWorkspaceDir ) ); //$NON-NLS-1$
             }
         }
 
@@ -400,25 +419,28 @@
             reactorArtifacts = Collections.EMPTY_LIST;
 
         // build a list of UNIQUE source dirs (both src and resources) to be used in classpath and wtpmodules
-        EclipseSourceDir[] sourceDirs = EclipseUtils.buildDirectoryList( executedProject, outputDir, getLog(),
-                                                                         outputDirectory );
+        EclipseSourceDir[] sourceDirs = EclipseUtils.buildDirectoryList( executedProject, eclipseWorkspaceDir,
+                                                                         getLog(), buildOutputDirectory );
 
         // use project since that one has all artifacts resolved.
-        new EclipseClasspathWriter( getLog() ).write( projectBaseDir, outputDir, project, reactorArtifacts, sourceDirs,
-                                                      classpathContainers, localRepository, artifactResolver,
-                                                      artifactFactory, remoteArtifactRepositories, downloadSources,
-                                                      outputDirectory );
+        new EclipseClasspathWriter( getLog() ).write( projectBaseDir, eclipseWorkspaceDir, project, reactorArtifacts,
+                                                      sourceDirs, classpathContainers, localRepository,
+                                                      artifactResolver, artifactFactory, remoteArtifactRepositories,
+                                                      downloadSources, buildOutputDirectory );
 
-        new EclipseProjectWriter( getLog() ).write( projectBaseDir, outputDir, project, executedProject,
+        new EclipseProjectWriter( getLog() ).write( projectBaseDir, eclipseWorkspaceDir, project, executedProject,
                                                     reactorArtifacts, projectnatures, buildcommands );
 
-        new EclipseSettingsWriter( getLog() ).write( projectBaseDir, outputDir, project );
+        new EclipseSettingsWriter( getLog() ).write( projectBaseDir, eclipseWorkspaceDir, project );
 
-        new EclipseWtpmodulesWriter( getLog() ).write( outputDir, project, reactorArtifacts, sourceDirs,
+        new EclipseWtpmodulesWriter( getLog() ).write( eclipseWorkspaceDir, project, reactorArtifacts, sourceDirs,
                                                        localRepository, artifactResolver, remoteArtifactRepositories );
 
-        getLog().info( Messages.getString( "EclipsePlugin.wrote", //$NON-NLS-1$
-                                           new Object[] { project.getArtifactId(), outputDir.getAbsolutePath() } ) );
+        getLog().info(
+                       Messages.getString( "EclipsePlugin.wrote", //$NON-NLS-1$
+                                           new Object[] {
+                                               project.getArtifactId(),
+                                               eclipseWorkspaceDir.getAbsolutePath() } ) );
     }
 
     private void assertNotEmpty( String string, String elementName )

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java Sun Nov 27 05:29:44 2005
@@ -52,7 +52,7 @@
         // don't instantiate
     }
 
-    public static String toRelativeAndFixSeparator( File basedir, File fileToAdd, boolean replaceSlashes )
+    public static String toRelativeAndFixSeparator( File basedir, File fileToAdd, boolean replaceSlashesWithDashes )
         throws MojoExecutionException
     {
         String basedirpath;
@@ -95,7 +95,7 @@
 
         relative = StringUtils.replace( relative, "\\", "/" ); //$NON-NLS-1$ //$NON-NLS-2$
 
-        if ( replaceSlashes )
+        if ( replaceSlashesWithDashes )
         {
             relative = StringUtils.replace( relative, "/", "-" ); //$NON-NLS-1$ //$NON-NLS-2$
         }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWtpmodulesWriter.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWtpmodulesWriter.java?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWtpmodulesWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWtpmodulesWriter.java Sun Nov 27 05:29:44 2005
@@ -280,7 +280,7 @@
             if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
             {
                 handle = "module:/classpath/lib/" //$NON-NLS-1$
-                    + EclipseUtils.toRelativeAndFixSeparator( basedir, repoFile, true );
+                    + EclipseUtils.toRelativeAndFixSeparator( basedir, repoFile, false );
             }
             else
             {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- 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 Sun Nov 27 05:29:44 2005
@@ -20,118 +20,101 @@
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.Arrays;
 import java.util.List;
+import java.util.Properties;
 
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.resolver.ArtifactResolver;
+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.project.MavenProject;
-import org.apache.maven.project.MavenProjectBuilder;
 import org.codehaus.plexus.PlexusTestCase;
 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>
  * @version $Id$
  */
 public abstract class AbstractEclipsePluginTestCase
     extends PlexusTestCase
 {
 
+    protected MavenEmbedder maven;
+
+    protected File localRepositoryDir = getTestFile( "src/test/m2repo" );
+
+    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.start();
+
+        super.setUp();
+    }
+
+    protected void tearDown()
+        throws Exception
+    {
+        maven.stop();
+        super.tearDown();
+    }
+
     /**
      * Execute the eclipse:eclipse goal on a test project and verify generated files.
      * @param projectName project directory
      * @param outputDir output dir (if null it's the same as the project)
      * @throws Exception any exception generated during test
      */
-    protected void testProject( String projectName, File outputDir )
+    protected void testProject( String projectName )
         throws Exception
     {
-        File basedir = getTestFile( "src/test/projects/" + projectName );
-
-        MavenProjectBuilder builder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE );
-
-        EclipsePlugin plugin = new EclipsePlugin();
-
-        File repo = getTestFile( "src/test/repository" );
 
-        ArtifactRepositoryLayout localRepositoryLayout = (ArtifactRepositoryLayout) lookup(
-                                                                                            ArtifactRepositoryLayout.ROLE,
-                                                                                            "legacy" );
+        File basedir = getTestFile( "src/test/projects/" + projectName );
 
-        ArtifactRepository localRepository = new DefaultArtifactRepository( "local", "file://"
-            + repo.getCanonicalPath(), localRepositoryLayout );
+        MavenProject project = maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) );
 
-        MavenProject project = builder.buildWithDependencies( new File( basedir, "pom.xml" ), localRepository, null );
+        EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
 
+        String outputDirPath = EclipseUtils.getPluginSetting( project, "maven-eclipse-plugin", "outputDir", null );
+        File outputDir;
         File projectOutputDir = basedir;
 
-        if ( outputDir == null )
+        if ( outputDirPath == null )
         {
             outputDir = basedir;
         }
         else
         {
+            outputDir = new File( basedir, outputDirPath );
             outputDir.mkdirs();
-
             projectOutputDir = new File( outputDir, project.getArtifactId() );
         }
 
-        // Shouldn't PlexusTestCase at least offer a predefined log instance?
-        //  if ( log.isDebugEnabled() )
-        //  {
-        //    log.debug( "basedir: " + basedir + "\noutputdir: " + outputDir + "\nprojectOutputDir: " + projectOutputDir );
-        //  }
-
-        plugin.setOutputDir( outputDir );
-
-        for ( Iterator it = project.getArtifacts().iterator(); it.hasNext(); )
-        {
-            Artifact artifact = (Artifact) it.next();
-            artifact.setFile( new File( localRepository.getBasedir(), localRepository.pathOf( artifact ) ) );
-        }
-
-        plugin.setProject( project );
-        plugin.setOutputDirectory( project.getBuild().getOutputDirectory() );
-
-        plugin.setLocalRepository( localRepository );
-
-        plugin.setArtifactFactory( (ArtifactFactory) lookup( ArtifactFactory.ROLE ) );
-        plugin.setArtifactResolver( (ArtifactResolver) lookup( ArtifactResolver.ROLE ) );
-        plugin.setRemoteArtifactRepositories( new ArrayList( 0 ) );
-
-        List projectNatures = new ArrayList();
-        projectNatures.add( "org.eclipse.jdt.core.javanature" );
-        plugin.setProjectnatures( projectNatures );
-
-        List buildcommands = new ArrayList();
-        buildcommands.add( "org.eclipse.jdt.core.javabuilder" );
-        plugin.setBuildcommands( buildcommands );
-
-        plugin.setClasspathContainers( new ArrayList() );
-
-        plugin.setDownloadSources( true );
-
-        plugin.setWtpversion( "R7" );
-
-        plugin.execute();
+        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(),
+                            new Properties(), basedir );
 
-        assertFileEquals( localRepository.getBasedir(), new File( basedir, "project" ), new File( projectOutputDir,
-                                                                                                  ".project" ) );
+        assertFileEquals( localRepositoryDir.getCanonicalPath(), new File( basedir, "project" ),
+                          new File( projectOutputDir, ".project" ) );
 
-        assertFileEquals( localRepository.getBasedir(), new File( basedir, "classpath" ), new File( projectOutputDir,
-                                                                                                    ".classpath" ) );
+        assertFileEquals( localRepositoryDir.getCanonicalPath(), new File( basedir, "classpath" ),
+                          new File( projectOutputDir, ".classpath" ) );
 
-        assertFileEquals( localRepository.getBasedir(), new File( basedir, "wtpmodules" ), new File( projectOutputDir,
-                                                                                                     ".wtpmodules" ) );
+        assertFileEquals( localRepositoryDir.getCanonicalPath(), new File( basedir, "wtpmodules" ),
+                          new File( projectOutputDir, ".wtpmodules" ) );
 
         if ( new File( basedir, "settings" ).exists() )
         {
-            assertFileEquals( localRepository.getBasedir(), new File( basedir, "settings" ),
+            assertFileEquals( localRepositoryDir.getCanonicalPath(), new File( basedir, "settings" ),
                               new File( basedir, ".settings/org.eclipse.jdt.core.prefs" ) );
         }
     }
@@ -218,7 +201,7 @@
 
         while ( ( line = reader.readLine() ) != null )
         {
-            lines.add( line );//StringUtils.replace( line, "#ArtifactRepositoryPath#", mavenRepo.replace( '\\', '/' ) ) );
+            lines.add( line );
         }
 
         return lines;

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginMasterProjectTest.java?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- 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 Sun Nov 27 05:29:44 2005
@@ -22,17 +22,15 @@
 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;
-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.project.MavenProject;
 import org.apache.maven.settings.MavenSettingsBuilder;
 import org.apache.maven.settings.Settings;
 import org.codehaus.plexus.util.IOUtil;
@@ -81,63 +79,52 @@
 
     protected File basedir;
 
-    protected MavenEmbedder maven;
-
-    protected List projectList = new ArrayList();
-
+    /**
+     * @see org.apache.maven.plugin.eclipse.AbstractEclipsePluginTestCase#setUp()
+     */
     protected void setUp()
         throws Exception
     {
-        this.basedir = getTestFile( "src/test/projects/master-test" );
-
-        this.maven = new MavenEmbedder();
-        this.maven.setClassLoader( Thread.currentThread().getContextClassLoader() );
-        this.maven.setLogger( new MavenEmbedderConsoleLogger() );
-        this.maven.start();
-
-        projectList.add( maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) ) );
-
+        basedir = getTestFile( "src/test/projects/master-test" );
         super.setUp();
-
-        executeMaven2CommandLine( basedir );
-    }
-
-    protected void tearDown()
-        throws Exception
-    {
-        maven.stop();
-        super.tearDown();
     }
 
     /**
      * Currently disabled because:
      * <ul>
      *   <li>the reactor build is not run by the embedder</li>
-     *   <li>the embedder doesn't support custom settings</li>
      * </ul>
      * @throws Exception
      */
     public void executeMaven2WithEmbedder()
         throws Exception
     {
+        MavenProject project = maven.readProjectWithDependencies( new File( basedir, "pom.xml" ) );
         EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
-
-        this.maven.execute( projectList, Arrays.asList( new String[] {
+        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(),
                             new Properties(), this.basedir );
     }
 
+    protected void executeMaven2()
+        throws Exception
+    {
+        executeMaven2CommandLine();
+        // executeMaven2WithEmbedder();
+    }
+
     public void testModule1Project()
         throws Exception
     {
+        executeMaven2();
         assertFileEquals( null, new File( basedir, "module-1/project" ), new File( basedir, "module-1/.project" ) );
     }
 
     public void testModule1Classpath()
         throws Exception
     {
-
+        executeMaven2();
         InputStream fis = new FileInputStream( new File( basedir, "module-1/.classpath" ) );
         String classpath = IOUtil.toString( fis );
         IOUtil.close( fis );
@@ -160,18 +147,21 @@
     public void testModule1Wtpmodules()
         throws Exception
     {
+        executeMaven2();
         assertFileEquals( null, new File( basedir, "module-1/wtpmodules" ), new File( basedir, "module-1/.wtpmodules" ) );
     }
 
     public void testModule2Project()
         throws Exception
     {
+        executeMaven2();
         assertFileEquals( null, new File( basedir, "module-2/project" ), new File( basedir, "module-2/.project" ) );
     }
 
     public void testModule2Classpath()
         throws Exception
     {
+        executeMaven2();
         InputStream fis = new FileInputStream( new File( basedir, "module-2/.classpath" ) );
         String classpath = IOUtil.toString( fis );
         IOUtil.close( fis );
@@ -208,6 +198,7 @@
     public void testModule2Wtpmodules()
         throws Exception
     {
+        executeMaven2();
         InputStream fis = new FileInputStream( new File( basedir, "module-2/.wtpmodules" ) );
         String wtpmodules = IOUtil.toString( fis );
         IOUtil.close( fis );
@@ -244,11 +235,11 @@
      * Execute mvn from command line.
      * @throws Exception any exception caught is thrown during tests
      */
-    protected void executeMaven2CommandLine( File workingDir )
+    protected void executeMaven2CommandLine()
         throws Exception
     {
 
-        Commandline cmd = createMaven2CommandLine( workingDir );
+        Commandline cmd = createMaven2CommandLine( this.basedir );
 
         int exitCode = CommandLineUtils.executeCommandLine( cmd, new DefaultConsumer(), new DefaultConsumer() );
 
@@ -268,7 +259,6 @@
     protected Commandline createMaven2CommandLine( File workingDir )
         throws Exception
     {
-
         assertNotNull( "workingDir can't be null", workingDir );
         assertTrue( "workingDir must exist", workingDir.exists() );
 

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=349230&r1=349229&r2=349230&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 Sun Nov 27 05:29:44 2005
@@ -18,6 +18,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @author <a href="mailto:fgiust@apache.org">Fabrizio Giustina</a>
  * @version $Id$
  */
 public class EclipsePluginTest
@@ -26,49 +27,49 @@
     public void testProject1()
         throws Exception
     {
-        testProject( "project-1", null );
+        testProject( "project-1" );
     }
 
     public void testProject2()
         throws Exception
     {
-        testProject( "project-2", null );
+        testProject( "project-2" );
     }
 
     public void testProject3()
         throws Exception
     {
-        testProject( "project-3", null );
+        testProject( "project-3" );
     }
 
     public void testProject4()
         throws Exception
     {
-        testProject( "project-4", getTestFile( "target/project-4-test/" ) );
+        testProject( "project-4" );
     }
 
     public void testProject5()
         throws Exception
     {
-        testProject( "project-5", null );
+        testProject( "project-5" );
     }
 
     public void testProject6()
         throws Exception
     {
-        testProject( "project-6", null );
+        testProject( "project-6" );
     }
 
     public void testProject7()
         throws Exception
     {
-        testProject( "project-7", null );
+        testProject( "project-7" );
     }
 
     public void testProject8()
         throws Exception
     {
-        testProject( "project-8", null );
+        testProject( "project-8" );
     }
 
 }

Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.jar
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.jar?rev=349230&view=auto
==============================================================================
    (empty)

Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.pom
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.pom?rev=349230&view=auto
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.pom (added)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/junit/junit/2.0/junit-2.0.pom Sun Nov 27 05:29:44 2005
@@ -0,0 +1,7 @@
+<model>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>junit</groupId>
+  <artifactId>junit</artifactId>
+  <packaging>jar</packaging>
+  <version>2.0</version>
+</model>
\ No newline at end of file

Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0-sources.jar
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0-sources.jar?rev=349230&view=auto
==============================================================================
    (empty)

Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0-tests.jar
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0-tests.jar?rev=349230&view=auto
==============================================================================
    (empty)

Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.jar
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.jar?rev=349230&view=auto
==============================================================================
    (empty)

Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.pom
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.pom?rev=349230&view=auto
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.pom (added)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/m2repo/maven/maven-core/98.0/maven-core-98.0.pom Sun Nov 27 05:29:44 2005
@@ -0,0 +1,6 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>maven</groupId>
+  <artifactId>maven-core</artifactId>
+  <version>98.0</version>
+</project>

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/master-test/module-1/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 27 05:29:44 2005
@@ -1,3 +1,4 @@
 .wtpmodules
 .project
 .classpath
+target

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/classpath Sun Nov 27 05:29:44 2005
@@ -2,5 +2,5 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/maven/jars/maven-core-98.0.jar" sourcepath="M2_REPO/maven/java-sources/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/project
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/project?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/project (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-1/project Sun Nov 27 05:29:44 2005
@@ -1,14 +1,28 @@
-<projectDescription>
-  <name>maven-eclipse-plugin-test-project-1</name>
-  <comment/>
-  <projects/>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-  </natures>
-</projectDescription>
+<projectDescription>
+  <name>maven-eclipse-plugin-test-project-1</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.wst.validation.validationbuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 27 05:29:44 2005
@@ -2,3 +2,4 @@
 .settings
 .wtpmodules
 .project
+target

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/classpath Sun Nov 27 05:29:44 2005
@@ -5,5 +5,5 @@
   <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/jars/junit-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-2/pom.xml Sun Nov 27 05:29:44 2005
@@ -22,6 +22,18 @@
           <target>1.4</target>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <projectnatures>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+          </projectnatures>
+          <buildcommands>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+          </buildcommands>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 27 05:29:44 2005
@@ -2,3 +2,4 @@
 .settings
 .wtpmodules
 .project
+target

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/classpath Sun Nov 27 05:29:44 2005
@@ -4,5 +4,5 @@
   <classpathentry kind="src" path="src/test/resources" output="target/test-output-dir"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/jars/junit-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-3/pom.xml Sun Nov 27 05:29:44 2005
@@ -47,6 +47,18 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <projectnatures>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+          </projectnatures>
+          <buildcommands>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+          </buildcommands>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Nov 27 05:29:44 2005
@@ -2,3 +2,4 @@
 .settings
 .wtpmodules
 .project
+target

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/classpath Sun Nov 27 05:29:44 2005
@@ -5,5 +5,5 @@
   <classpathentry kind="src" path="src-test-resources" output="target/test-classes-dir"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/jars/junit-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-4/pom.xml Sun Nov 27 05:29:44 2005
@@ -21,5 +21,21 @@
         <targetPath>target/main-resources</targetPath>
       </resource>
     </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <!-- <outputDirectory>target/eclipse-classes</outputDirectory>-->
+          <outputDir>../../../../target/project-4-test/</outputDir>
+          <projectnatures>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+          </projectnatures>
+          <buildcommands>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+          </buildcommands>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
 </project>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/classpath Sun Nov 27 05:29:44 2005
@@ -2,5 +2,7 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/maven/jars/maven-core-98.0.jar" sourcepath="M2_REPO/maven/java-sources/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/>
+  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container/wtptest"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/pom.xml Sun Nov 27 05:29:44 2005
@@ -29,15 +29,12 @@
         <artifactId>maven-eclipse-plugin</artifactId>
         <configuration>
           <projectnatures>
-            <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String>
-            <java.lang.String>org.eclipse.wst.common.modulecore.ModuleCoreNature</java.lang.String>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+            <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
           </projectnatures>
           <buildcommands>
-            <java.lang.String>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</java.lang.String>
-            <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
-            <java.lang.String>
-              org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver
-            </java.lang.String>
+            <buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
           </buildcommands>
           <classpathContainers>
             <java.lang.String>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/project
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/project?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/project (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/project Sun Nov 27 05:29:44 2005
@@ -1,14 +1,19 @@
-<projectDescription>
-  <name>maven-eclipse-plugin-test-project-5</name>
-  <comment/>
-  <projects/>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-  </natures>
-</projectDescription>
+<projectDescription>
+  <name>maven-eclipse-plugin-test-project-5</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</name>
+      <arguments/>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/wtpmodules
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/wtpmodules?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/wtpmodules (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-5/wtpmodules Sun Nov 27 05:29:44 2005
@@ -4,8 +4,8 @@
       <version>2.4</version>
       <property name="context-root" value="maven-eclipse-plugin-test-project-5"/>
     </module-type>
-    <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
-    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/maven/jars/maven-core-98.0.jar">
+    <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar">
       <dependency-type>uses</dependency-type>
     </dependent-module>
     <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/classpath Sun Nov 27 05:29:44 2005
@@ -2,5 +2,5 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/maven/jars/maven-core-98.0.jar" sourcepath="M2_REPO/maven/java-sources/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-6/pom.xml Sun Nov 27 05:29:44 2005
@@ -14,4 +14,20 @@
       <version>98.0</version>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <projectnatures>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+          </projectnatures>
+          <buildcommands>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+          </buildcommands>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/classpath
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/classpath?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/classpath Sun Nov 27 05:29:44 2005
@@ -1,6 +1,6 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/maven/jars/maven-core-98.0-tests.jar" sourcepath="M2_REPO/maven/java-sources/maven-core-98.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/maven/jars/maven-core-98.0.jar" sourcepath="M2_REPO/maven/java-sources/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0-tests.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/pom.xml Sun Nov 27 05:29:44 2005
@@ -20,4 +20,20 @@
       <version>98.0</version>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <projectnatures>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+          </projectnatures>
+          <buildcommands>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+          </buildcommands>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/wtpmodules
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/wtpmodules?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/wtpmodules (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-7/wtpmodules Sun Nov 27 05:29:44 2005
@@ -4,11 +4,11 @@
       <version>2.4</version>
       <property name="context-root" value="maven-eclipse-plugin-test-project-7"/>
     </module-type>
-    <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
-    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/maven/jars/maven-core-98.0-tests.jar">
+    <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/maven/maven-core/98.0/maven-core-98.0-tests.jar">
       <dependency-type>uses</dependency-type>
-    </dependent-module>
-    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/maven/jars/maven-core-98.0.jar">
+    </dependent-module>
+    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar">
       <dependency-type>uses</dependency-type>
     </dependent-module>
   </wb-module>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-8/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-8/pom.xml?rev=349230&r1=349229&r2=349230&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-8/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/projects/project-8/pom.xml Sun Nov 27 05:29:44 2005
@@ -16,4 +16,20 @@
       <systemPath>${basedir}/sysdep.jar</systemPath>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <projectnatures>
+            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+          </projectnatures>
+          <buildcommands>
+            <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+          </buildcommands>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>