Java Mailing List Archive

Apache Ant Archive

» Ant Users List
» Ant Developers List
Ant 1.7.0 can 't find Junit in ${user.home}/.ant/lib

Ant 1.7.0 can 't find Junit in ${user.home}/.ant/lib

2007-02-06       - By Jacob Kjome
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Maybe this is a known issue, but it appears that Junit.jar must be in
${ant.home}/lib in order to be discovered, at least by the
<available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just
fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...

  <target name="-check.junit.exists">
    <available classname="junit.framework.TestCase"
               property="junit.exists" value="true"/>

  <target name="-check.junit" depends="-check.junit.exists"
    <echo>JUnit is not currently available to the build environment.
Because of this, all targets that require JUnit will be skipped. To
enable these targets, place a copy of JUnit (get latest version at in ANT_HOME/lib.</echo>

  <target name="build.something" depends="-check.junit" if="junit.exists">

With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always
get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I
don't get the <echo> message.  Ant-1.6.5 doesn't care where I put
it.  It finds junit.jar in either location.

Is this a known issue?  Has it already been fixed for Ant-1.7.1?


To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.