> > As ant.jar cannot be found on the system classloader anymore, any > > class loaded from the system classloader (i.e. classes coming from > > CLASSPATH) can't load the Task class for example. > > > > I see two options: > > > > (1) live with it and document it properly (which means > people may have > > to link/copy a lot into ANT_HOME/lib). > > Yes. I think we should recommend that Ant be run with an > empty CLASSPATH. I > have added an option ot read libs out of a home directory and > would like to > add an option to specify arbitrary lib directories with a > -lib option or > similar. The only drag is that the command processing would > need to be done > in the launcher to extract this info and then pass the rest > of the command > line to the Main class.
Ant support the environment variables ANT_OPTS and ANT_ARGS. Maybe an additional ANT_LIBS? Or searching by default for .ant-settings (or similar) file which contains infos about libs (and maybe additional stuff) in the current directory? So you can create a config file for each project and don´t have to start ant always with a "ant -lib a-very-long-lib-list usual-ant-stuff". Mmmm - defining additional libs inside the buildfile ? Jan