ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darin Swanson <Darin_Swan...@us.ibm.com>
Subject Re: getProject() returns null
Date Thu, 29 Dec 2005 01:31:12 GMT
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 <mark_russell@instantiations.com> 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message