ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharp, Joshua L, SOLGV" <jlth...@att.com>
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?

Thanks,

Josh

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com] 
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,
thus
accepts selectors. One you have your selector working, then simply use
it
within <rmic>.

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

-----Original Message-----
From: Tharp, Joshua L, SOLGV [mailto:jltharp@att.com] 
Sent: Tuesday, April 22, 2003 5:53 PM
To: user@ant.apache.org
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,

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message