See Eclipse bug 34466 comment #7 or see the Eclipse Readme the Platform - 
Ant section 
or the Eclipse help:
http://help.eclipse.org/help31/index.jsp
?topic=/org.eclipse.platform.doc.isv/guide/ant_contributing_task.htm
"Important rules..." section

HTH
Darins



Mark Russell <[EMAIL PROTECTED]> 
12/27/2005 08:00 AM
Please respond to
"Ant Users List"


To
ant develipers list <user@ant.apache.org>
cc

Subject
getProject() returns null






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]


Reply via email to