ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Kohler" <koh...@cms.tecmath.de>
Subject RE: Including other antfiles
Date Thu, 10 Aug 2000 07:40:12 GMT
Hi,

> -----Original Message-----
> From: Dino Valente [mailto:dino@3dstockcharts.com]
> Sent: Wednesday, August 09, 2000 7:22 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: Including other antfiles
[snip]
>
>
> This solution is ok when the file is relative to the build
> file and you
> execute the ant application in that directory. However, if
> you have a build
> file in the parent directory (which basically goes through
> subdirectories
> to call build) then it doesn't work since the current working
> directory is
> taken from the parent directory for the <!ENTITY usage SYSTEM
> "usage.ent">
> line. The only way to get around this is to use absolute
> paths (which is
> unacceptable for development at my company).

Agreed. I would also like to avoid absolute path names.

>
> This ability to include other ant files is really crucial in
> order for me
> to use ant. Othersize, I will be typing in the same stuff for all my
> projects (I have 20 projects). People have suggested to use
> the following
> method:
>
> <project name="fooproject" basedir=".">
>       <ant antfile="X" dir=" ... " target="TargetX.B">
> 		<property name="name" value="foo" />
> 	</ant>
> </project>
>

I'm trying to understand this ...
Is this from a subproject build file ?

> where X is the general file.

Does this mean, that X is a toplevel buildfile that contains targets for
all subprojects ?

> This doesn't work for me since
> you would have
> to define all the rules again the build file and propagate
> the action to
> the general build file (e.g I have separate rules for building the jar
> file, cleaning the .class files and generating javadocs).
> Maintanence is a
> nightmare.
>
> Ant is a very good product. I was hooked. However, I was very
> disappointed
> on its ability to not handle complex projects. Basically, I wanted the
> ability build each project separately

Yes, I want this too !

> and the ability to build all my
> projects in an efficient way.
>  With make, it is a no brainer except for
> compiling java files.

and there doesn't seem to be any other solution yet.
cons,bake and other alternative make tools don't support Java
very well.

> This is why I like ant so much is that
> it takes care
> of this aspect for me. I was also disappointed on how Ant
> handles property
> values (you can only set it once and can never override
> them).

Can someone enligthen us why it is designed in this way ?
What I want is to set for example the compile options for all projects in
one place and
only override them in projects that have special requirements to do so.
I can't see how that would work with ant.

> I'm still
> hoping someone will post an example that will convince me
> that Ant is the
> answer to my problem (so far no one has).
>
> dino
>

Markus


Mime
View raw message