Re: Adding a Pre-processing Step to WOProject?

From: Ulrich Köster (ulric..bjectstyle.org)
Date: Sat Apr 12 2003 - 03:43:43 EDT

  • Next message: Anders Peterson: "Re: Release plan"

    Hi Chuck,

    woproject takes a dir classes (.class files) and builds a .jar from
    then. It should be easy to add a target to your buildfile to create and
    compile the classes the way you want. Take a look into the woproject
    build files. The starting point is build.xml. When you call ant in the
    woproject directory this file is executed. The buildfile contains a lot
    of targets.

    If you call 'ant help' on the command line you get this:
    help:
          [echo]
          [echo] ****************************************
          [echo] * TARGETS (also you can use "-projecthelp" ant
    flag):
          [echo] *
          [echo] * 1. help - prints this message.
          [echo] * 2. prepare - creates directories needed for
    distribution.
          [echo] * 3. java - compiles java and webapp
    subprojects.
          [echo] * 4. clean - cleans temporary directories.
          [echo] * 5. doc - creates documentation including
    Javadoc.
          [echo] * 6. dist - creates WOProject distribution.
          [echo] * 7. test - Run JUnit tests.
          [echo] * 8. check - Stores the wo specific
    properties in a file.
          [echo] * 9. version - keeps the wolips version common
          [echo] * 10. .ds_store - delete important files
          [echo] * Build environment:
          [echo] *
          [echo] * java.home =
    /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home
          [echo] * build.compiler = modern
          [echo] * ant.home = /sw/lib/ant
          [echo] * user.home = /Volumes/Uli
          [echo] *
          [echo] ****************************************
          [echo]

    Some targets depends on other targets. With some copy and paste you
    should be able to write a build.xml that fit your needs. Jass comes
    together with an ant task.

    Ulrich

    Am Samstag, 12.04.03 um 01:14 Uhr schrieb Chuck Hill:

    > Hi,
    >
    > In our development we make extensive use of Design By Contract and
    > currently use Jass
    > (http://semantik.informatik.uni-oldenburg.de/~jass/) for
    > the implementation. Simply, this is a set of Java classes that parse
    > the
    > source files in a project looking for specially formatted comments.
    > Such
    > comments are replaces by Java code that implements the contract checks.
    > The changed Java files are written out to another location from which
    > they
    > are compiled.
    >
    > We want to be able to do this with WOProject as well. I think what is
    > needed is to
    > (a) add a step before compilation in which Jass processes the files
    > and
    > (b) change where the compiler looks for the Java files to compile
    >
    > We also need to be able to make this optional as the Jass generated
    > contracts should not be in production code. We have this done in make
    > and
    > jam now so that we can build like 'make all USE_JASS=0' to build
    > without Jass.
    >
    > To make this more fun, I also get to learn ANT as I do this. :-)
    >
    > Does anyone have any hints about where to start looking to tie into
    > this.
    > I've wandered through the WOProject source, but could not make much
    > sense
    > of it. I think I need to know more ANT first. I'm just looking for
    > general areas to look at, not specific tasks.
    >
    >
    > Cheers!
    > Chuck
    >
    >
    > --
    >
    > Chuck Hill chil..lobal-village.net
    > Global Village Consulting Inc.
    > http://www.global-village.net



    This archive was generated by hypermail 2.0.0 : Sat Apr 12 2003 - 03:49:20 EDT