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 <loadfile><filterchain><expandproperties/>...<p/> Then processed by <pathconvert><path><existing/>...<p/> Thus, the list would have pathsep, not comma; but maybe that doesn't matter.<p/>
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. <code> <fail message="missing library ${missing.library}"> <condition> <matches pattern="libs\.(.+)\.classpath" string="${libs.list.classpath}"/> </condition> </fail> </code> 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: http://ant.1045680.n5.nabble.com/How-to-fail-if-property-expansion-failed-tp3231557p3232997.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