-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use jar dependencies to fix snappy compression issue
- Loading branch information
Showing
5 changed files
with
51 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,16 @@ | ||
require 'gem_publisher' | ||
|
||
desc 'Publish gem to RubyGems.org' | ||
task :publish_gem do |t| | ||
gem = GemPublisher.publish_if_updated('logstash-output-kafka.gemspec', :rubygems) | ||
puts "Published #{gem}" if gem | ||
end | ||
require "logstash/devutils/rake" | ||
|
||
task :default do | ||
system('rake -T') | ||
end | ||
|
||
desc "Get jars" | ||
task :vendor do | ||
jar_target = "vendor/jar-dependencies/runtime-jars" | ||
kafka_version = "0.9.0.1" | ||
kafka_url = "http://central.maven.org/maven2/org/apache/kafka/kafka-clients/#{kafka_version}/kafka-clients-#{kafka_version}.jar" | ||
slf4j_version = "1.7.13" | ||
slf4j_url = "http://central.maven.org/maven2/org/slf4j/slf4j-api/#{slf4j_version}/slf4j-api-#{slf4j_version}.jar" | ||
slf4j_nop_url = "http://central.maven.org/maven2/org/slf4j/slf4j-nop/#{slf4j_version}/slf4j-nop-#{slf4j_version}.jar" | ||
|
||
puts "Will get jars for version #{kafka_version}" | ||
puts "Removing current jars" | ||
`rm -rf #{jar_target}` | ||
`mkdir -p #{jar_target}` | ||
Dir.chdir jar_target | ||
puts "Will download #{kafka_url}" | ||
`curl #{kafka_url} -o kafka-clients-#{kafka_version}.jar` | ||
puts "Will download #{slf4j_url}" | ||
`curl #{slf4j_url} -o slf4j-api-#{slf4j_version}.jar` | ||
puts "Will download #{slf4j_nop_url}" | ||
`curl #{slf4j_nop_url} -o slf4j-noop-#{slf4j_version}.jar` | ||
require 'jars/installer' | ||
task :install_jars do | ||
# If we don't have these env variables set, jar-dependencies will | ||
# download the jars and place it in $PWD/lib/. We actually want them in | ||
# $PWD/vendor | ||
ENV['JARS_HOME'] = Dir.pwd + "/vendor/jar-dependencies/runtime-jars" | ||
ENV['JARS_VENDOR'] = "false" | ||
Jars::Installer.new.vendor_jars!(false) | ||
end | ||
|
||
require "logstash/devutils/rake" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters