felipeal 2004/10/23 08:52:51
Modified: eclipse/src/plugin-test maven.xml
Log:
ECLIPSE-52: changed the test to handle the situation where cactus plugin is not
installed
Revision Changes Path
1.20 +15 -1 maven-plugins/eclipse/src/plugin-test/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/maven-plugins/eclipse/src/plugin-test/maven.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- maven.xml 22 Oct 2004 06:01:38 -0000 1.19
+++ maven.xml 23 Oct 2004 15:52:51 -0000 1.20
@@ -18,6 +18,7 @@
<project xmlns:j="jelly:core"
xmlns:assert="assert"
xmlns:u="jelly:util"
+ xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<goal name="testPlugin"
prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates,test-classpath-con-entry">
@@ -111,7 +112,20 @@
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count"
select="count($classpathDoc/classpath/classpathentry[contains(@kind,'src')])"/>
- <assert:assertEquals expected="7" value="${count.intValue().toString()}"
msg="Wrong number of generated src directories found"/>
+
+ <j:set var="expectedDirs" value="6"/>
+ <j:set var="cactusStatus" value="NOT installed"/>
+ <maven:get plugin="cactus-maven" property="plugin" var="cactusPlugin" />
+ <j:if test="${! empty(cactusPlugin)}">
+ <j:set var="expectedDirs" value="${expectedDirs+1}"/>
+ <!-- I wish someday I will understand why Jelly requires hacks like
+ the following ... -->
+ <j:set var="expectedDirs" value="${expectedDirs.intValue().toString()}"/>
+ <j:set var="cactusStatus" value="installed"/>
+ </j:if>
+ <echo>Cactus plugin ${cactusStatus} - expecting ${expectedDirs} source
entries.</echo>
+
+ <assert:assertEquals expected="${expectedDirs}"
value="${count.intValue().toString()}" msg="Wrong number of generated src directories
found"/>
</goal>
<goal name="test-classpath-has-overridden-jar">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]