You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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".
Copy file name to clipboardExpand all lines: examples/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ from the jar-dependencies plugin.
40
40
41
41
## gem with jar dependencies
42
42
43
-
see the project here: [gem with jar dependencies](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-jar-dependencies)
43
+
see the project here: [gem with jar dependencies](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-jar-dependencies)
44
44
45
45
you need to use bundler in this example. just declare the jar
46
46
dependencies inside the gemspec, run
@@ -66,7 +66,7 @@ extension. note that there is no jar-dependencies gem involved here.
66
66
### using maven
67
67
68
68
see project here:
69
-
[gem with java extension using maven](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-java-extension/using-maven)
69
+
[gem with java extension using maven](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-java-extension/using-maven)
70
70
71
71
you need maven 3.9.x installed to get it working and the project needs
72
72
to prepare maven to use the ruby DSL for maven. this is done by adding
@@ -82,7 +82,7 @@ to setup your project.
82
82
### using ruby-maven
83
83
84
84
see project here:
85
-
[gem with java extension using ruby-maven](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-java-extension/using-ruby-maven)
85
+
[gem with java extension using ruby-maven](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-java-extension/using-ruby-maven)
86
86
87
87
use the ruby-maven gem instead of system installed maven. much more ruby
88
88
like, no need to have anything installed on the system beside jruby, i.e.
@@ -97,7 +97,7 @@ to setup your project.
97
97
### using rake-compiler
98
98
99
99
see project here:
100
-
[gem with java extension using rake-compiler](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-java-extension/using-rake-compiler)
100
+
[gem with java extension using rake-compiler](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-java-extension/using-rake-compiler)
101
101
102
102
just use the rake compiler inside the Rakefile, i.e.
103
103
@@ -117,7 +117,7 @@ examples uses the jar dependencies declaration from the gemspec file.
117
117
### using maven
118
118
119
119
see project here:
120
-
[gem with java extension and jar dependencies using maven](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-java-extension-and-jar-dependencies/using-maven)
120
+
[gem with java extension and jar dependencies using maven](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-java-extension-and-jar-dependencies/using-maven)
121
121
122
122
maven just sets up the compile classpath for building the extension jar
123
123
@@ -132,7 +132,7 @@ mvn prepare-package
132
132
### using ruby-maven
133
133
134
134
see project here:
135
-
[gem with java extension and jar dependencies using ruby-maven](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-java-extension-and-jar-dependencies/using-ruby-maven)
135
+
[gem with java extension and jar dependencies using ruby-maven](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-java-extension-and-jar-dependencies/using-ruby-maven)
136
136
137
137
like maven but using ruby-maven instrad.
138
138
@@ -147,7 +147,7 @@ rake compile
147
147
### using rake-compiler
148
148
149
149
see project here:
150
-
[gem with java extension and jar dependencies using rake-compiler](https://github.com/mkristian/jar-dependencies/tree/master/examples/gem-with-java-extension-and-jar-dependencies/using-rake-compiler)
150
+
[gem with java extension and jar dependencies using rake-compiler](https://github.com/jruby/jar-dependencies/tree/master/examples/gem-with-java-extension-and-jar-dependencies/using-rake-compiler)
151
151
152
152
jar-dependencies gems offers a simple way to pass on the classpath to rake-compiler.
0 commit comments