Java Mailing List Archive

http://www.ant-tasks.com/

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>

  <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@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.