ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gordon" <>
Subject RE: Feature / Enhancement request
Date Tue, 22 Apr 2003 14:37:36 GMT
> Did you write any custom selectors actually introspecting the class files,
> or parsing the source files to determine whether to include them or not?

No - I did it by parsing config files which drive what belongs in what tier,
among other things.

Not ideal. I did this because I could leverage config used to drive our
legacy make-based build system and I have to be 100% backward compatible for
a while.

If you write something that parses .java files, then you'll probably end up
effectively embedding a properties file in the comments of your java files.
If you're happy with the pragmatic way that source control systems and
JavaDoc leverage comments in files in this way (seems to work ok) then this
is the way to go. You'll either have to do the lexical analysis yourself or
leverage code which already does (such as the Doclet code).

You could write something that parses .class files and then interprets
whether to include it based on the package name. Fine, but watch out for
rmic-generated classes - the stubs and skels will have to live in different
tiers although they'll be generated to the same package by default. I would
wager that they'll always be 'funnies' that don't really belong where the
package name implies. I like the idea of being able to change my mind in
hurry if I have to by just changing one thing.

Having an @deploy tag in the javadoc would allow you to specify
arbritarily-named tiers, such as client, gui, webserver, hellomum, etc.
There's lots of library code in ANT and Doclet for you to leverage - it's
the way I would of gone if I hadn't had to use property files because of
legacy constraints.



-----Original Message-----
From: Dominique Devienne []
Sent: 22 April 2003 14:46
To: 'Ant Users List'
Subject: RE: Feature / Enhancement request

Did you write any custom selectors actually introspecting the class files,
or parsing the source files to determine whether to include them or not?

If yes, could you share them with the rest of us? That's something I'll need
to do pretty soon, and a head-start or a valid pre-existing solution would
be greatly appreciated ;-) Thanks, --DD

-----Original Message-----
From: Tim Gordon []
Sent: Tuesday, April 22, 2003 4:01 AM
To: Ant Users List
Subject: RE: Feature / Enhancement request

I've used custom selectors to veto the inclusion of .class files into any
ANT task which is FileSet based. This drives javac, jar, the whole shebang.
I've ended up with a build system that is really clean.

I agree that a well-layed-out package structure helps, but I don't agree
about having different trees for different tiers of the application. As you
move things between them (and you will) using things like IntelliJ (great
IDE) then you lose the change history if you use CVS (we do). I know that
this can be got around by actually moving the ,v files (in CVS), but
IntelliJ wont do this for you, AFAIK. It's just a limitation of using CVS,
AFAIK, and I hope it's something that Subversion will ultimately address
well if it's integrated into IntelliJ.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message