Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6902401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:47:36+00:00 2026-05-27T07:47:36+00:00

I have a gwt project, and i want to do the unit test in

  • 0

I have a gwt project, and i want to do the unit test in my project, so i add a target of junit in the ant build file. But the build always fails,

BUILD FAILED C:\SG\workspace\app\build.xml:78: The for must include junit.jar if not in Ant’s own classpath

here is the scripts

<target name="test" depends="clean.test,gwtc" description="run all Junit tests">
    <mkdir dir ="test/test"/>
    **<junit fork = "false" printsummary = "yes"/>** <!-- the line 78-->
    <classpath refid = "project.class.path"/>
    <batchtest todir = "test/test">
        <fileset dir = "test" includes="**/${test}Test.java"/>
    </batchtest>
    <formatter type = "xml"/>
    <junitreport toDir = "test/test">
        <fileset dir = "test/test"/>
        <report format="frames" todir="test"/>
    </junitreport>
    <exec os="window" executable="cmd.exe">
        <arg line="-a /Applications/Safari.app test/index.html"/>
    </exec>
 </target>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:47:37+00:00Added an answer on May 27, 2026 at 7:47 am

    You closed the <junit /> tag too early.

    This is correct. classpath, batchtest and formatter have to be inside the junit Tag:

    <junit fork = "false" printsummary = "yes">
        <classpath refid = "project.class.path"/>
        <batchtest todir = "test/test">
            <fileset dir = "test" includes="**/${test}Test.java"/>
        </batchtest>
        <formatter type = "xml"/>
    </junit>
    

    And you have to make sure that junit.jar is either in ANT_HOME/lib, referenced in project.class.path or added as another classpath like <classpath refid = "junit.class.path"/>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my project.gwt.xml file I have <script src=http://maps.google.com/maps?gwt=1&amp;file=api&amp;v=2&amp;sensor=false;key=MYKEY /> But, when I load my
I have my GWT project set up with hg for version control, and want
I have helloJava.HTML in my GWT project , within that html file , i
I have imported a GWT project from GIT , but when i run maven
I have gwt-project that is comunication to database. Application design mvp pattern and view
I have a gwt project that uses gwt-mosaic. Here is the error message I
I have a GWT project in which I need to manually specify currency, number
I have a Smart GWT Project where the data that is to be displayed
I have a basic GWT Maven project going. I added SmartGWT and started playing
I'm playing with a GWT/GAE project which will have three different pages, although it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.