Nico Seessle wrote: > > ----- Original Message ----- > From: "Jonas Tehler" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, November 01, 2000 10:35 AM > Subject: Dynamic targets? > > > > > There is one thing I'm really missing in Ant. Dynamic targets. If I for > > example where to run ant from the command line like this: > > > > ant com.foo.bar > > > > If there is no com.foo.bar-target this will fail. I would like it to > > pass com.foo.bar to some 'dynamic' target where I can do whatever I want > > with it (for example replacing the dots with path delimiters and build > > that dir). This would make the size of the build files smaller and open > > up for all kinds of nice dynamic stuff. > > > > What target should ant select? Random? Default-Target? > To what should the argument you provide be assigned?
One would have to define some target for this. Maybe 'dynamic' is a good name. So if ant gets an argument that it doesn't find a target for, it hands it to the dynamic target. I guess you could put the argument in some property. I haven't checked the source so I don't know the best way to implement this. > Why can't you use -DusePackage=com.foo.bar and do whatever you want with it > in the default-target? Yes.. I guess you could do it that way. But you can't have it check for existing packages too then. / Jonas
