You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/04/04 10:22:00 UTC
svn commit: r391246 - in /maven/plugins/trunk/maven-idea-plugin/src/test:
java/org/apache/maven/plugin/idea/ java/org/apache/maven/plugin/idea/stubs/
module-plugin-configs/
Author: epunzalan
Date: Tue Apr 4 01:21:56 2006
New Revision: 391246
URL: http://svn.apache.org/viewcvs?rev=391246&view=rev
Log:
PR: MIDEA-43
Fixed bug in test project counter and added files from the War MavenProject tests
Added:
maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/WarMavenProjectStub.java
maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-war-plugin-config.xml
Modified:
maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java
maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java
Modified: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java?rev=391246&r1=391245&r2=391246&view=diff
==============================================================================
--- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java (original)
+++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java Tue Apr 4 01:21:56 2006
@@ -29,7 +29,7 @@
public class IdeaModuleTest
extends AbstractIdeaTestCase
{
- public void testMinConfig()
+ public void testJarMinConfig()
throws Exception
{
List expectedDeps = new ArrayList();
@@ -59,6 +59,18 @@
expectedDeps.remove( root.attributeValue( "url" ) );
}
}
+
+ assertTrue( "All dependencies are present", expectedDeps.size() == 0 );
+ }
+
+ public void nottestWarMinConfig()
+ throws Exception
+ {
+ List expectedDeps = new ArrayList();
+ expectedDeps.add( "jar://E:/localRepository/org.apache.maven/maven-model/2.0.1/maven-model-2.0.1.jar!/" );
+ expectedDeps.add( "jar://E:/localRepository/junit/junit/3.8.1/junit-3.8.1.jar!/" );
+
+ Document imlDocument = executeMojo( "src/test/module-plugin-configs/min-war-plugin-config.xml" );
assertTrue( "All dependencies are present", expectedDeps.size() == 0 );
}
Modified: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java?rev=391246&r1=391245&r2=391246&view=diff
==============================================================================
--- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java (original)
+++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java Tue Apr 4 01:21:56 2006
@@ -1,5 +1,7 @@
package org.apache.maven.plugin.idea.stubs;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
/*
* Copyright 2005-2006 The Apache Software Foundation.
*
@@ -20,7 +22,7 @@
* @author Edwin Punzalan
*/
public class ReactorMavenProjectStub
- extends SimpleMavenProjectStub
+ extends MavenProjectStub
{
private static int reactorProjectCounter = 0;
@@ -41,5 +43,15 @@
public String getArtifactId()
{
return artifactId;
+ }
+
+ public String getGroupId()
+ {
+ return "org.apache.maven.plugin.test";
+ }
+
+ public String getVersion()
+ {
+ return "1.0";
}
}
Added: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/WarMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/WarMavenProjectStub.java?rev=391246&view=auto
==============================================================================
--- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/WarMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/WarMavenProjectStub.java Tue Apr 4 01:21:56 2006
@@ -0,0 +1,29 @@
+package org.apache.maven.plugin.idea.stubs;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Edwin Punzalan
+ */
+public class WarMavenProjectStub
+ extends SimpleMavenProjectStub
+{
+ public String getPackaging()
+ {
+ return "war";
+ }
+}
Added: maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-war-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-war-plugin-config.xml?rev=391246&view=auto
==============================================================================
--- maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-war-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-war-plugin-config.xml Tue Apr 4 01:21:56 2006
@@ -0,0 +1,42 @@
+<!--
+ ~ Copyright 2005-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <executedProject implementation="org.apache.maven.plugin.idea.stubs.WarMavenProjectStub"/>
+ <localRepo>${localRepository}</localRepo>
+ <overwrite>false</overwrite>
+ <reactorProjects>
+ <reactorProject implementation="org.apache.maven.plugin.idea.stubs.ReactorMavenProjectStub"/>
+ <reactorProject implementation="org.apache.maven.plugin.idea.stubs.ReactorMavenProjectStub"/>
+ <reactorProject implementation="org.apache.maven.plugin.idea.stubs.ReactorMavenProjectStub"/>
+ </reactorProjects>
+ <linkModules>true</linkModules>
+ <useFullNames>false</useFullNames>
+ <downloadSources>false</downloadSources>
+ <sourceClassifier>sources</sourceClassifier>
+ <downloadJavadocs>false</downloadJavadocs>
+ <javadocClassifier>javadoc</javadocClassifier>
+ <dependenciesAsLibraries>true</dependenciesAsLibraries>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file