Author: brianf
Date: Thu Jun 28 18:36:50 2007
New Revision: 551747
URL: http://svn.apache.org/viewvc?view=rev&rev=551747
Log:
MECLIPSE-185
Added:
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/
- copied from r549290,
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-30/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/expected/
- copied from r551745,
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-30/expected/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/pom.xml
- copied, changed from r551745,
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-30/pom.xml
Removed:
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/expected/.classpath
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/expected/.project
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/expected/.wtpmodules
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
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=551747&r1=551746&r2=551747
==============================================================================
---
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
Thu Jun 28 18:36:50 2007
@@ -491,6 +491,7 @@
// 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)
+ // Causes MECLIPSE-185. Not sure if it should be
handled this way??
return new IdeDependency[0];
}
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=551747&r1=551746&r2=551747
==============================================================================
---
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
Thu Jun 28 18:36:50 2007
@@ -20,6 +20,8 @@
import java.util.Properties;
+import org.apache.maven.plugin.MojoExecutionException;
+
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Trygve Laugstøl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Fabrizio Giustina</a>
@@ -301,6 +303,27 @@
public void testProject30() throws Exception
{
testProject( "project-30" );
+ }
+
+ /**
+ * MECLIPSE-185 : plugin doesn't fail when dependencies are missing
+ *
+ * @throws Exception
+ * any exception thrown during test
+ */
+ public void testProject31() throws Exception
+ {
+ try
+ {
+ testProject( "project-31" );
+
+ //disabling this test for now. See comments in MECLIPSE-185 - Bfox
+ // fail("Expected to receive a MojoExecutionException");
+ }
+ catch (MojoExecutionException e)
+ {
+ //expected exception here
+ }
}
/**
Copied:
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/pom.xml
(from r551745,
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-30/pom.xml)
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/pom.xml?view=diff&rev=551747&p1=maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-30/pom.xml&r1=551745&p2=maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/pom.xml&r2=551747
==============================================================================
---
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-30/pom.xml
(original)
+++
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-31/pom.xml
Thu Jun 28 18:36:50 2007
@@ -2,29 +2,17 @@
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-30</artifactId>
- <version>30</version>
+ <artifactId>maven-eclipse-plugin-test-project-31</artifactId>
+ <version>31</version>
<packaging>war</packaging>
- <name>maven-eclipse-plugin-test-project-30</name>
+ <name>maven-eclipse-plugin-test-project-31</name>
<dependencies>
<!-- Servlet API (2.3)-->
<dependency>
- <groupId>javax.servlet</groupId>
+ <groupId>some.junk.group</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>test</version>
- <configuration>
- <wtpversion>R7</wtpversion>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>