ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharp, Joshua L, SOLGV" <>
Subject RE: Automatic stub generation
Date Wed, 23 Apr 2003 15:08:21 GMT
I figured out that I could put a selector in the <rmic> task because of
the statement from the rmic description page, "[t]his task forms an
implicit FileSet and supports all attributes of <fileset> (dir becomes
base) as well as the nested <include>, <exclude> and <patternset>
elements." I looked at FileSet to figure out that it takes a selector.
Here's where the problems really started though...

A selector that looks for a comment must work on the source, but <rmic>
works on the .class files. Unfortunately, what I was finding was that
the base attribute must specify the location to store the class files,
and I think it is also the implicit dir attribute for the fileset ("dir
becomes base," should read, "base becomes dir"). So, if I look for a
comment, it can't be found in the class file.

So how can I create a selector and then specify that what I really want
is the corresponding .class file? Do I need to define something outside
the <rmic> task and create some <patternset> or something that I can
reference from inside the <rmic> task?



-----Original Message-----
From: Dominique Devienne [] 
Sent: Wednesday, April 23, 2003 7:50 AM
To: 'Ant Users List'
Subject: RE: Automatic stub generation

It's not documented in Ant 1.5.1 (the docs I'm looking at), but <rmic>,
since extending MatchingTask, which was made into a SelectorContainer,
accepts selectors. One you have your selector working, then simply use
within <rmic>.

Because <rmic> doesn't accept a nested <fileset>, where it's obvious one
do <fileset refid="..." />, it's not evident it supports <fileset>,
Plus that tasks now needs to document all these attributes of <fileset>
duplicates... Just one more example why composition is better than
inheritance in my book. --DD

-----Original Message-----
From: Tharp, Joshua L, SOLGV [] 
Sent: Tuesday, April 22, 2003 5:53 PM
Subject: Automatic stub generation

I've scanned the archives for my answer, but I haven't found a
satisfactory answer, so I'll pose the question myself...

I'm trying to automatically detect which files need to have RMI stubs
generated. I already have a comment in each file that requires
generation that I can search for. However, I haven't been able to figure
out how to use a combination of selectors, filesets, or whatever to
specify which files need RMI stubs generated. I did something similar to
this with make on Solaris with a little grep > temp.file routine. Then I
took the list of files from that routine and ran them through rmic
(after changing the *.java path names to qualified class names). This
worked really well. I can use a selector to find the files with the
comments using ant... but then what?

Any help here would be appreciated,


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

View raw message