Author: aheritier Date: Wed Sep 3 03:29:45 2008 New Revision: 691563 URL: http://svn.apache.org/viewvc?rev=691563&view=rev Log: MECLIPSE-445 : myeclipse target doesn't generate spring bean files for hierarchical projects. Submitted by : Joe Freeman + fix imports
Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.springbeans maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/java/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/java/DummyClass.txt (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicaitonContext-foo.xml (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicationContext-bar.xml (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/test/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/test/applicationContext-baz.xml (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/java/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/java/DummyTestClass.txt (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/resources/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/resources/dummy Modified: 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/EclipseToMavenMojo.java maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseAjdtPluginIT.java maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/MyEclipsePluginIT.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=691563&r1=691562&r2=691563&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Wed Sep 3 03:29:45 2008 @@ -32,7 +32,6 @@ import java.util.ListIterator; import java.util.Map; import java.util.Set; -import java.util.TreeSet; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java?rev=691563&r1=691562&r2=691563&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java Wed Sep 3 03:29:45 2008 @@ -31,8 +31,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import aQute.lib.osgi.Analyzer; - import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeployer; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; @@ -64,6 +62,8 @@ import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; +import aQute.lib.osgi.Analyzer; + /** * Add eclipse artifacts from an eclipse installation to the local repo. This mojo automatically analize the eclipse * directory, copy plugins jars to the local maven repo, and generates appropriate poms. This is the official central Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java?rev=691563&r1=691562&r2=691563&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java Wed Sep 3 03:29:45 2008 @@ -18,6 +18,12 @@ */ package org.apache.maven.plugin.ide; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; @@ -33,12 +39,6 @@ import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.Xpp3Dom; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - /** * @author <a href="mailto:[EMAIL PROTECTED]">Trygve Laugstøl</a> * @author <a href="mailto:[EMAIL PROTECTED]">Fabrizio Giustina</a> Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseAjdtPluginIT.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseAjdtPluginIT.java?rev=691563&r1=691562&r2=691563&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseAjdtPluginIT.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseAjdtPluginIT.java Wed Sep 3 03:29:45 2008 @@ -18,18 +18,6 @@ */ package org.apache.maven.plugin.eclipse.it; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * @author <a href="mailto:[EMAIL PROTECTED]">Trygve Laugstøl</a> Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/MyEclipsePluginIT.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/MyEclipsePluginIT.java?rev=691563&r1=691562&r2=691563&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/MyEclipsePluginIT.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/MyEclipsePluginIT.java Wed Sep 3 03:29:45 2008 @@ -16,7 +16,7 @@ public void testProject01() throws Exception { - testProject( "project-myeclipse-01", null, "myeclipse-clean", "myeclipse" ); + testMyEclipseProject( "project-myeclipse-01" ); } /** @@ -27,7 +27,7 @@ public void testProject02() throws Exception { - testProject( "project-myeclipse-02", null, "myeclipse-clean", "myeclipse" ); + testMyEclipseProject( "project-myeclipse-02" ); } /** @@ -38,7 +38,7 @@ public void testProject03() throws Exception { - testProject( "project-myeclipse-03", null, "myeclipse-clean", "myeclipse" ); + testMyEclipseProject( "project-myeclipse-03" ); } /** @@ -49,7 +49,7 @@ public void testProject04() throws Exception { - testProject( "project-myeclipse-04", null, "myeclipse-clean", "myeclipse" ); + testMyEclipseProject( "project-myeclipse-04" ); } /** @@ -60,7 +60,18 @@ public void testProject05() throws Exception { - testProject( "project-myeclipse-05", null, "myeclipse-clean", "myeclipse" ); + testMyEclipseProject( "project-myeclipse-05" ); + } + + /** + * Simple project with with spring configuration that points at non-existent directory + * + * @throws Exception + */ + public void testMyEclipseProject06MECLIPSE427() + throws Exception + { + testMyEclipseProject( "project-myeclipse-06-MECLIPSE-427" ); } /** @@ -72,7 +83,13 @@ public void testProject07MECLIPSE445() throws Exception { - testProject( "project-myeclipse-07-MECLIPSE-445", null, "myeclipse-clean", "myeclipse" ); + testMyEclipseProject( "project-myeclipse-07-MECLIPSE-445" ); + } + + public void testMyEclipseProject( String project ) + throws Exception + { + testProject( project, null, "myeclipse-clean", "myeclipse" ); } } Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath?rev=691563&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath Wed Sep 3 03:29:45 2008 @@ -0,0 +1,8 @@ +<classpath> + <classpathentry kind="src" path="src/test/java" output="target/test-classes"/> + <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> +</classpath> Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.classpath ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project?rev=691563&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project Wed Sep 3 03:29:45 2008 @@ -0,0 +1,17 @@ +<projectDescription> + <name>maven-eclipse-plugin-test-project-myeclipse-06-MECLIPSE-427</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + </buildCommand> + <buildCommand> + <name>com.genuitec.eclipse.springframework.springbuilder</name> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>com.genuitec.eclipse.springframework.springnature</nature> + </natures> +</projectDescription> \ No newline at end of file Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.project ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.springbeans URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.springbeans?rev=691563&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.springbeans (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/expected/.springbeans Wed Sep 3 03:29:45 2008 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beansProjectDescription> + <configExtensions> + <configExtension>xml</configExtension> + </configExtensions> + <configs/> + <configSets/> + <springVersion>2.0</springVersion> +</beansProjectDescription> \ No newline at end of file Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml?rev=691563&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml Wed Sep 3 03:29:45 2008 @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>eclipse</groupId> + <artifactId>maven-eclipse-plugin-test-project-myeclipse-06-MECLIPSE-427</artifactId> + <version>99.0</version> + <packaging>jar</packaging> + <name>Projet MyEclipse 03</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <version>test</version> + <configuration> + <spring> + <version>2.0</version> + <file-pattern>applicationContext-*.xml</file-pattern> + <basedir>src/main/doesnt-exist</basedir> + </spring> + </configuration> + </plugin> + </plugins> + </build> +</project> Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/java/DummyClass.txt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/java/DummyClass.txt?rev=691563&view=auto ============================================================================== (empty) Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/java/DummyClass.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/java/DummyClass.txt ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicaitonContext-foo.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicaitonContext-foo.xml?rev=691563&view=auto ============================================================================== (empty) Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicaitonContext-foo.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicaitonContext-foo.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicationContext-bar.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicationContext-bar.xml?rev=691563&view=auto ============================================================================== (empty) Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicationContext-bar.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/applicationContext-bar.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/test/applicationContext-baz.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/test/applicationContext-baz.xml?rev=691563&view=auto ============================================================================== (empty) Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/test/applicationContext-baz.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/main/resources/org/apache/maven/test/applicationContext-baz.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/java/DummyTestClass.txt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/java/DummyTestClass.txt?rev=691563&view=auto ============================================================================== (empty) Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/java/DummyTestClass.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/java/DummyTestClass.txt ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/resources/dummy URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-myeclipse-06-MECLIPSE-427/src/test/resources/dummy?rev=691563&view=auto ============================================================================== (empty)