You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Iñigo Serrano <in...@wanadoo.es> on 2002/06/13 12:47:37 UTC

[ANN] New version of ISDirValidator

Hello

I have developed a new version of ISDirValidator, an utility and Ant's task to validate directory structure. It is usefull to check if some directory has some files or not, and if the files that has are permited. Now it supports recursive directories and it also check directory names.

An examples of ISDirValidator to check WARs:

<isdirectory dir="${path}/META-INF">
    	<isfile file="MANIFEST.MF" required="yes" />
</isdirectory>

Check that in the META-INF directory only exist the MANIFEST.MF file

<isdirectory dir="${path}/WEB-INF">
    	<isfile file="web.xml" required="yes" />
    	<isfilePatterm filePatterm="^[a-zA-Z-]+\.tld$" />
</isdirectory>

Check that in the WEB-INF exist the file web.xml and tag libraries

<isdirectory dir="${path}/WEB-INF/classes" recursive="yes" >
    	<isfilePatterm filePatterm="^[:alnum:]+\.properties$" />
    	<isfilePatterm filePatterm="^[:alnum:]+\.class$" />
    	<issubdirectoryPatterm directoryPatterm="^[a-zA-Z]+$" />
</isdirectory>

This is new in version 2: Check that in the classes directory (and subdirectories) exist only properties and class files. The subdirectories can only have names with letters.

The code is license under the GNU GPL license.

The web is in http://isvalidator.sourceforge.net
and to download go to http://sourceforge.net/project/showfiles.php?group_id=41301

I hope it will be usefull to somebody

Iñigo
--------------------------------------------------
http://www.inigoserrano.com
http://isvalidator.sourceforge.net