You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/04/26 01:13:56 UTC

svn commit: r1330597 - /buildr/trunk/lib/buildr/ide/idea.rb

Author: donaldp
Date: Wed Apr 25 23:13:55 2012
New Revision: 1330597

URL: http://svn.apache.org/viewvc?rev=1330597&view=rev
Log:
Enhance the exploded war artifact configuration so that it can be EJB enabled

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=1330597&r1=1330596&r2=1330597&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/ide/idea.rb (original)
+++ buildr/trunk/lib/buildr/ide/idea.rb Wed Apr 25 23:13:55 2012
@@ -577,6 +577,13 @@ module Buildr
                     xml.element :id => "jpa-descriptors", :facet => "#{module_name}/jpa/#{facet_name}"
                   end
                 end
+                if options[:enable_ejb]
+                  module_names = options[:ejb_module_names] || [project.iml.id]
+                  module_names.each do |module_name|
+                    facet_name = options[:ejb_facet_name] || "EJB"
+                    xml.element :id => "javaee-facet-resources", :facet => "#{module_name}/ejb/#{facet_name}"
+                  end
+                end
               end
               xml.element :id => "directory", :name => "lib" do
                 libraries.each(&:invoke).map(&:to_s).each do |dependency_path|
@@ -621,7 +628,6 @@ module Buildr
         end
       end
 
-
       protected
 
       def extension