jar dependencies like old maven-gems

this PR is meant to base for further discussion.

previously maven-gems failed mainly version resolution with maven (on version conflict the dependency tree is used to determine the right version) works totally different then rubygems (version ranges).

this patch has two parts one which loads jars and tracks versions. in case of conflicting versions ONLY the first jar is loaded and the second one just gives a warning. kind of the same you have with rubygems where it fails when a second version of a gems gets activated.

the second part is a Gem.post_install hook which uses the info from the installed Gem::Sepcification of the installed gem and looks for jar dependencies declared in the requirements section of the spec. these declared jars and its depencenies will be install using ruby-maven (which can uses the gemspec as a POM !!). it also creates a file {gemspec.name}_jars.rb file which uses the jar_dependencies to track and load the vendored jars.

to main reason to vendor the jars is that regular bundler will just work.

in case there are version conflicts jbundler can help to resolve them or do it manually. it is a matter of which version gets required first, any project should be able to ensure this.

as an example I added the jar dependencies in jruby-openssl gem.