ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Cook <tc...@ardec.com.au>
Subject Re: Patch: JAVAC dependency tracking and multiple src paths handling
Date Thu, 11 May 2000 05:49:08 GMT
On Wed, 10 May 2000, Eugene Bekker wrote:

> I think the problem is not so much discovering the path separator for the
> current platform, the problem is that you want to write a generic build.xml
> for all platforms, so a standard separator needs to be used.

Ah... didn't think of that...

> One alternative is to add an attribute that specifies what the separator is
> for tasks that need to parse list of dirs/files.  Or perhaps a global
> property that defines one.

Niether of these approaches is really appealing; having to add an extra
attribute to _every_ task which uses a list is something that writers of
build files don't really want to know about, and I believe the general
move is away from global properties.

So how to do it? AFAIK niether ';' or ':' is a valid character in paths on
either M$ or U*IX systems, so list code could just check for both. As for
constructing lists programatically, then you would use the one found in
java.io.File.pathSeparatorChar.

There's probably a flaw in this, also, though.

Just a quick question while I'm here. I've been working with a fairly
archaic version of ant for some time, and have only recently gotten the
new sources out and started to play, so I'm not sure how some of this new
fang-dangled stuff works. This should also be a RTFM, but the FM seems a
bit thin on the ground :-)

We have a source tree which is in a CVS repository. When we do a 'cvs
edit' on a file called file_path/file_name.java it creates a file
file_path/CVS/Base/file_name.java which ant compiles _before_ it compiles
the original, which causes all sorts of problems to do with re-defining
classes and so on. I also tend to believe that at least most minor
revisions of a file should compile before the changes are committed. I
think I should be able to exclude all files below a CVS directory with the
'excludes' attribute, but can't work out how. I think this should work:

...
<javac srcdir="${src.dir}" destdir="${build.dir}" classpath="${classpath}"
	debug="off" derecation="off" excludes="${src.dir}/CVS"/>
...

but it doesn't seem to.

Cheerio
--
Tom Cook - Software Engineer

"The brain is a wonderful organ. It starts functioning the moment you get
up in the morning, and does not stop until you get into the office."
	- Robert Frost

LISAcorp - www.lisa.com.au

--------------------------------------------------
38 Greenhill Rd.          Level 3, 228 Pitt Street
Wayville, SA, 5034        Sydney, NSW, 2000

Phone:   +61 8 8272 1555  Phone:   +61 2 9283 0877
Fax:     +61 8 8271 1199  Fax:     +61 2 9283 0866
--------------------------------------------------



Mime
View raw message