Skip to content

Commit a4df54b

Browse files
committed
Update documentation to show use of proxy service (#364)
1 parent 3be0862 commit a4df54b

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

README.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ NOTE: JRuby/Gradle 2.0 relies on JRuby 9.x and later.
2323

2424
This repository contains the:
2525

26-
* `base` (in `jruby-gradle-base-plugin/`): dependency resolution, executing Ruby, etc.
27-
* `jar` (in `jruby-gradle-jar-plugin/`): packaging JRuby-based `.jar` files
28-
* `war` (in `jruby-gradle-war-plugin/`): packaging JRuby-based `.war` files
26+
* `core` (in `core-plugin/`): Rubygems proxy.
27+
* `base` (in `base-plugin/`): dependency resolution, executing Ruby, etc.
28+
* `jar` (in `jar-plugin/`): packaging JRuby-based `.jar` files
29+
* `war` (in `war-plugin/`): packaging JRuby-based `.war` files
2930
3031
3132
NOTE: More documentation can be found on link:http://jruby-gradle.org[jruby-gradle.org]

base-plugin/README.adoc

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,9 @@ task unpackMyGems(type : JRubyPrepare) {
204204

205205
=== Using the built-in Gem proxy
206206

207-
As of version 1.1.0, the JRuby/Gradle base plugin supports embedding a
208-
link:https://github.com/torquebox/rubygems-servlets[rubygems-servlets] process
209-
*inside* the Gradle process itself. This obviates the need for a third-party
207+
As of version 2.0, the JRuby/Gradle base plugin supports embedding a lightweight proxy inside* the Gradle process itself. This obviates the need for a third-party
210208
proxy to present the Maven-compatible dependency information that JRuby/Gradle
211-
relies on.
209+
relies on and it also supercedes the older link:https://github.com/torquebox/rubygems-servlets[rubygems-servlets] process
212210

213211
.build.gradle
214212
[source,gradle]
@@ -220,13 +218,24 @@ jruby.defaultRepositories false
220218
221219
repositories {
222220
jcenter()
223-
rubygems('https://rubygems.org')
221+
ruby.gems() // <1>
222+
ruby.gems('https://your-own-server.org') // <2>
223+
ruby.gems('https://another-server.org', 'acmegems') // <3>
224224
}
225225
226226
dependencies {
227-
gems 'rubygems:sinatra:1.4.5'
227+
gems 'rubygems:sinatra:1.4.5' // <4>
228+
gems 'acmegems:some-gem:1.2.3' // <5>
228229
}
229230
----
231+
<1> Retrieve GEMs from https://rubygems.org
232+
<2> Retrieve GEMs from another server.
233+
<3> Retrieve GEMS from another server and associated a custom group name with that server.
234+
<4> Retrieve a GEM. `rubygems` is the default group for GEMs.
235+
<5> Retrieve a GEM using a custom group.
236+
237+
NOTE: If the version of Gradle supports the `content` DSL keyword for repositories, only
238+
requests dependencies with the specific groups will be sent to the GEM repositories.
230239

231240
=== Using a custom Gem repository
232241

0 commit comments

Comments
 (0)