Menu

Ant newbie, Question about JameleonAntTasks

Help
Ben
2006-12-07
2013-04-25
  • Ben

    Ben - 2006-12-07

    Hi All,

    Apologies for my newbie-ness in relation to Ant.  I have read a bit about the basics of Ant, and the relationship between projects and targets.

    I am confused by this entry in the build.xml file that ships in the download:
    <taskdef resource="ant/JameleonAntTasks.properties" format="properties" classpathref="classpath"/>

    Does this mean that the ant process creates this file, or that it is expecting this file to already exist?  I noticed that this file does not ship in the download, so I am confused... do I need to know how to populate this file myself?

    Sorry if this seems dense, I would appreciate any pointers on getting my test cases going in Ant.  I set up a simple test case in the scripts directory, and tried to run Ant with the existing build.xml.  I'm pretty sure it didn't run my test cases, and I'm sure it has something to do with me not making some simple config changes.  My current ant console output is:

    C:\jameleon-test-suite>ant
    Buildfile: build.xml

    cleanJavadocs:

    cleanBuild:
       [delete] Deleting directory C:\jameleon-test-suite\Build

    clean:

    init:
        [mkdir] Created dir: C:\jameleon-test-suite\Build

    build:

    register.tags:

    main:

    BUILD SUCCESSFUL
    Total time: 1 second

    Thanks in advance for any input!

    -Ben

     
    • Christian Hargraves

      >Does this mean that the ant process creates this file, or that it is expecting this file to already exist?
      It expects that the file already exists in the CLASSPATH somewhere

      >I noticed that this file does not ship in the download, so I am confused... do I need to know how to populate this file myself?
      This file comes packaged inside the jameleon-core.jar file.

      >I would appreciate any pointers on getting my test cases going in Ant

      Try doing a "build -projecthelp" from the command line. This should list all of the available targets you can call.

      Basically, if you call "ant" or "build", then it calls the "main" target which builds and registers any custom tags you have (it looks like you don't have any).

      To run all tests, try "ant test.all" or "build test.all".

      The build.bat/build.sh file that ships with Jameleon-test-suite is simply a means for me to able to ship Ant with Jameleon.

       
    • Ben

      Ben - 2006-12-07

      Christian,

      Thanks for your reply... I should have checked the contents of the jar file to find the properties file... that was how I changed my logging settings earlier.

      I guess the disconnect I had was that I assumed that the macros (like test.all) were called by default by me just running "ant" alone... thanks for the clarification.  That worked like a charm, and now I am moving on to integrating our JUnit tests into the build script.

      -Ben

       
      • Christian Hargraves

        The build.xml that ships with jameleon-test-suite, includes a junit target. It assumes that all JUnit source files are in the tst/java directory and it places lib/*.jar, Build and res in the CLASSPATH. If you depend on other libraries, I would suggest creating a separate directory like tst/lib and adding the path entry into the test.classpath Path declaration.

         

Log in to post a comment.