je doute, je fait ce fichier de construction afin de construire 3 différents projetsconstruire de multiples projets et propres projets multiples dans un seul fichier de construction avec ANT
<?xml version="1.0" encoding="UTF-8"?>
<project name="Trinity" basedir="." default="buildall">
<target name="project1">
<ant dir="C:/work/project1"/>
</target>
<target name="project2" depends="project1">
<ant dir="C:/work/project2"/>
</target>
<target name="project3" depends="project1, project2">
<ant dir="C:/work/project3"/>
</target>
<target name="buildall" depends="project3"/>
</project>
Cela fonctionne maintenant. Mais je voulais aussi nettoyer le projet avant de faire la construction.
En fait, je veux acomplish ceci: C:/travail/project1 fourmi construction propre C:/travail/ant Projet2 construction propre C:/travail/ant projet3 construction propre
de Merci à l'avance. Mise à jour: Merci à la réponse rapide d'Alex, j'ai fait un nouveau fichier build.xml avec ce qui suit. Et je crois que cela fonctionne bien, qu'en pensez-vous?
<?xml version="1.0" encoding="UTF-8"?>
<project name="Trinity" basedir="." default="buildall">
<target name="project1">
<ant dir="C:/work/project1" target="clean"/>
<ant dir="C:/work/project1" target="build"/>
</target>
<target name="project2" depends="project1">
<ant dir="C:/work/project2" target="clean"/>
<ant dir="C:/work/project2" target="build"/>
</target>
<target name="project3" depends="project1, project2">
<ant dir="C:/work/project3" target="clean"/>
<ant dir="C:/work/project3" target="build"/>
</target>
<target name="buildall" depends="project3"/>
</project>
Merci.
Stop! Avez-vous vraiment trois projets? Si c'est le cas, utilisez [Ivy] (http://ant.apache.org/ivy/) pour les gérer en tant que projets séparés et abandonnez votre fichier de construction parent. Si ce n'est pas le cas, ayez juste un fichier de construction pour les trois parties de votre projet (http://www.build-doctor.com/2008/03/19/ant-best-practices-prefer-a-single-buildfile/ –