mkristian / jar-dependencies

manage jar dependencies for ruby gems
MIT License
34 stars 19 forks source link

lib/my_gem_jars.rb not created when jar-dependencies is a development dependency #38

Closed joekiller closed 8 years ago

joekiller commented 8 years ago

The following command to version the jars and make the my_gem_jars.rb file doesn't work if jar-dependencies is declared add_development_dependency.

require 'jars/installer'
task :install_jars do
  Jars::Installer.new.vendor_jars
end

Even if I do Jars::Installer.new.vendor_jars true it doesn't work because has_jars? returns false because the dependency type isn't runtime (https://github.com/mkristian/jar-dependencies/blob/f6b3c202e3178dde6223a079e30cd7e4b916bca5/lib/jars/installer.rb#L177):

        spec.dependencies.detect { |d| d.name == 'jar-dependencies' && d.type == :runtime } != nil

So I think right now, I have to make jar-dependencies runtime and get the file and then I can get the jar file and continue. Just a pain to have to change it back and forth.

mkristian commented 8 years ago

looking at this now

mkristian commented 8 years ago

@joekiller is there a way of testing this patch for me ? as I do not find time for a proper testcase right now

joekiller commented 8 years ago

You can update jruby-kafka use jar-dependencies as a development dep and run then make the rake task in https://github.com/joekiller/jruby-kafka/blob/master/Rakefile

If you don't have time I'll probably try it Monday. On Jan 22, 2016 9:56 AM, "Christian Meier" notifications@github.com wrote:

@joekiller https://github.com/joekiller is there a way of testing this patch for me ? as I do not find time for a proper testcase right now

— Reply to this email directly or view it on GitHub https://github.com/mkristian/jar-dependencies/issues/38#issuecomment-173941410 .