Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 67 lines (52 sloc) 2.786 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

require "buildr4osgi"

require "repositories.rb"
require "dependencies.rb"

require "json"

=begin
# In IRB, paste this script to change the versions of the resolved dependencies for the com.intalio.cloud.orbit dep's,
# as Maven versions differ from bundle versions.
require 'YAML'
yaml = YAML.load(File.read("dependencies.yml"))
yaml.each do |project| project[1]["dependencies"].collect! {|dep| if dep.match(/^com\.intalio\.cloud\.orbit:/)
arr = dep.split(":")
arr.pop
arr << "1.0.0.012"
arr.join(":")
else
dep
end
}
end
File.open("dependencies.yml", "w") do |f| f.write YAML.dump(yaml) end
=end

ENV['OSGi'] = [ENV['ORBIT_SOURCES'], ENV['ORBIT_BINARIES'], ENV['OSGi']].compact.join ';'

# Match to the right group by using a search on the fs.
OSGi::GroupMatcher.instance.group_matchers << Proc.new {|id|
  if !(!ENV['ORBIT_SOURCES'].nil? && Dir[File.join(ENV['ORBIT_SOURCES'], "**", "*#{id}*")].empty?)
    "com.intalio.cloud.orbit"
  elsif !(!ENV['ORBIT_BINARIES'].nil? && Dir[File.join(ENV['ORBIT_BINARIES'], "**", "*#{id}*")].empty?)
    "com.intalio.cloud.orbit-prefetched"
  end
}

# Keep this structure to allow the build system to update version numbers.
VERSION_NUMBER = "1.0.0.085"

desc "Process Designer"
define "designer" do
  project.version = VERSION_NUMBER
  project.group = "com.intalio.bpms.web"
  
  compile.with WAR_LIBS, "junit:junit:jar:4.7"
  compile.options.source = "1.5"
  compile.options.target = "1.5"
  
  webContent = "WebContent/"

  package(:bundle).include(_("src/main/webapp"), :as => webContent).exclude('WEB-INF/tomcat_web.xml')
  package(:war).include(_("src/main/webapp"), :as => '.').exclude('WEB-INF/tomcat_web.xml')
  package(:war, :classifier => "jboss").include(_("src/main/webapp"), :as => '.').exclude('WEB-INF/tomcat_web.xml')

  package(:war).libs = WAR_LIBS
  package(:war, :classifier => "jboss").libs = WAR_LIBS_JBOSS
  
  package(:war, :classifier => "jboss").include(_('src/main/webapp/WEB-INF/tomcat_web.xml'), :as=>'WEB-INF/web.xml')

  read_m = ::Buildr::Packaging::Java::Manifest.parse(File.read(_("META-INF/MANIFEST.MF"))).main
  read_m["Jetty-WarFolderPath"] = webContent
  read_m["Bundle-Version"] = project.version
  package(:bundle).with :manifest => read_m
  
  package(:sources)
end
Something went wrong with that request. Please try again.