mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- Packaging as a jar seems to be working now.
This commit is contained in:
parent
c9ff4f5a39
commit
69527591e0
1 changed files with 19 additions and 21 deletions
40
Rakefile
40
Rakefile
|
@ -18,23 +18,22 @@ task :compile => "lib/logstash/config/grammar.rb" do |t|
|
||||||
#
|
#
|
||||||
# org/jruby/util/JavaNameMangler.java:105:in `mangleFilenameForClasspath'
|
# org/jruby/util/JavaNameMangler.java:105:in `mangleFilenameForClasspath'
|
||||||
# org/jruby/util/JavaNameMangler.java:32:in `mangleFilenameForClasspath'
|
# org/jruby/util/JavaNameMangler.java:32:in `mangleFilenameForClasspath'
|
||||||
require 'jruby/jrubyc'
|
#require 'jruby/jrubyc'
|
||||||
#args = [ "-p", "net.logstash" ]
|
##args = [ "-p", "net.logstash" ]
|
||||||
args = ["-d", "build"]
|
#args = ["-d", "build"]
|
||||||
args += Dir.glob("**/*.rb")
|
#args += Dir.glob("**/*.rb")
|
||||||
status = JRuby::Compiler::compile_argv(args)
|
#status = JRuby::Compiler::compile_argv(args)
|
||||||
if (status != 0)
|
#if (status != 0)
|
||||||
puts "Compilation FAILED: #{status} error(s) encountered"
|
#puts "Compilation FAILED: #{status} error(s) encountered"
|
||||||
exit status
|
#exit status
|
||||||
end
|
|
||||||
|
|
||||||
#mkdir_p "build"
|
|
||||||
#sh "rm -rf lib/net"
|
|
||||||
#Dir.chdir("lib") do
|
|
||||||
#args = Dir.glob("**/*.rb")
|
|
||||||
##sh "jrubyc", "-d", "../build" *args
|
|
||||||
#sh "jrubyc", *args
|
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
mkdir_p "build"
|
||||||
|
sh "rm -rf lib/net"
|
||||||
|
Dir.chdir("lib") do
|
||||||
|
args = Dir.glob("**/*.rb")
|
||||||
|
sh "jrubyc", "-t", "../build", *args
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
VERSIONS = {
|
VERSIONS = {
|
||||||
|
@ -45,7 +44,7 @@ VERSIONS = {
|
||||||
|
|
||||||
namespace :vendor do
|
namespace :vendor do
|
||||||
file "vendor/jar" do |t|
|
file "vendor/jar" do |t|
|
||||||
mkdir_p mkdir(t.name)
|
mkdir_p t.name
|
||||||
end
|
end
|
||||||
|
|
||||||
# Download jruby.jar
|
# Download jruby.jar
|
||||||
|
@ -119,10 +118,9 @@ namespace :package do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# We compile stuff to lib/net/logstash/...
|
# We compile stuff to build/...
|
||||||
Dir.glob("lib/**/*.class").each do |file|
|
Dir.glob("build/**/*.class").each do |file|
|
||||||
target = File.join("build-jar", file.gsub("lib/", ""))
|
target = File.join("build-jar", file.gsub("build/", ""))
|
||||||
#target = File.join("build-jar", file)
|
|
||||||
mkdir_p File.dirname(target)
|
mkdir_p File.dirname(target)
|
||||||
puts "=> Copying #{file} => #{target}"
|
puts "=> Copying #{file} => #{target}"
|
||||||
File.copy(file, target)
|
File.copy(file, target)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue