ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject ProjectHelper (was Re: EasyAnt project)
Date Wed, 29 Oct 2008 16:56:04 GMT
hijacking a thread.

On Wed, 29 Oct 2008, Matt Benson <> wrote:

> I see; however let me ask you this: which is more straightforward,
> creating a custom ProjectHelper or extending Project and/or Target?
> I guess the answer depends on how comfortable you are with the SAX
> APIs.

Who said I was using SAX?  I'm not even using XML.  The main reason to
write it is to show that Ant doesn't need XML at all.

My "build file" is going to look like this (I'm making up half of it):

@Project(Name="example", DefaultTarget="echo")
public class BuildFile extends JavaFrontBuildFile {
    public BuildFile(Project p) {

    public void echo() {
        getProject().log("Hello world");

    public void setProperty() {

    public void moreComplexExample() {
        taskBuilder().newEcho().withMessage("Hello ${world}").execute();

My Target class extends Target and gets a Runnable in its constructor
which is then run in execute() (it completely ignores nested tasks).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message