ECLIPSE-52: changed the test to handle the situation where cactus plugin is not installed

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116184 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
felipeal committed 2004-10-23 15:52:51 +00:00
1 parent b0dbddfb0c
commit deabf13156
1 file changed
+15 -1
+15 -1
View File
@@ -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">