this is an ant task that runs under eclipse 3.1. It is a very simple
task that just prints the name of the project.
However when I runt he ant task under headless eclipse I get the message
that getProject returns null.
here is the code:
/**
*
*/
package mrr.test.ant;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
* @author Mark Russell
*
*/
public class PrintProject extends Task
{
private static final String CLASS_NAME = PrintProject.class.getName();
public void execute() throws BuildException {
System.out.println("execute: " + CLASS_NAME);
if (getProject() == null) {
System.err.println("Project is null");
} else {
System.out.println("Project name: " + getProject().getName());
}
}
}
I am also posting this on the eclipse site
--
Mark Russell
Instantiations, Inc.
http://www.instantiations.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]