ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattf <>
Subject How to fail if property expansion failed...
Date Thu, 21 Oct 2010 23:49:10 GMT

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:

  <expandproperties/># doesn't support failonerror attribute

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

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

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:
Sent from the Ant - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message