vmassol 2003/11/17 13:32:41 Modified: src/plugins-build/plugin/xdocs changes.xml src/plugins-build/plugin plugin.jelly Log: Added assert:assertFileExists tag to verify if a file exists while testing a plugin. Revision Changes Path 1.7 +7 -1 maven/src/plugins-build/plugin/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven/src/plugins-build/plugin/xdocs/changes.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- changes.xml 30 Sep 2003 23:30:32 -0000 1.6 +++ changes.xml 17 Nov 2003 21:32:40 -0000 1.7 @@ -7,7 +7,13 @@ <body> <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 version="1.1" date="2003-09-29"> 1.24 +19 -1 maven/src/plugins-build/plugin/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/maven/src/plugins-build/plugin/plugin.jelly,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- plugin.jelly 8 Oct 2003 05:02:11 -0000 1.23 +++ plugin.jelly 17 Nov 2003 21:32:41 -0000 1.24 @@ -5,6 +5,7 @@ xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:u="jelly:util" + xmlns:define="jelly:define" xmlns:x="jelly:xml"> <goal name="plugin" @@ -231,7 +232,13 @@ </delete> </j:if> </goal> - + + <!-- + ======================================================================== + Goals and tags used for testing Maven plugins. + ======================================================================== + --> + <!-- test a plugin --> <goal name="plugin:test"> <u:available file="${basedir}/src/plugin-test/project.xml"> @@ -241,4 +248,15 @@ ignoreFailures="false" /> </u:available> </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>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]