Bonjour,
En ce moment, plusieurs de mes projets utilisent des définitions de cibles communes. Une façon que j'ai définie de compiler, distribuer, appeler JDepend, etc.
Je ne connais qu'une de rendre accessibles à mon enfant les cibles définies dans mon fichier xml parent, parent.xml. Celle-ci:
Existe t-il une manière plus heureuse de procéder? Une écriture plus simple?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <project name="monProjet"> <!-- Tâches ant qui lui sont spécifiques --> .......... <!-- Tâches reprises du parent --> <target name="compile"><ant antfile="../parent.xml" inheritAll="true" inheritRefs="true" target="compilationStandard"/></target> <target name="dist" depends="compile"><ant antfile="../parent.xml" inheritAll="true" inheritRefs="true" target="distJarStandard"><property name="nomdist" value="${ant.project.name}.jar" /></ant></target> <target name="javadoc"><ant antfile=".../parent.xml" inheritAll="true" inheritRefs="true" target="javadocStandard"/></target> <target name="jdepend"><ant antfile="../parent.xml" inheritAll="true" inheritRefs="true" target="jdependStandard"/></target> </projet>
Car la recopie de script ant en script ant des lignes du bas m'est fastidieuse.
En vous remerçiant,
Partager