ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattf <>
Subject Re: AW: How to fail if property expansion failed...
Date Fri, 22 Oct 2010 21:39:54 GMT

I was hoping to avoid introducing additional requirements, such as antcontrib
or Ivy.<p/>The list is a merge of two files, one global property list of
libs that have names that dereference to a list of jars (produced and
managed by an external program); and one local -- just part of that name.
These artifacts are introduced in ant as
Then processed by <pathconvert><path><existing/>...<p/>
Thus, the list would have pathsep, not comma; but maybe that doesn't

Jan Matèrne-2 wrote:
> - you have defined a list of libraries (@classpath) which you require 
Yes, sort of; a library property is a list of jars, a library-list names
those properties by name; and is passed to classpath after expansion to the
actual jars, and relative names expanded.  If the expansion fails, then the
origin list named an undeclared property, and the name-form (${name}) is
passed to classpath, indicating failure.  Now, I want ant to fail when
failure is indicated.<p/>
Isn't there something in ant core that will help?<p/>
A loop isn't actually required, and for lack of a better solution pattern
matching the whole text is also possible.
<fail message="missing library ${missing.library}">
        <matches pattern="libs\.(.+)\.classpath"

Will give me the full stop I desire, but how can I set the property
${missing.library} to the value of the capture at (.+)?
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