Logstash jar dependencies

I'm having some trouble on how to include jar dependencies into my output plugin gem. I have got to the point where it downloads them and puts them into my lib directory but I want them in the vendor directory like the ES output plugin does. I don't want them checked into github though.

  • Using the jar-dependencies gem. I'm not sure if I need to run a separate rake task or modify the Rakefile at all.
  • At first the jar deps were being downloaded into my M2_HOME but not the source directory. Now they are put into lib not vendor/jar-deps
  • no jars are bundled into the gem

The docs talk about using jar deps but not about bundling, so I'm a bit at a loss. Here's my gemspec:

  if RUBY_PLATFORM == 'java'
    s.platform = RUBY_PLATFORM
    # Currently there is a blocking issue with the latest ( version of
    # `ruby-maven` # and installing jars dependencies. If you are declaring a gem
    # in a gemfile # using the :github option it will make the bundle install crash,
    # before upgrading this gem you need to test the version with any plugins

    # that require jars.
      # Ticket: https://github.com/elasticsearch/logstash/issues/2595
      s.add_runtime_dependency 'jar-dependencies', '0.1.7'
      s.add_runtime_dependency 'ruby-maven', ''
      s.add_runtime_dependency "maven-tools", '1.0.7'

      s.requirements << "jar 'com.cerner.wolfe:wolfe-collector-client', '1.0.2'"

Hi, Dres,

I'm new to jruby and I've met a same issue.
I just download the source code of kafka-ouput-logstash plugin from github and try to build it.
But somehow the dependency jars are never downloaded automatically, and they do not exist in ".M2", and didn't see there was an error.

Could you tell me how to download the depdendency jars?