From user-return-59701-apmail-ant-user-archive=ant.apache.org@ant.apache.org Fri Feb 09 09:34:32 2007 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 63767 invoked from network); 9 Feb 2007 09:34:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 09:34:31 -0000 Received: (qmail 34312 invoked by uid 500); 9 Feb 2007 09:34:34 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 34270 invoked by uid 500); 9 Feb 2007 09:34:34 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 34257 invoked by uid 99); 9 Feb 2007 09:34:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 01:34:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of peter.kitt.reilly@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 01:34:24 -0800 Received: by ug-out-1314.google.com with SMTP id m3so737743ugc for ; Fri, 09 Feb 2007 01:34:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=O698r7n7hwrqz+uKJ9zm5djzZU86ulSLG/iE6oBYMQ2rJd7xzEC4tTDDCren+Rmta/yWhdavr+2Aq0MSBDpM3e//aiQp/m/UWRg3jcrrocEAja3pwfjO6ay0oEY4iShA5fXOcH3hsDbS7s+jFPHsLGwh00n7Fbh2pdpVEfQyknQ= Received: by 10.82.160.2 with SMTP id i2mr3426426bue.1171013642494; Fri, 09 Feb 2007 01:34:02 -0800 (PST) Received: by 10.82.152.11 with HTTP; Fri, 9 Feb 2007 01:34:02 -0800 (PST) Message-ID: Date: Fri, 9 Feb 2007 09:34:02 +0000 From: "Peter Reilly" To: "Ant Users List" Subject: Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib In-Reply-To: <20070209044330.86FC510FB002@herse.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070207025149.CCC9A10FB004@herse.apache.org> <20070207162721.92D0810FB003@herse.apache.org> <20070209044330.86FC510FB002@herse.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org I have tested with JDK 1.3 and it works: ~/learning/a/junit> ant -debug Apache Ant version 1.7.0 compiled on December 13 2006 Buildfile: build.xml Adding reference: ant.PropertyHelper Detected Java version: 1.3 in: /usr/java/jdk1.3.1_18/jre Detected OS: Linux Adding reference: ant.ComponentHelper Setting ro project property: ant.file -> /home/reilly/learning/a/junit/build.xml Adding reference: ant.projectHelper Adding reference: ant.parsing.context Adding reference: ant.targets parsing buildfile /home/reilly/learning/a/junit/build.xml with URI = file:///home/reilly/learning/a/junit/build.xml Project base dir set to: /home/reilly/learning/a/junit +Target: +Target: -check.junit.exists +Target: -check.junit +Target: build.something Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor Adding reference: ant.executor Build sequence for target(s) `build.something' is [-check.junit.exists, -check.junit, build.something] Complete build sequence is [-check.junit.exists, -check.junit, build.something, ] -check.junit.exists: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. Setting project property: junit.exists -> true -check.junit: Skipped because property 'junit.exists' set. build.something: BUILD SUCCESSFUL Total time: 0 seconds Are you running on windows? If so there may be the usual problems with spaces and perhaps the location of user.home. Peter On 2/9/07, Jacob Kjome wrote: > > Hi Peter, > > Can you take another look at this? I apologize that I did not point > it out in the original email, but the problem is specifically with > older JVM's such as JDK1.3.1. I happened to be using it for building > the project where I found the problem. I just didn't realize it was > specific to JDK1.3.1 until I tried with JDK1.6. I only tried JDK1.6 > after you failed to reproduce the behavior and I saw you were using JDK1.5. > > I think this got lost in the shuffle of the current religious debate > over whether XML is a scripting language. How about we fix this > issue first and then move on to that never-ending debate. BTW, > everyone realizes that the Gant project exists, right? > > http://groovy.codehaus.org/Gant > > > Jake > > At 10:27 AM 2/7/2007, you wrote: > > > >Hi Peter, > > > >I narrowed it down. Indeed, your findings are correct.... for JDK > >1.5 (or JDK 1.6 on my machine). Try it under JDK 1.3.1. That's when > >it fails to find Junit.jar unless junit.jar is under > >${ant.home}/lib. Not sure about JDK 1.4.x since I don't care to install it. > > > >Jake > > > >At 02:57 AM 2/7/2007, you wrote: > > >Just tested with ant 1.7.0 and this does not happen > > >for me - the available does find junit in ~/.ant/lib > > > > > >build.xml: > > > > > > > > > > > property="junit.exists" value="true"/> > > > > > > > > > > > unless="junit.exists"> > > > 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. > > > > > > > > > > > > > > > > > > > > > > > >~/learning/a/junit> ls -l ~/.ant/lib > > >total 128 > > >-rw-r--r-- 1 reilly ccgrp01 120640 Feb 7 2007 junit-3.8.2.jar > > >~/learning/a/junit> ant -debug > > >Apache Ant version 1.7.0 compiled on December 13 2006 > > >Buildfile: build.xml > > >Adding reference: ant.PropertyHelper > > >Detected Java version: 1.5 in: /usr/java/jdk1.5.0_09/jre > > >Detected OS: Linux > > >Adding reference: ant.ComponentHelper > > >Setting ro project property: ant.file -> > > >/home/reilly/learning/a/junit/build.xml > > >Adding reference: ant.projectHelper > > >Adding reference: ant.parsing.context > > >Adding reference: ant.targets > > >parsing buildfile /home/reilly/learning/a/junit/build.xml with URI = > > >file:/home/reilly/learning/a/junit/build.xml > > >Project base dir set to: /home/reilly/learning/a/junit > > > +Target: > > > +Target: -check.junit.exists > > > +Target: -check.junit > > > +Target: build.something > > >Attempting to create object of type > >org.apache.tools.ant.helper.DefaultExecutor > > >Adding reference: ant.executor > > >Build sequence for target(s) `build.something' is > > >[-check.junit.exists, -check.junit, build.something] > > >Complete build sequence is [-check.junit.exists, -check.junit, > > >build.something, ] > > > > > >-check.junit.exists: > > >[antlib:org.apache.tools.ant] Could not load definitions from resource > > >org/apache/tools/ant/antlib.xml. It could not be found. > > >Setting project property: junit.exists -> true > > > > > >-check.junit: > > >Skipped because property 'junit.exists' set. > > > > > >build.something: > > > > > >BUILD SUCCESSFUL > > >Total time: 0 seconds > > >~/learning/a/junit> rm ~/.ant/lib/junit-3.8.2.jar > > >~/learning/a/junit> ant > > >Buildfile: build.xml > > > > > >-check.junit.exists: > > > > > >-check.junit: > > > [echo] JUnit is not currently available to the build environment. > > > [echo] Because of this, all targets that require JUnit will > > >be skipped. To > > > [echo] enable these targets, place a copy of JUnit (get > > >latest version at > > > [echo] http://www.junit.org/) in ANT_HOME/lib. > > > > > >build.something: > > > > > >BUILD SUCCESSFUL > > >Total time: 0 seconds > > >~/learning/a/junit> > > > > > >Peter > > > > > > > > > > > >On 2/7/07, Jacob Kjome wrote: > > >> > > >> 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 > > >> 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... > > >> > > >> > > >> > >> property="junit.exists" value="true"/> > > >> > > >> > > >> > >> unless="junit.exists"> > > >> 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. > > >> > > >> > > >> > > >> if="junit.exists"> > > >> ...... > > >> > > >> > > >> > > >> With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always > > >> get the message. If I move junit.jar to ${ant.home}/lib, I > > >> don't get the 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 > > >> > > >> > > > > > >--------------------------------------------------------------------- > > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > >For additional commands, e-mail: user-help@ant.apache.org > > > > > > > > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > >For additional commands, e-mail: user-help@ant.apache.org > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org