buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1470763 - /buildr/trunk/lib/buildr/ide/idea.rb
Date Tue, 23 Apr 2013 00:44:42 GMT
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$"



Mime
View raw message