From buildr-user-return-292-apmail-incubator-buildr-user-archive=incubator.apache.org@incubator.apache.org Mon Apr 07 19:39:35 2008 Return-Path: Delivered-To: apmail-incubator-buildr-user-archive@locus.apache.org Received: (qmail 56794 invoked from network); 7 Apr 2008 19:39:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Apr 2008 19:39:35 -0000 Received: (qmail 75347 invoked by uid 500); 7 Apr 2008 19:39:36 -0000 Delivered-To: apmail-incubator-buildr-user-archive@incubator.apache.org Received: (qmail 75330 invoked by uid 500); 7 Apr 2008 19:39:36 -0000 Mailing-List: contact buildr-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: buildr-user@incubator.apache.org Delivered-To: mailing list buildr-user@incubator.apache.org Received: (qmail 75321 invoked by uid 99); 7 Apr 2008 19:39:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 12:39:36 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vic.borja@gmail.com designates 209.85.146.180 as permitted sender) Received: from [209.85.146.180] (HELO wa-out-1112.google.com) (209.85.146.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 19:38:53 +0000 Received: by wa-out-1112.google.com with SMTP id n4so1387558wag.6 for ; Mon, 07 Apr 2008 12:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type; bh=R/cmK43DkjfU/dlxn0QsUuDat+jxYYFy6bi7zvUFyw0=; b=UAZOBAznhHn66Curl/xkPHIsGbsCOZs4uZraJKCQSrPd8oUQCHZmBaGY2i+XVi4QioMk44X6HLhDtqNCC8gkQsg3lD64osCOM1fzmIGxeVZEguoMB+eAHOwkQHY67sT6BehHdxD55KjsvQneIwC/oSk7WMU9ynBVJ4k3JCpyIhU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type; b=pQOTR9Vceve6urrMd/CkpzCtW8bWfVwF4TP039iieXDWRHJhom0w/nX2h3N8ttCW54h8onNwAsnJsuUoEywwZO4NabJEKgM2wG08NbXuP1MDMJYx0tyO/izcJRSkKq0UxhNnogS7Jty1lGjzMDsYBP7jlvXWupFwsqECFG4Wc4o= Received: by 10.114.26.18 with SMTP id 18mr342597waz.211.1207597145756; Mon, 07 Apr 2008 12:39:05 -0700 (PDT) Received: from ?192.168.1.78? ( [189.143.26.26]) by mx.google.com with ESMTPS id m6sm15681154wag.11.2008.04.07.12.39.04 (version=SSLv3 cipher=RC4-MD5); Mon, 07 Apr 2008 12:39:05 -0700 (PDT) Message-ID: <47FA7856.1090205@gmail.com> Date: Mon, 07 Apr 2008 14:39:02 -0500 From: Victor Hugo Borja User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: buildr-user@incubator.apache.org Subject: Re: running JUnit tests fails with buildr trunk and JRuby References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: multipart/mixed; boundary="------------040601050702070303060001" X-Virus-Checked: Checked by ClamAV on apache.org --------------040601050702070303060001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Tomas Carlsson wrote: > buildr-trunk, JRuby 1.1, Windows XP > > I set up a very simple test project with one java class and one test java > class with Junit annotations. Running "jruby -S buildr test" fails with: > java.lang.IllegalArgumentException: null > > Parts of --trace is included below, it indicates a null ref when looking up > the ant.jar location if I'm not mistaken. > > Anyone seen this before? Anyone been able to run JUnit tests with buildr on > JRuby? > > /tomas > > ** Invoke buildr-test-test:test:setup (first_time) > ** Execute buildr-test-test:test:setup > ** Execute buildr-test-test:test > Running tests in buildr-test-test > redefining Project > D, [2008-04-07T17:43:57.413434 #3380] DEBUG -- : Apache Ant version 1.7.0 > compiled on December 13 2006 > ** Invoke buildr-test-test:test:teardown (first_time) > ** Execute buildr-test-test:test:teardown > rake aborted! > java.lang.IllegalArgumentException: null > java/net/URI.java:842:in `create' > sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0' > sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke' > sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke' > java/lang/reflect/Method.java:597:in `invoke' > org/apache/tools/ant/launch/Locator.java:162:in `fromURI' > org/apache/tools/ant/launch/Locator.java:119:in `getResourceSource' > org/apache/tools/ant/launch/Locator.java:90:in `getClassSource' > org/apache/tools/ant/Project.java:313:in `setAntLib' > org/apache/tools/ant/Project.java:309:in `initProperties' > org/apache/tools/ant/Project.java:295:in `init' > sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0' > sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke' > sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke' > java/lang/reflect/Method.java:597:in `invoke' > org/jruby/javasupport/JavaMethod.java:251:in `invokeWithExceptionHandling' > That seems to be a classpath issue on windows (never seen this on my linux env). I tested with a simple ant invocation: task :echo do ant('echo') do |ant| ant.echo :message => "Hello World" end end got the same error you have, however if ant jars are in the CLASSPATH environment variable when invoking jruby everyting works ok. So I think this is related to how the classpath is updated by buildr/java/jruby.rb, I'll try to check this as soon as I can. Greetings! -- vic --------------040601050702070303060001--