retour au sommaire regex-coach Maven
Ajouter un commentaire, une note, faire une correction, référencer un lien, ...

ant-contrib

Extensions for Ant

Historique ant-contrib :

The Ant-Contrib project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant.
  • Logic Tasks
    • Foreach : The foreach task iterates over a list, a list of paths, or both.
    • If : Perform some tasks based on whether a given condition holds true or not.
    • TimestampSelector
    • Outoutdate
    • Switch : Task definition for the ANT task to switch on a particular value.
    • Throw
    • Trycatch
  • Platform Tasks
    • Osfamily
    • Shellscript
  • Property Tasks
    • Propertycopy : Copies the value of a named property to another property.
    • PropertySelector : Selects property names that match a given regular expression and returns them in a delimited list
    • Pathtofileset : Coverts a path to a fileset. This is usefull if you have a path but need to use a fileset as input in a ant task.
    • PropertyRegex :Performs regular expression operations on an input string, and sets the results to a property.
    • SortList : Sort a delimited list of items in their natural string order.
    • URLEncode : The URLEncode task will encode a given property for use within a a URL string.

Source : SourceForge

Un complément indispensable

Dès que l'on veut faire des choses un peu complexe avec ANT, ce package devient obligatoire si on ne veut pas développer ses propres taches ANT.
On peut citer en autre Foreach, If, Switch qui augmentent considérablement la puissance de ANT.
De plus pour manipuler des String et faire des remplacements, on utilisera PropertyRegex.
Je pense personnelement que ces taches devraientt faire partie des taches de base de ANT. Sans doute, ces extensions seront intégrés dans une prochaine version.
A noter que ant-contrib est, tout comme ANT, un projet apache.

Source : Loribel
http://ant-contrib.sourceforge.net/

Installation de ant-contrib

2 possibilités :
  • Solution la plus simple (copier dans le répertoire de ant)
    • Copier le fichier ant-contrib-x-x.jar dans le répertoire lib de ant
    • Ajouter la ligne suivante à vos projets
      <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
  • Installation dans un répertoire séparé
    • Garder ant-contrib-x-x.jar dans un répertoire séparé
    • Dire à Ant comment trouver la librairie
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
  <classpath>
    <pathelement location="/usr/share/java/lib/ant-contrib-x-x.jar"/>
  </classpath>
</taskdef>

Source : Loribel

Outils liés :

Version imprimable...
Envoyer à un ami...

Sujets liés

Ant
tous les sujets...

Sites de référence

tous les liens...

Memento

Memento ANT
Exemples ANT
tous les memento...

Ant

Liens [1] - Articles [2] - Outils [1] -

Choisir les meilleures vitamines...



Films Disney

Vidéos sur les OGM

Villes de France sur GoogleMap

Java - XML - Web


Informatique


Voir Aussi



Google