Author: assaf
Date: Tue Apr  3 17:15:32 2007
New Revision: 525336

URL: http://svn.apache.org/viewvc?view=rev&rev=525336
Log:
Finished JBI distro packaging in Rakefile

Modified:
    incubator/ode/trunk/Rakefile
    incubator/ode/trunk/tasks/jbi.rake

Modified: incubator/ode/trunk/Rakefile
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/Rakefile?view=diff&rev=525336&r1=525335&r2=525336
==============================================================================
--- incubator/ode/trunk/Rakefile (original)
+++ incubator/ode/trunk/Rakefile Tue Apr  3 17:15:32 2007
@@ -84,6 +84,7 @@
   compile.options.source = "1.5"
   compile.options.target = "1.5"
   manifest["Implementation-Vendor"] = "Apache Software Foundation"
+  meta_inf.concat ["DISCLAIMER", "LICENSE", "NOTICE"].map { |f| path_to(f) }
 
   desc "ODE Axis Integration Layer"
   define "axis2" do
@@ -374,25 +375,38 @@
 
   desc "ODE Axis2 Based Distribution"
   define "distro-axis2" do
-    resources(
-      filter(["RELEASE_NOTES", "README", "LICENSE", "NOTICE", 
"DISCLAIMER"].map { |f| path_to("..", f) }).into(path_to(:target_dir, "stage")),
-      filter(path_to(:src_dir, "examples")).into(path_to(:target_dir, "stage"))
-    )
-
-    returning(package(:zip, path_to(:target_dir, 
"apache-ode-#{VERSION_NUMBER}-incubating-war.zip"))) do |zip|
+    package(:zip, path_to(:target_dir, 
"apache-ode-#{VERSION_NUMBER}-incubating-war.zip")).tap do |zip|
+      zip.include meta_inf + ["RELEASE_NOTES", "README"].map { |f| 
parent.path_to(f) }
+      zip.path("examples").include FileList[path_to(:src_dir, "examples", 
"**")]
       zip.include path_to(:target_dir, "stage/*")
+      zip.merge project("ode:tools-bin").package(:zip)
       zip.path("lib").include artifacts(COMMONS.logging, COMMONS.codec, 
COMMONS.httpclient,
         COMMONS.pool, COMMONS.collections, JAXEN,
         SAXON, LOG4J, WSDL4J)
+      projects("ode:utils", "ode:tools", "ode:bpel-compiler",
+               "ode:bpel-api", "ode:bpel-obj", "ode:bpel-schemas").
+        map(&:packages).flatten.each do |pkg|
+        zip.include(pkg.to_s, :as=>"#{pkg.id}.#{pkg.type}", :path=>"lib")
+      end
       zip.include project("ode:axis2-war").package(:war), :as=>"ode.war"
+    end
+  end
+
+  desc "ODE JBI Based Distribution"
+  define "distro-jbi" do
+    package(:zip).tap do |zip|
+      zip.include meta_inf + ["RELEASE_NOTES", "README"].map { |f| 
parent.path_to(f) }
+      zip.path("examples").include FileList[path_to(:src_dir, "examples", 
"**")]
       zip.merge project("ode:tools-bin").package(:zip)
+      zip.path("lib").include artifacts(COMMONS.logging, COMMONS.codec, 
COMMONS.httpclient,
+        COMMONS.pool, COMMONS.collections, JAXEN,
+        SAXON, LOG4J, WSDL4J)
       projects("ode:utils", "ode:tools", "ode:bpel-compiler",
                "ode:bpel-api", "ode:bpel-obj", "ode:bpel-schemas").
-      #[ "ode:utils", "ode:tools", "ode:bpel-compiler",
-      #  "ode:bpel-api", "ode:bpel-obj", "ode:bpel-schemas" ].
         map(&:packages).flatten.each do |pkg|
         zip.include(pkg.to_s, :as=>"#{pkg.id}.#{pkg.type}", :path=>"lib")
       end
+      zip.path("jbi-component").include project("ode:jbi").package(:zip)
     end
   end
 
@@ -517,36 +531,3 @@
 # Lazy ass aliasing
 task("jetty:bounce" => ["ode:axis2-war:jetty:bounce"])
 task("jetty:shutdown" => ["ode:axis2-war:jetty:shutdown"])
-
-
-
-def jbi_descriptor(args)
-  delegation = lambda { |key| "#{key || :parent}-first" }
-  xml = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2)
-  xml.instruct!
-  xml.jbi :xmlns=>"http://java.sun.com/xml/ns/jbi";, :version=>"1.0" do
-    xml.component :type=>args[:type].to_s.sub("_", "-"),
-      
"component-class-loader-delegation"=>delegation[args[:component][:delegation]],
-      
"bootstrap-class-loader-delegation"=>delegation[args[:bootstrap][:delegation]] 
do
-      xml.identification do
-        xml.name args[:name]
-        xml.description args[:description]
-      end
-      xml.tag! "component-class-name", args[:component][:class]
-      xml.tag! "component-class-path" do
-        args[:component][:path].each { |path| xml.tag! "path-element", path }
-      end
-      xml.tag! "bootstrap-class-name", args[:bootstrap][:class]
-      xml.tag! "bootstrap-class-path" do
-        args[:bootstrap][:path].each { |path| xml.tag! "path-element", path }
-      end
-    end
-  end
-end
-
-
-
-
-
-
-

Modified: incubator/ode/trunk/tasks/jbi.rake
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/tasks/jbi.rake?view=diff&rev=525336&r1=525335&r2=525336
==============================================================================
--- incubator/ode/trunk/tasks/jbi.rake (original)
+++ incubator/ode/trunk/tasks/jbi.rake Tue Apr  3 17:15:32 2007
@@ -53,7 +53,10 @@
     def create(zip)
       zip.mkdir "META-INF"
       zip.file.open("META-INF/jbi.xml", "w") { |output| output.write 
descriptor }
-      path("lib").include component.libs.flatten, bootstrap.libs.flatten
+      (component.libs + bootstrap.libs).flatten.uniq.tap do |libs|
+        libs.each { |lib| lib.invoke if lib.respond_to?(:invoke) }
+        path("lib").include *libs
+      end
       super zip
     end
 


Reply via email to