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 34A9010212 for ; Tue, 23 Apr 2013 00:45:04 +0000 (UTC) Received: (qmail 37906 invoked by uid 500); 23 Apr 2013 00:45:03 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 37880 invoked by uid 500); 23 Apr 2013 00:45:03 -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 37870 invoked by uid 99); 23 Apr 2013 00:45:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 00:45:03 +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; Tue, 23 Apr 2013 00:45:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9DCFB2388A36; Tue, 23 Apr 2013 00:44:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1470763 - /buildr/trunk/lib/buildr/ide/idea.rb Date: Tue, 23 Apr 2013 00:44:42 -0000 To: commits@buildr.apache.org From: donaldp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130423004442.9DCFB2388A36@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: donaldp Date: Tue Apr 23 00:44:42 2013 New Revision: 1470763 URL: http://svn.apache.org/r1470763 Log: Fix the generation of the IntelliJ IDEA GWT facet when a user explicitly passes in the gwt_dev artifacts/sdk Modified: buildr/trunk/lib/buildr/ide/idea.rb Modified: buildr/trunk/lib/buildr/ide/idea.rb URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/ide/idea.rb?rev=1470763&r1=1470762&r2=1470763&view=diff ============================================================================== --- buildr/trunk/lib/buildr/ide/idea.rb (original) +++ buildr/trunk/lib/buildr/ide/idea.rb Tue Apr 23 00:44:42 2013 @@ -253,7 +253,12 @@ module Buildr #:nodoc: def add_gwt_facet(modules = {}, options = {}) name = options[:name] || "GWT" - detected_gwt_version = options[:gwt_dev_artifact] ? artifact(options[:gwt_dev_artifact]) : nil + detected_gwt_version = nil + if options[:gwt_dev_artifact] + a = Buildr.artifact(options[:gwt_dev_artifact]) + a.invoke + detected_gwt_version = a.to_s + end settings = { @@ -265,13 +270,13 @@ module Buildr #:nodoc: buildr_project.compile.dependencies.each do |d| if d.to_s =~ /\/com\/google\/gwt\/gwt-dev\/(.*)\// - detected_gwt_version = resolve_path(d.to_s) + detected_gwt_version = d.to_s break end end unless detected_gwt_version if detected_gwt_version - settings[:gwtSdkUrl] = detected_gwt_version + settings[:gwtSdkUrl] = resolve_path(File.dirname(detected_gwt_version)) settings[:gwtSdkType] = "maven" else settings[:gwtSdkUrl] = "file://$GWT_TOOLS$"