Menu

minor changes to build.xml

2001-10-27
2001-10-29
  • Eric Friedman

    Eric Friedman - 2001-10-27

    I just checked in a few minor changes to grok/build.xml.

    I added a <path> declaration to the init task
    so that all of the jar dependencies are available
    in a classpath, which is then referenced by javac.
    This enables you to perform builds using ant
    directly, which means that you can do things like
    change the compiler to jikes, or run with -emacs
    output enabled, or run with the -find option so that compiles work from anywhere in the sourcetree.

    I also added description attributes to the tasks
    that were commented in the usage task.  Ant
    provides a "-projecthelp" option which dumps
    these to STDOUT along with other information.
    -projecthelp is basically Ant's builtin equivalentof the usage task.  I didn't delete the usage task
    however, as others might have a need for it.
    projecthelp produces this output:

    Buildfile: /home/eric/src/grok/grok/build.xml
    Default target:

    package   generates the grok.jar file (default)

    Main targets:

    clean     cleans up the directory
    compile   compiles the source code
    homepage  generates the API documentation
    package   generates the grok.jar file (default)

    Subtargets:

    cleandocs
    init
    javadoc
    prepare
    prepare-src
    release
    usage

    BUILD SUCCESSFUL

     
    • Eric Friedman

      Eric Friedman - 2001-10-27

      In case anyone is interested, I run ant like this:

      ant -find build.xml -Dbuild.compiler=jikes -emacs

      which makes it use jikes for compilation, lets
      it search up the directory tree for build.xml,
      and makes it emit messages that can be used
      by emacs to navigate in the source tree.

       
      • Jason Baldridge

        Jason Baldridge - 2001-10-29

        Cool -- I like it!

        Do you have an emacs binding that allows you to compile from within emacs with that call to ant?  I'm an avid user of emacs, but I've always counted on Gann to set up all the whiz bang stuff.

         
        • Eric Friedman

          Eric Friedman - 2001-10-29

          I've been a contributor to the JDE (java development environment for emacs) since it first appeared, so I use that. <smile>

          JDE recently adopted a contribution called jde-ant which is pretty slick.  It includes the ability to get tab completion on build targets in your build.xml file, which is very handy.

          I know that someone is working on an enhancement that will let the JDE keep ant "hot" so that you don't need to launch a VM for every build.  That'll be nice....

          jde is at http://jde.sunsite.dk/

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.