Return-Path: Delivered-To: apmail-incubator-buildr-user-archive@locus.apache.org Received: (qmail 72696 invoked from network); 20 May 2008 03:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 May 2008 03:53:53 -0000 Received: (qmail 27492 invoked by uid 500); 20 May 2008 03:53:54 -0000 Delivered-To: apmail-incubator-buildr-user-archive@incubator.apache.org Received: (qmail 27470 invoked by uid 500); 20 May 2008 03:53:54 -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 27459 invoked by uid 99); 20 May 2008 03:53:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2008 20:53:54 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_MESSAGE,SPF_SOFTFAIL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of arkin@intalio.com does not designate 72.14.220.157 as permitted sender) Received: from [72.14.220.157] (HELO fg-out-1718.google.com) (72.14.220.157) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 03:53:06 +0000 Received: by fg-out-1718.google.com with SMTP id l26so1936794fgb.26 for ; Mon, 19 May 2008 20:53:20 -0700 (PDT) Received: by 10.125.102.19 with SMTP id e19mr6733814mkm.61.1211255600130; Mon, 19 May 2008 20:53:20 -0700 (PDT) Received: by 10.86.100.18 with HTTP; Mon, 19 May 2008 20:53:20 -0700 (PDT) Message-ID: <3de5d7d20805192053u66a221bel3f74acbbba35e3a6@mail.gmail.com> Date: Mon, 19 May 2008 20:53:20 -0700 From: "Assaf Arkin" To: buildr-user@incubator.apache.org Subject: Re: Override JUnit version in 1.3.0 In-Reply-To: <17331993.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8840_21464847.1211255600096" References: <17331761.post@talk.nabble.com> <483231E3.3040607@gmail.com> <17331993.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8840_21464847.1211255600096 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, May 19, 2008 at 7:21 PM, dhpeterson wrote: > > > > I'm using this one: > > http://repo1.maven.org/maven2/junit/junit/4.4/ > > All I want to do is force Buildr to use JUnit 4.4 for testing. I use a > Spring test runner class that depends on it! > > In 1.2.10 I hacked the JUNIT_VERSION directly in buildr/test.rb but I am > sure there is a better way in 1.3.0 - especially since the source seems to > suggest "VERSION" can be overridden. I just don't know how :) Unfortunately not for JUnit, we eagerly set the dependency and load the JAR ahead of the buildfile, so by the time you get to change it, too late. This came up in relation to XML Beans [1], and we got a couple of ideas to play around with. I have not tried it with JUnit, but I believe both mechanisms would work. One would be to delay loading of JUnit and use Artifact namespaces to override the default version, Victor would be able to explain this better. The other would be to use the build.yaml file to specify a different version for JUnit, and have Buildr look there first before using the default. build.yaml might read something like: junit: 4.4 Or, we can pick an artifact by its name, using build.yaml to specify the actual artifact: artifacts: junit: junit:junit:jar:4.4 Assaf [1] http://issues.apache.org/jira/browse/BUILDR-4 > > > Dave > > > > Daniel Spiewak wrote: > > > > JUnit 4.4 isn't in the Maven repositories (that I could find). I > > "solved" the problem by downloading the junit-4.4 JAR, renaming it to > > "junit-4.3.1.jar" and then copying it over the JAR in > > ~/.m2/repository/junit/junit-4.3.1/ :-) > > > > Probably not the best solution, that. > > > > Daniel > > > > dhpeterson wrote: > >> Hi all, > >> > >> How do I override the version of JUnit in buildr 1.3.0. It still uses > >> 4.3.1 > >> but I want to force it to use JUnit 4.4 within my Rakefile. > >> > >> I've tried: > >> > >> Buildr::JUnit::VERSION = 4.4 > >> > >> and a bunch of other things, to no effect. > >> > >> Thanks in advance. > >> > >> Dave > >> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Override-JUnit-version-in-1.3.0-tp17331761p17331993.html > Sent from the Buildr - User mailing list archive at Nabble.com. > > ------=_Part_8840_21464847.1211255600096--