Loading ...
Sorry, an error occurred while loading the content.

Ant Task: Unable to access descriptor document.

Expand Messages
  • Marvin D. Toll
    I am unable (Eclipse v. 3.0.1) to access a descriptor document from my Ant build script using the junit tag. The packaging is as follows. testUtil src
    Message 1 of 1 , May 1, 2005
    View Source
    • 0 Attachment
      I am unable (Eclipse v. 3.0.1) to access a descriptor document from my Ant
      build script using the "junit" tag. The packaging is as follows.

      testUtil
      src
      com.gtcgroup.testUtil
      testUtil-config.xml


      The Ant classpath includes the following:
      Window > Preferences > Ant > Runtime > Global Entries >
      C:/projects/workspace/testUtil/src/

      The <path /> element in the build script also points to the descriptor
      document (see below).


      [Note: Also tried jarring the descriptor document - Window > Preferences >
      Ant > Runtime > Global Entries >
      ${workspace_loc:/testUtil/testUtil-config.jar}]


      The build script includes the following:

      <project name="testUtil" default="contents" basedir=".">
      <description> This buildfile is used to build the TestUtil AVF.
      </description>

      <property name="dir.build.testing" value="${basedir}/build.testing" />
      <property name="dir.junit" value="${basedir}/junit" />
      <property name="dir.source" value="${basedir}/src" />
      <property name="dir.test" value="${basedir}/testing" />

      <path id="classpath">
      <!-- The following includes support for junit testing. -->
      <pathelement location="${dir.build.src}" />
      <pathelement location="${dir.build.testing}" />
      <pathelement location="${dir.projects.lib}/junit.jar" />
      <pathelement
      location="${dir.source}/com/gtcgroup/testUtil/testUtil-config.xml"/>
      </path>

      <!-- Target -->
      <target name="run.unit.tests" description="Run unit tests.">
      <mkdir dir="${dir.junit}" />
      <junit fork="yes" haltonfailure="no" printsummary="yes"
      showoutput="yes" failureproperty="unittestFailed">
      <jvmarg value="-ea" />
      <formatter type="xml" usefile="true" />
      <classpath refid="classpath" />
      <batchtest todir="${dir.junit}">
      <fileset dir="${dir.build.testing}">
      <include name="**/*Test.class" />
      </fileset>
      </batchtest>
      </junit>
      </target>


      A truncated console listing is as follows:

      Buildfile: C:\projects\workspace\testUtil\build.xml
      run.unit.tests:
      [junit] Running com.gtcgroup.testUtil.DocumentLoaderTest
      [junit] *************************************************
      [junit] * Begin - loading TestUtil descriptor document.
      [junit] *************************************************
      [junit] A [testUtil-config.xml] descriptor document was not found.
      [junit] ***********************************************
      [junit] * End - loading TestUtil descriptor document.
      [junit] ***********************************************



      Note: When the project is jarred and runs within an application the
      descriptor document is accessed properly.


      ---------------------------------------------------------
      | USA Cell: 248.866.4897 (free incoming)
      | Message: 2488664897@...
      | Email: MarvinToll@...
      | Web: http://www.gtcGroup.com
      ---------------------------------------------------------
    Your message has been successfully submitted and would be delivered to recipients shortly.