jscripter schrieb am 22.06.2009 um 13:46:19 (-0700):
> 
> Suppose I have an operation which deploys files and I have the option
> of deploying the files by copying them and deploying using symlinks:
> 
> <target name="deploy-using-copy">
>   <task1>
>   <copy-files-2>
>   <task3>
>   <copy-files-4>
>   <task5>
> </target>
> 
> <target name="deploy-using-link">
>   <task1>
>   <link-files-2>
>   <task3>
>   <link-files-4>
>   <task5>
> </target>
> 
> What's the best way to factor out the commonality of these two
> targets?
> 
> Note that <task1>, <task3>, etc. are going to be sequence of tasks and
> not just a single task element.
> (Is it possible to define a task which is a sequence of tasks?)

Would target/@depends work for you? You would then factor out your
series of tasks to a different target. Isn't a target just a processing
unit placed in the dependency graph?

  <target name="deploy-using-copy" depends="trg1,trg3,trg5">
  ...

  <target name="deploy-using-link" depends="trg1,trg3,trg5">
  ...

Michael Ludwig

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to