You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by George McKInney <ge...@tantalus.com> on 2000/09/13 22:37:10 UTC

making java [look like] a MatchingTask

I'm porting some makefiles to Ant and have hit a bit of a snag. One of our
jobs is to use jPublisher to generate a bunch (~100) of .java and .sqlj
files from Oracle stored procedures and then to run sqlj against those
files.

Our makefile command for the sqlj job looks like:

	bin/sqlj ...  `find ./gen/ -name '*.java'` `find ./gen/ -name '*.sqlj'`

where the `find ...` commands are sorta/kinda like Ant's includes= ...

HOWEVER, bin/sqlj (eventually) kicks off a java "task" with all the file
names included as args, and the java task isn't a MatchingTask.

It would be easiest to have my sqlj target call the java task, but I don't
see any reasonable way to get a list of all the files generated by the jpub
target. (Ideally, I'd write a SQLJTask that blends Java.java and
MatchingTask, but I want instant gratification :-)

Is there any fairly simple way to get the file list into the args attribute
of the java task?

Thanks,

George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
george@tantalus.com

Direct  604.726.6753
Main    604.609.0700
Fax     604.609.0705
www.tantalus.com
"When eBusiness experience counts."


Re: making java [look like] a MatchingTask

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "GM" == George McKInney <ge...@tantalus.com> writes:

 GM> Is there any fairly simple way to get the file list into the args
 GM> attribute of the java task?

You could have a look at the <execon> task in current CVS.

Other than that your only option will be writing the <sqlj> task
you've described. Submitting it here - or better to ant-dev - will be
much appreciated (is this enough of an "instant gratification"? 8^).

Stefan