ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41587] New: - Ant-1.7.0 <available> task, under JDK1.3.1_19, can't find junit.jar in ${user.home}/.ant/lib
Date Sat, 10 Feb 2007 17:35:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41587>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41587

           Summary: Ant-1.7.0 <available> task, under JDK1.3.1_19, can't
                    find junit.jar in ${user.home}/.ant/lib
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: hoju@visi.com


As reported on the Ant user list [1], there seems to be a problem with the
<available> task in Ant-1.7.0 when running under JDK1.3.1_19 (probably any 1.3.1
sub-version) on WinXP.  Using the following build file, Junit is not found on
the classpath when I have junit.jar (either 3.8.1 or 3.8.2) in
${user.home}/.ant/lib.  However, it is found if I move junit.jar to ${ant.home}/lib.

3 notes of interest:

1.  Under JDK1.6 on my machine, junit.jar is found just fine in
${user.home}/.ant/lib.

2.  Ant-1.6.5 has no problem under any JDK.  It works 100% of the time no matter
the JDK and finds junit.jar in either location.

3.  It was suggested on the list that maybe there's a bug in JDK1.3.1 where it
gets URL's wrong when the working directory is on a different drive than
junit.jar.  I tested this theory out by putting my build file on the C:\ drive,
which is where ${user.home}/.ant/lib is.  It made no difference.  Ant-1.7.0
still can't find it under JDK1.3.1_19.

Since Ant-1.6.5 works no matter what, it seems to me that the bug here is
probably in Ant-1.7.0, though it only shows itself under older JDKs.  I haven't
tested JDK1.4.x because I don't have it installed

Here's the build file for testing...

<project name="findjunit" default="build.something">

  <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"/>

</project>


[1] http://marc.theaimsgroup.com/?t=117083869300004&r=1&w=2


Jake

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message