ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib
Date Wed, 07 Feb 2007 02:51:14 GMT

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>

   <target name="-check.junit" depends="-check.junit.exists" 
unless="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 
http://www.junit.org/) in ANT_HOME/lib.</echo>
   </target>


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


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?


Jake


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message