Two Laptop Bag
The moose likes Ant, Maven and Other Build Tools and the fly likes Using Javadoc on multiple source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Using Javadoc on multiple source" Watch "Using Javadoc on multiple source" New topic

Using Javadoc on multiple source

Nicolas Brasseur
Ranch Hand

Joined: Nov 09, 2001
Posts: 45
Hi guys,
I am pretty new to ant so maybe is my question a bit stupid :
I am writing an ant script that gets java sources from a versioning system (merant pvcs using the pvcs task) and run the Javadoc tool on those ( using the javadoc task).
The java sources come from multiple pvcs DBs and I don't want to hardcode the urls of the DBs in my ant script so if I have an additional pvcs bd to consult I do not have to modifiy my ant script (but I have to modify somthing else : a property file or something like that)
To summarize : Is there a way to run a target multiple times using different values for each run (values located in an external file) ?
thanks in advance for your help

<a href="" target="_blank" rel="nofollow">BlackBeltFactory Communtiy</a> founder - Building better developers<br /><b>Free</b> courses and mock exams
Greg Charles

Joined: Oct 01, 2001
Posts: 2968

You can run the same target multiple times with different parameters, using antcall and nested param tags. However, you still have to make each call explicitly. There's no way (that I know of) to have Ant parse up a list of values, and then loop through them running a task on each one.
wood burning stoves
subject: Using Javadoc on multiple source
It's not a secret anymore!