I am using ant 1.7, getting following error:
build.xml:55: fileset doesn’t support the “erroronmissingdir” attribute
what is the alternative attribute for erroronmissingdir( it is in 1.8) in 1.7
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The fileset erroronmissingdir attribute is available since Ant 1.7.1. You must be using an earlier release of 1.7.
The attribute is used to tell the build to silently ignore filesets for which the base dir does not exist at execution time:
If you do not specify
erroronmissingdir="false"(or cannot, because your version of Ant does not support it), then the default result is build failure if the dirfoodoes not exist.If you need your build to succeed whether or not the dir exists, and you cannot use the erroronmissingdir attribute, you have some options.
For example, you could specify the base dir of the fileset to be a known-to-exist parent of your target dir, something like this:
(Note in this case, the copy will now create dir foo in the
todirof thecopy. You could strip that using a glob mapper.)Another alternative would be to execute your conditionally available fileset operations in targets, guarded by a condition, e.g.
Output with
ant -vwill show: