• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ANT+ JUnit issues

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I'm trying to run some junit tests with Ant. My relative classpaths/test method in my build.xml looks like this:

<path id="classpath.test">
<path refid="classpath.lib"/>
<pathelement location="tests"/>
</path>

<target name="test" depends="test_compile,compile" description="run junit test">
<junit printsummary="true">
<classpath refid="classpath.test" />
<formatter type="brief" usefile="false" />
<test name="chart.ChartGeneratorServletTest" />
</junit>
</target>

Both source files (ChartGeneratorServlet and its Test) are compiled to the tests directory. When I run ant -debug, I see that ant recognizes BOTH of these files in the classpath. However, when I try to run the test target, I get a ClassDefNotFoundError for chart.ChartGeneratorServlet... even though I give the junit target the relative classpath.

Anyone see the issue here?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic