jar-dependencies 0.5.6 → 0.5.7.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47e694f5b02980222403a080af0250b4d60537439c013e8128bdf67c658c140e
4
- data.tar.gz: b8d6ddc56b7761f547a60627ad75b99415ec5d2ea70e6a08bd9cf09b6ce5113e
3
+ metadata.gz: 26162324e2f7dfeb9421f44f3e35b37b9ae2f71f3cdbaff80f6af8b3b2721a41
4
+ data.tar.gz: 6b7b6d1e1b65328344d8bcfadc74e3cabbb6ed5bfe77f93aaa48de75546f552a
5
5
  SHA512:
6
- metadata.gz: da1a448e82ec6528c3854691197c81f1f599d9a57b50d8563528664124b7e1fe89d28d4521f6a061a2976d78d9943de8d91145dc2f5ab5fc125eea06ae0618a1
7
- data.tar.gz: ff4437b492e0f916458d62734a9b168b98d76e7f31c34ceea3890d8f21c300aa394b8a6030d8548a74ec7570fc5e9c57bc5332da08d426f14e8a686478261fb9
6
+ metadata.gz: e9df51c7fc69da676da55f6d61a5ec7811dbbebd3d3de4090a9f06ceb1884c61561085ad6342914bc5a6b47f086bc94890d00d58c5b2a0ebe3ed22a553213114
7
+ data.tar.gz: 577861caf4c82ede39cde1d6f73bd412bddd9c0288c11e894e8a42674137b15c04d4871bfff9d9444a5aace2c89b6a40685e0ed0c05a851adf906f9b01c7378f
data/Readme.md CHANGED
@@ -1,15 +1,14 @@
1
1
  # jar-dependencies
2
2
 
