David E. Wheeler wrote:
> On Jan 27, 2009, at 3:57 PM, Michael G Schwern wrote:
> 
>> A while ago, Audrey suggested inverting the process.  Rather than
>> having a
>> program that spits out meta-data, have meta-data which might contain
>> programs.
> 
> You mean like Ant? Not sure about that…

Yes.  Ant is a good idea if it weren't for the painfully cramped, wordy and
inconvenient syntax.

To give you an idea, I once translated the Ant example into YAML.  Look at the
original here to refresh your memory:
http://ant.apache.org/manual/using.html#example

And now in YAML:

name:           MyProject
default:        dist
basedir:        .
description:    simple example build file

# set global properties for this build
properties:
    src:   { location: src/    }
    build: { location: build/  }
    dist:  { location: dist/   }

targets:
    init:
        actions:
            - tstamp
            - mkdir: { dir: '${build}' }

    compile:
        depends:    init
        description: compile the source
        actions:
            # Compile the java code from ${src} into ${build}
            - javac: { srcdir: "${src}", destdir: "${build}" }

    dist:
        depends:        compile
        description:    generate the distribution
        actions:
            # Create the distribution directory
            - mkdir:  { dir: '${dist}/lib/' }

            # Put everything in ${build} into MyProject-${DSTAMP}.jar
            - jar:
                jarfile: '${dist}/lib/MyProject-${DSTAMP}.jar'
                basedir: '${build}'

    clean:
        description:    clean up
        actions:
            # Delete the ${build} and ${dist} directory trees
            delete:
                - { dir: '${build}' }
                - { dir: '${dist}'  }



-- 
101. I am not allowed to mount a bayonet on a crew-served weapon.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to