Re: How to parameterize similar targets?
From: Robert Klemme (bob.news_at_gmx.net)
Date: 11/26/03
- Next message: james22: "[question] eclipse.M5 build"
- Previous message: Ronald Fischer: "Ant: How to parameterize similar targets?"
- In reply to: Ronald Fischer: "Ant: How to parameterize similar targets?"
- Next in thread: Stefan Bodewig: "Re: Ant: How to parameterize similar targets?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 Nov 2003 15:57:51 +0100
"Ronald Fischer" <ronaldf@eml.cc> schrieb im Newsbeitrag
news:219750c.0311260645.46d2233a@posting.google.com...
> I'm faced with a bunch of build.xml files in several directories,
> all of them define a certain target (say: T). The definition of
> this target in all these build files are structurally nearly the same.
> Their implementations differ only in small details, say, a different
> value for some filename etc. During one build, all these targets are
> executed by recursive calls of Ant.
>
> Maintaining this is a nightmare, because every change of logic has to
> be repeated in every build file, so I'm looking for away to have
> only one copy of them.
You could put all property definitions for the sub build.xml in a file per
sub project and initialize the properties in task <ant>.
> Using an ENTITY declaration in the DOCTYPE and including these repeated
> parts with &... does not work, because they are not completely
identical.
> Using properties as parameters for the differing bits does not work
> either, because I can not change a property as soon as it is set once.
But you can set a property for a recursive ant call! See the attribute
"inheritAll" @ http://ant.apache.org/manual/CoreTasks/ant.html
> Of course I could write a new Ant task in Java, and pass the differing
> values as attributes, but this seems to be an overkill for such a
> seemingly simple problem.
Cheers
robert
- Next message: james22: "[question] eclipse.M5 build"
- Previous message: Ronald Fischer: "Ant: How to parameterize similar targets?"
- In reply to: Ronald Fischer: "Ant: How to parameterize similar targets?"
- Next in thread: Stefan Bodewig: "Re: Ant: How to parameterize similar targets?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|