Added assert:assertFileExists tag to verify if a file exists while testing a plugin.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114372 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol 2003-11-17 21:32:41 +00:00
parent aab54dc5e3
commit a79c8c2e62
2 changed files with 26 additions and 2 deletions

View File

@ -5,6 +5,7 @@
xmlns:j="jelly:core" xmlns:j="jelly:core"
xmlns:maven="jelly:maven" xmlns:maven="jelly:maven"
xmlns:u="jelly:util" xmlns:u="jelly:util"
xmlns:define="jelly:define"
xmlns:x="jelly:xml"> xmlns:x="jelly:xml">
<goal name="plugin" <goal name="plugin"
@ -231,7 +232,13 @@
</delete> </delete>
</j:if> </j:if>
</goal> </goal>
<!--
========================================================================
Goals and tags used for testing Maven plugins.
========================================================================
-->
<!-- test a plugin --> <!-- test a plugin -->
<goal name="plugin:test"> <goal name="plugin:test">
<u:available file="${basedir}/src/plugin-test/project.xml"> <u:available file="${basedir}/src/plugin-test/project.xml">
@ -241,4 +248,15 @@
ignoreFailures="false" /> ignoreFailures="false" />
</u:available> </u:available>
</goal> </goal>
<define:taglib uri="assert">
<define:tag name="assertFileExists">
<!-- @file : Full file path -->
<u:file var="fileAsFile" name="${file}"/>
<j:if test="${!(fileAsFile.exists())}">
<ant:fail>${file} does not exist</ant:fail>
</j:if>
</define:tag>
</define:taglib>
</project> </project>

View File

@ -7,7 +7,13 @@
<body> <body>
<release version="1.2" date="in CVS"> <release version="1.2" date="in CVS">
<action dev="dion" type="add">Add plugin:test goal</action> <action dev="vmassol" type="add">
Added assert:assertFileExists tag to verify if a file exists while
testing a plugin.
</action>
<action dev="dion" type="add">
Add plugin:test goal
</action>
</release> </release>
<release version="1.1" date="2003-09-29"> <release version="1.1" date="2003-09-29">