3
- * [![Build Status](https://secure.travis-ci.org/mkristian/jar-dependencies.svg)](http://travis-ci.org/mkristian/jar-dependencies)
4
- * [![Code Climate](https://codeclimate.com/github/mkristian/jar-dependencies.svg)](https://codeclimate.com/github/mkristian/jar-dependencies)
5
-
6
- add gem dependencies for jar files to ruby gems.
3
+ [![Gem Version](https://img.shields.io/gem/v/jar-dependencies)](https://rubygems.org/gems/jar-dependencies)
4
+ [![Build Status](https://github.com/jruby/jar-dependencies/actions/workflows/main.yml/badge.svg)](https://github.com/jruby/jar-dependencies/actions/workflows/main.yml?query=branch%3Amaster)
7
5
 
6
+ Add gem dependencies for jar files to ruby gems.
8
7
 
9
8
  ## Getting control back over your jar
10
9
 
11
10
  jar dependencies are declared in the gemspec of the gem using the same notation
12
- as <https://github.com/mkristian/jbundler>.
11
+ as [JBundler](https://github.com/jruby/jbundler).
13
12
 
14
13
  When using `require_jar` to load the jar into JRuby's classloader a version conflict
15
14
  will be detected and only **ONE** jar gets loaded.
@@ -23,10 +22,12 @@ In such cases **jbundler** can always **overwrite** any such version.
23
22
 
24
23
  Add the following to your *Rakefile*:
25
24
 
26
- require 'jars/installer'
27
- task :install_jars do
28
- Jars::Installer.vendor_jars!
29
- end
25
+ ```ruby
26
+ require 'jars/installer'
27
+ task :install_jars do
28
+ Jars::Installer.vendor_jars!
29
+ end
30
+ ```
30
31
 
31
32
  This will install (download) the dependent jars into **JARS_HOME** and create a
32
33
  file **lib/my_gem_jars.rb**, which will be an enumeration of `require_jars`
@@ -62,7 +63,9 @@ gem so the require_jars file will be overwritten during installation with the
62
63
 
63
64
  Set the environment variable
64
65
 
65
- export JARS_VENDOR=false
66
+ ```shell
67
+ export JARS_VENDOR=false
68
+ ```
66
69
 
67
70
  to tell the jar_installer not vendor any jars, but only create the file with the
68
71
  `require_jar` statements. This `require_jars` method will find the jar inside the
@@ -102,7 +105,9 @@ the rake-compiler in conjunction with jar-dependencies.
102
105
  Whenever there are version ranges for jar dependencies it is advisable to lock down the versions of dependencies.
103
106
  For the jar dependencies inside the gemspec declaration this can be done with:
104
107
 
105
- lock_jars
108
+ ```shell
109
+ lock_jars
110
+ ```
106
111
 
107
112
  This is also working in **any** project which uses a gem with
108
113
  jar-dependencies. It also uses a Jarfile if present. See the [sinatra
@@ -110,20 +115,26 @@ application from the examples](examples/sinatra-app/having-jarfile-and-gems-with
110
115
 
111
116
  This means for a project using bundler and jar-dependencies the setup is
112
117
 
113
- bundle install
114
- lock_jars
118
+ ```shell
119
+ bundle install
120
+ lock_jars
121
+ ```
115
122
 
116
123
  This will install both gems and jars for the project.
117
124
 
118
125
  Update a specific version is done with (use only the artifact_id)
119
126
 
120
- lock_jars --update slf4j-api
127
+ ```shell
128
+ lock_jars --update slf4j-api
129
+ ```
121
130
 
122
131
  And look at the dependencies tree
123
132
 
124
- lock_jars --tree
133
+ ```shell
134
+ lock_jars --tree
135
+ ```
125
136
 
126
- As ```lock_jars``` uses ruby-maven to resolve the jar dependencies.
137
+ As `lock_jars` uses ruby-maven to resolve the jar dependencies.
127
138
  Since jar-dependencies does not declare ruby-maven as runtime dependency
128
139
  (you just not need ruby-maven during runtime only when you want to
129
140
  setup the project it is needed) it is advicable to have it as
@@ -141,13 +152,7 @@ jar-dependencies itself uses maven **only** for the jars and all gems are manage
141
152
 
142
153
  # Gradle, Maven, etc
143
154
 
144
- For dependency management frameworks like gradle (via
145
- jruby-gradle-plugin) or maven (via jruby-maven-plugins
146
- or jruby9-maven-plugins) or probably ivy or sbt can use the gem
147
- artifacts from a maven repository like
148
- [rubygems-proxy from torquebox](http://rubygems-proxy.torquebox.org/)
149
- or
150
- [rubygems.lasagna.io/proxy/maven/releases](http://rubygems.lasagna.io/proxy/maven/releases/).
155
+ Dependency management frameworks like gradle (via jruby-gradle-plugin) or maven (via jruby-maven-plugins) can also use gem artifacts retrieved from rubygems.org.
151
156
 
152
157
  Each of these tools (including jar-dependencies) does the dependency
153
158
  resolution slightly different and in rare cases can produce different
@@ -164,18 +169,23 @@ xalan/xerces libraries used by those gems are popular ones in the Java world.
164
169
  Since maven is used under the hood it is possible to get more insight
165
170
  what maven is doing. Show the regular maven output:
166
171
 
167
- JARS_VERBOSE=true bundle install
168
- JARS_VERBOSE=true gem install some_gem
172
+ ```shell
173
+ JARS_VERBOSE=true bundle install
174
+ JARS_VERBOSE=true gem install some_gem
175
+ ```
176
+
169
177
 
170
178
  Or, with maven debug enabled
171
179
 
172
- JARS_DEBUG=true bundle install
173
- JARS_DEBUG=true gem install some_gem
180
+ ```shell
181
+ JARS_DEBUG=true bundle install
182
+ JARS_DEBUG=true gem install some_gem
183
+ ```
174
184
 
175
185
  The maven command line which gets printed needs maven-3.9.x and the
176
186
  ruby DSL extension for maven:
177
- [https://github.com/takari/polyglot-maven#configuration](polyglot-maven
178
- configuration) where ```${maven.multiModuleProjectDirectory}``` is
187
+ [polyglot-maven
188
+ configuration](https://github.com/takari/polyglot-maven#configuration) where `${maven.multiModuleProjectDirectory}` is
179
189
  your current directory.
180
190
 
181
191
  # Configuration
@@ -206,15 +216,12 @@ your current directory.
206
216
 
207
217
  # Motivation
208
218
 
209
- Just today, I stumbled across [https://github.com/arrigonialberto86/ruby-band](https://github.com/arrigonialberto86/ruby-band) which uses jbundler to manage their JAR dependencies, which happens on the first 'require "ruby-band"'. There is no easy or formal way to find out which JARs are added to jruby-classloader.
210
-
211
- Another issue was brought to my notice yesterday [https://github.com/hqmq/derelicte/issues/1](https://github.com/hqmq/derelicte/issues/1).
212
-
213
- Or the question of how to manage JRuby projects with maven [http://ruby.11.x6.nabble.com/Maven-dependency-management-td4996934.html](http://ruby.11.x6.nabble.com/Maven-dependency-management-td4996934.html)
214
-
215
- Or a few days ago an issue for rake-compile [https://github.com/luislavena/rake-compiler/issues/87](https://github.com/luislavena/rake-compiler/issues/87)
219
+ In 2014, while tools such as [https://github.com/arrigonialberto86/ruby-band](https://github.com/arrigonialberto86/ruby-band) used [jbundler](https://github.com/jruby/jbundler) to manage their there was no easy or formal way to
220
+ - find out which JARs were added to the JRuby classloader
221
+ - to manage JRuby projects with Maven
222
+ - to build Java/JRuby gem extensions with [rake-compiler](https://github.com/luislavena/rake-compiler/issues/87).
216
223
 
217
- With JRuby 9000 it is the right time to get jar dependencies "right" - the current situation is like the time before bundler for gems.
224
+ With JRuby 9000 it was the right time to get jar dependencies "right".
218
225
 
219
226
  # Developing
220
227
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.author = 'christian meier'
11
11
  s.email = ['mkristian@web.de']
12
12
  s.summary = 'manage jar dependencies for gems'
13
- s.homepage = 'https://github.com/mkristian/jar-dependencies'
13
+ s.homepage = 'https://github.com/jruby/jar-dependencies'
14
14
 
15
15
  s.bindir = 'exe'
16
16
  s.executables = [lock_jars = 'lock_jars']
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
  s.required_ruby_version = '>= 2.6'
31
31
 
32
32
  s.add_development_dependency 'minitest', '~> 5.10'
33
- s.add_dependency 'ruby-maven', ruby_maven_version = '~> 3.9'
33
+ s.add_development_dependency 'ruby-maven', ruby_maven_version = '~> 3.9'
34
34
 
35
35
  s.post_install_message = <<~TEXT
36
36
 
data/lib/jars/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jars
4
- VERSION = '0.5.6'
4
+ VERSION = '0.5.7.pre1'
5
5
  JRUBY_PLUGINS_VERSION = '3.0.2'
6
6
  DEPENDENCY_PLUGIN_VERSION = '2.8'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jar-dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian meier
@@ -30,7 +30,7 @@ dependencies:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3.9'
33
- type: :runtime
33
+ type: :development
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
@@ -76,7 +76,7 @@ files:
76
76
  - lib/jars/setup.rb
77
77
  - lib/jars/version.rb
78
78
  - lib/rubygems_plugin.rb
79
- homepage: https://github.com/mkristian/jar-dependencies
79
+ homepage: https://github.com/jruby/jar-dependencies
80
80
  licenses:
81
81
  - MIT
82
82
  metadata: