ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alfredo Perez" <alfr...@perseum.com>
Subject Re: Target overriding inside imported files.
Date Mon, 01 Dec 2008 10:17:45 GMT
Thank you very  much Jan

2008/12/1 <Jan.Materne@rzf.fin-nrw.de>

> >I'm working with Eclipse and I have auto generated the
> >build.xml file. There
> >is a way to automatically import your own buildfiles by adding
> ><?eclipse.ant.import?> on the top.
> >My question: ┬┐Is it possible to override the definition of a
> >target in order
> >to specify the dependencies?
> >Let's say for example:
> >
> >
> ><!-- Eclipse automatically generated build.xml file -->
> ><project ...
> >...
> ><import file="build.proxies.xml"/>
> >...
> >...
> ><target depends="build-subprojects,build-project" name="build"/>
> >...
> ><!-- End of Eclipse automatically generated build.xml file -->
> >
> >---------------------------------------------------------------
> >-------------------------------
> >
> ><!-- My own build.proxies.xml file -->
> ><project ...
> >...
> >
> ><!-- Override the target to add the dependency of build -->
> ><target depends="generateproxies" name="build" />
> >
> ><target name="generateproxies">
> >    <!-- generate the proxies for the project -->
> ></target>
> >
> ><!-- End of my own build.proxies.xml file -->
> >
> >
> >
> >Or, do you have any other suggestion in order no to modify the main
> >build.xml file every time?
>
>
> You can overwrite targets and its dependencies.
> You can access the overwritten targets by "full qualified names"
> ${AntProjectName.TargetName}.
> In your case your "build" eliminates the dependency on
> "build-subprojects,build-project".
>
> <!-- Eclipse automatically generated build.xml file -->
> <project name="foo" ...
>     <target depends="build-subprojects,build-project" name="build"/>
>    ...
> <!-- End of Eclipse automatically generated build.xml file -->
> <!-- My own build.proxies.xml file -->
> <project name="myfoo" ...
>     <!-- Override the target to add the dependency of build -->
>     <target depends="generateproxies,foo.build" name="build" />
>    ....
> <!-- End of my own build.proxies.xml file -->
>
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message