Return-Path: X-Original-To: apmail-buildr-commits-archive@www.apache.org Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76E661029C for ; Wed, 9 Oct 2013 10:55:00 +0000 (UTC) Received: (qmail 55975 invoked by uid 500); 9 Oct 2013 10:54:59 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 55941 invoked by uid 500); 9 Oct 2013 10:54:58 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 55934 invoked by uid 99); 9 Oct 2013 10:54:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2013 10:54:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2013 10:54:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C5A81238896F; Wed, 9 Oct 2013 10:54:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1530560 - /buildr/trunk/lib/buildr/java/rjb.rb Date: Wed, 09 Oct 2013 10:54:35 -0000 To: commits@buildr.apache.org From: donaldp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131009105435.C5A81238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: donaldp Date: Wed Oct 9 10:54:35 2013 New Revision: 1530560 URL: http://svn.apache.org/r1530560 Log: Prepend the JDK bin directory to the path under windows as RJB can have issues if it picks up jvm dependencies from other products installed on the system Modified: buildr/trunk/lib/buildr/java/rjb.rb Modified: buildr/trunk/lib/buildr/java/rjb.rb URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/rjb.rb?rev=1530560&r1=1530559&r2=1530560&view=diff ============================================================================== --- buildr/trunk/lib/buildr/java/rjb.rb (original) +++ buildr/trunk/lib/buildr/java/rjb.rb Wed Oct 9 10:54:35 2013 @@ -112,6 +112,12 @@ module Java classpath.map! { |path| Proc === path ? path.call : path } cp = Buildr.artifacts(classpath).map(&:to_s).each { |path| file(path).invoke } java_opts = (ENV['JAVA_OPTS'] || ENV['JAVA_OPTIONS']).to_s.split + + # Prepend the JDK bin directory to the path under windows as RJB can have issues if it picks + # up jvm dependencies from other products installed on the system + if Buildr::Util.win_os? + ENV["PATH"] = "#{ENV['JAVA_HOME']}#{File::SEPARATOR}bin#{File::PATH_SEPARATOR}#{ENV["PATH"]}" + end ::Rjb.load cp.join(File::PATH_SEPARATOR), java_opts props = ::Rjb.import('java.lang.System').getProperties