ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject JavFront ProjectHelper
Date Thu, 30 Oct 2008 11:56:05 GMT
On Wed, 29 Oct 2008, Matt Benson <> wrote:

--- Stefan Bodewig <> wrote:

>> My "build file" is going to look like this (I'm
>> making up half of it):
> This looks like it's friends with my concept of an Ant
> DSL except mine is pretty much just a de-XMLization of
> the status quo, no OO stuff as you show above.

I'm not doing OO stuff, the build file is a Java source.

I've committed an embryonic version to the sandbox[1] which right now
doesn't have the convenience base class I envision and doesn't have
the TaskBuilder (or probably better TagBuilder) library to create
tasks, yet.

But a few things it can do:

$ cat src/etc/examples/
package org.example;

import org.apache.ant.javafront.annotations.AntProject;
import org.apache.ant.javafront.annotations.AntTarget;


public class Simple2 {
    private final Project p;

    public Simple2(Project p) {
        this.p = p;

    @AntTarget(Name="hello", Description="says hello", Depends="nonsense")
    public void foo() {
        p.log("Hello, world!");
        p.log("This is " + p.getProperty("ant.version") + " calling.");

    @AntTarget public void nonsense() {}
$ ant -lib build/lib/ant-javafront-0.1.jar -f src/etc/examples/ -projecthelp
Buildfile: src\etc\examples\
     [null] Compiling 1 source file to c:\DOKUME~1\STEFAN~1.BOD\LOKALE~1\Temp\ja
Main targets:

 hello  says hello

$ ant -lib build/lib/ant-javafront-0.1.jar -f src/etc/examples/ hello
Buildfile: src\etc\examples\


Hello, world!
This is Apache Ant version 1.7.1 compiled on June 27 2008 calling.

Total time: 0 seconds


who feels like he is exposing a toy project too early.


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

View raw message