ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederic Lavigne" <>
Subject [PATCH] Automatic loading of classes
Date Thu, 03 Aug 2000 20:27:17 GMT

I extracted the code from AntHill (the gui tool I'm working on). See email

I use a modified class to setup the extra tasks

	    Project project = new Project() {
		    boolean extraLoaded = false;
		    public Task createTask(String taskType) throws BuildException {
			if (!extraLoaded) {
			    try {
				// here comes the extra task loading
			    } catch (Exception e) { throw new BuildException("Failed to load
addins", e); }
			    extraLoaded = true;
			return super.createTask(taskType);

Don't know yet where it can be included in Ant code, I'm sure Ant gurus will
find out.
But ExtraTask.load(Project) needs to be called only when basedir has been
set by ant.
ExtraTask uses AntClassLoader and Path and they rely on the basedir

Hope this helps,

Frederic Lavigne,
java software at

View raw message