If I have an Ant task like this:
<target name="default">
<mkdir dir="${installer.config.installation.db.path}"/>
</target>
And the property referenced is NOT set, I end up with a directory (in this ‘mkdir’ example) being created with the literal name of (as a subdir of the ‘basedir’):
${installer.config.installation.db.path}
Is there any way to enforce a failure if ANT is asked to resolve properties but fails?
There is no way to do this for all properties but you can check individual ones:
The above will abort the script when the property isn’t defined. It will succeed when the property is empty, though!