ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: How to detect missing jars in a <path>?
Date Mon, 12 Dec 2005 12:43:56 GMT
I think enhancing <available> [1] would be good idea:

<available resource="">
    <need compare="min|max|exactly" number="<integer>|all">
        <*resource/>
    </need>
</available>


<need> is a resource collection [2]. It combines multiple possibilities
* need exactly 3 of the specified resources
  <need compare="exactly" number="3">
* need 3 or more resources
  <need compare="min" number="3">
* need 4 or less resources
  <need compare="max" number="4">
* nedd all resources - which is the default
  <need compare="exactly" number="all">
  because it´s the default just: <need> 


  <fail message="Missing one resource">
     <available><need><path refid="xyz"/></need></available>
  </fail>


Open:
- naming of the element (<need>)
- naming of the attributes
  Are here any other tasks where we can "reuse" the names?
- integration into resource collections
  Do I use the right scenario or is there something else?


Advantage: <available> would support resources (doesnt do it yet) :-)



Jan



[1] http://ant.apache.org/manual/CoreTasks/available.html
[2] http://svn.apache.org/repos/asf/ant/core/trunk/docs/manual/CoreTypes/resources.html#collection



>-----Ursprüngliche Nachricht-----
>Von: Bertrand Delacretaz [mailto:bdelacretaz@apache.org] 
>Gesendet: Montag, 12. Dezember 2005 12:18
>An: Ant Users List
>Betreff: Re: How to detect missing jars in a <path>?
>
>Le 12 déc. 05, à 11:57, Steve Loughran a écrit :
>
>> ...Sounds to me like you've just added a new condition to Ant, 
>> Monsieur Delacretaz, called something like <pathexists> , which 
>> verifies that every element in a path is present, logs at -verbose 
>> level if one is missing (and perhaps sets a property to a 
>> filelist/path of missing items)...
>
>Thanks for confirming that it doesn't exist yet, I was 
>wondering if I was missing something obvious.
>
>> something like
>> <condition property="missing.path">
>>   <available pathref="xyz" missingpathid="xyz.missing" 
>> textproperty="message" />
>> </condition>
>> <fail if="missing.path">Missing files ${message}</fail>
>
>Sounds good, I'll try to come up with something in my Copious 
>Free Time...
>
>Actually, if the JVMs would check existence of all jar files 
>passed in the classpath, it would make our lives easier in many places.
>
>-Bertrand
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message