In perl I would say:

map { 
  die "missing library $1" if /\$\{libs\.(.+)\.classpath\}/ 
} @classpath;


and get the feature that if property expansion failed, the build would halt
with a meaningful error message.

In ant:

<filterchain>
  <expandproperties/># doesn't support failonerror attribute
</filterchain>

<fail message="missing library ${missing.library}">
  <condition property="missing.library">  # doesn't support property
attribute
    <matches pattern="libs\.(.+)\.classpath"
string="${libs.list.classpath}"/> # doesn't support property attribute
  </condition>
</fail>

<path path="${classpath}">
   <existing/> # does not fail if unset pathelement
</path>

How can I fail cleanly if the classpath could not be loaded?

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0

-- 
View this message in context: 
http://ant.1045680.n5.nabble.com/How-to-fail-if-property-expansion-failed-tp3231557p3231557.html
Sent from the Ant - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to