ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BAKER Anthony <ABa...@COVANSYS.com>
Subject ant Classloader problem
Date Thu, 24 May 2001 17:35:02 GMT
Hi,

I believe I am running into a problem with the ant classloader.  When I run
either a <junit> or non-forked <java> task, getResource() always returns
null:

  URL file = Logger.class.getResource("/" + LOG_CONFIG);

If I fork a jvm and the same code (same classpathref) is executed, it works!
Here is the target:

 <target name="junit" depends="compile">
  <!-- this works -->
  <java classname="some.pkg.AllTests" classpathref="classpath" fork="yes" />

  <!-- this doesn't work 
  <java classname="some.pkg.AllTests" classpathref="classpath" /> -->

  <!-- this doesn't work
  <junit>
   <classpath refid="classpath" />
   <formatter type="plain" usefile="no" />
   <test name="some.pkg.SomeTest" />
  </junit> -->
 </target>


Any ideas?  Thanks!

-----
Anthony Baker, abaker@covansys.com
503.748.8197 

Mime
View raw message