Open MarkusAmshove opened 4 years ago
@MarkusAmshove Is your corporate GEMs repo maven-based or rubygems-based?
By using ruby.gems
you are setting up an internal proxy that will translate Gradle dependency requests in to requests for a service that implements rubygems. SO if your corporate Artifactory also supports GEM repositories using ruby.gems
will work. If your Artifactory repo is already a translation of RubyGems into Maven (such as which Torquebox used to do), then you cannot use this approach and should rather just do maven { url = '....' }
.
(Of course having said of that, there could always be a bug in the jruby-gradle core plugin w.r.t. to private repositories).
@ysb33r that particular repository is gem based, as it can also work with ruby directly.
Do I have to tell gradle to use the gem protocol? The error is strange because it tries to resolve the dependency with the maven repository, which tells me it tries to resolve the maven way.
The Artifactory documentation also doesn't state JRuby for this repository type
Try using
ruby.gems('http://corporation/artifactory/api/gems/ruby-remote')
This is just in case the closure delegation does not work correctly.
Basically in your case what should happen is that the internal proxy will query your artifact repo and then cache locally as Ivy repo.
If you run with --debug
you should get quite a bit more information come out.
I've tried ruby.gems('...')
but got the same error.
I also tried to change the order of repositories:
repositories {
ruby.gems('...')
maven {
url '...'
}
}
and now the error order shifts (notice that localhost comes first now):
020-04-18T11:28:57.739+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all files for configuration ':asciidoctorGems'.
2020-04-18T11:28:57.739+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not find rubygems:rouge:3.15.0.
2020-04-18T11:28:57.739+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Searched in the following locations:
2020-04-18T11:28:57.739+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - http://localhost:55488/rubygems/rouge/3.15.0/ivy.xml
2020-04-18T11:28:57.739+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - http://corporation/artifactory/java-repos/rubygems/rouge/3.15.0/rouge-3.15.0.pom
I've also run the build with --debug
and the specified gem url isn`t mentioned once in the log :-/
Just want to add my 2 cents that this is not working for me too - same problem like @MarkusAmshove - I do have the correct ruby gem mirror configured and can browse the gem repo with my browser but if I run it via gradle it does not even look at the configured ruby.gems url but always going to use the configured maven repository instead (which I need too for other dependencies). Any hints to debug this further - "--debug" does not provide something valuable.
Seems like an upstream issue though because it does not work just using the jruby-gradle-plugin, reported here:
https://github.com/jruby-gradle/jruby-gradle-plugin/issues/429
Hello,
I'm trying to use the gradle plugin behind a corporate proxy and took the gradle pdf example. I'm sitting behind a corporal proxy which won't let me resolve stuff from mavencentral, jcenter or ruby gems.
However, we do have Artifactory to proxy those repositories.
My build.gradle looks like this:
The Gradle and Java dependencies seem to resolve correctly, but I'm faced with the following error:
It doesn't seem to take the specified gem repository into account. Is there anything I can do to point
asciidoctorGems
to the correct repository?