ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ponce Albendea, Javier" <jpalben...@indra.es>
Subject One question about ANT
Date Tue, 25 Mar 2003 13:49:16 GMT
Hi all,

This is my build.xml
I'm trying to re-use a task, as if it was a function,

This is part of my build.xml 

  <target name="funcionVssCreate" description="Crea el directorio especificado como 'parametro'">
 
      <vsscreate login      ="${login}" 
                 vssPath    ="${pathInicio}/${vssDirNuevo}" 
                 serverPath ="${serverPath}" 
                 ssDir      ="${ssDir}" 
                 failOnError="${vssCreate_failOnError}" /> 
  </target>
  <target name="paramsDirectorioProyecto">
	  <property name="vssDirNuevo" value="${nombreProyectoMayus}" />
  </target>
  <target name="paramsDirectorio_ant">
	  <property name="vssDirNuevo" value="${nombreProyectoMayus}/ant" />
  </target>
  <target name="crearDirectorioProyecto" depends="paramsDirectorioProyecto, funcionVssCreate">
</target>
  <target name="crearDirectorio_ant"     depends="paramsDirectorio_ant,     funcionVssCreate">
</target>
  <target name="creaProyecto"            depends="crearDirectorioProyecto, crearDirectorio_ant">
</target>


As you can see, i've got a task funcionVsscreate that creates a folder. 
The folder comes determinated by the vssDirNuevo variable. This variable
is defined by the tasks paramsDirectorioProyecto,  paramsDirectorio.
I've got also tasks like crearDirectorioProyecto and crearDirectorio_ant
to create the respective folders.

But, when the task creaProyecto is executed, by the depends policy 
comes the following:
    paramsDirectorioProyecto -> funcionVssCreate -> crearDirectorioProyecto -> paramsDirectorio_ant
->
    funcionVssCreate -> crearDirectorio_ant -> creaProyecto 
The task funcionVssCreate teorically must be executed twice, but it's executed just once.
It looks like a determinated task (in this case, creaProyecto) keeps a list of the tasks
that has executed, and when one of the task that it's been executed before, has to be executed

again, it does not.
Is that correctly??
Is there any target parameter that enables (forces) the tasks repeated to be executed more
than once??

Thanks in advance
Javier


Mime
View raw message