These are chat archives for jruby-gradle/jruby-gradle-plugin

28th
Mar 2016
R. Tyler Croy
@rtyler
Mar 28 2016 18:06
@ysb33r I didn't setup any TLS on rubygems.l.io, where are you seeing the redirect?
when it goes to the actual gem itself?
Christian Meier
@mkristian
Mar 28 2016 18:08
@rtyler @ysb33r with the torquebox proxy there was with IVY not able to redirect from https://rubygems.org to http://s3.amazon.com url
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:08
@rtyler I think the servlet itself does that.
Christian Meier
@mkristian
Mar 28 2016 18:09
I think you are seeing the same thing.
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:09
It took many hours to trackt his down, but I know what the issue is
@mkristian probably
Basically anything that serves up a Maven repo and send a 302 redirect in order to server up an artifact from elsewhere will screw Ivy’s Biblio support
the bug is in Ivy itself
Christian Meier
@mkristian
Mar 28 2016 18:10
sorry was offline a lot the last days. so basically doing the same as in torquebox/rubygems-servlets@7cb71d3 for the regular proxy should do.
i.e. just follow the redirects on the server side and send the last to the client. then everything stays http:// - does not work for all possible cases but for https://rubygems.org :)
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:11
@mkristian as I said, the bug is in Ivy itself. I think the servlet is doing the best thing - redirect to collect the gem from origin
Christian Meier
@mkristian
Mar 28 2016 18:12
yes the problem is Ivy but the proxy can help the ivy clients a bit
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:12
of course, the servlet can proxy the gem downloading through itself, but that it just unnecessary network traffic (only makes sense if the proxy is on a corporate infrastructure).
Christian Meier
@mkristian
Mar 28 2016 18:12
ivy is more or less popular (no real feeling about this)
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:13
Ivy is far less popular than Maven, but it has some advantages
Christian Meier
@mkristian
Mar 28 2016 18:13
I am not trying to proxy this, this can be already configured - a caching proxy
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:13
or shall I say flexibility
Christian Meier
@mkristian
Mar 28 2016 18:14
I want to unwrap the redirects to the last url and just send the last url. somehow Ivy can redirect from http -> http but fails on https -> http
Schalk W. Cronjé
@ysb33r
Mar 28 2016 18:14
@mkristian correct.
@mkristian it is based on java.net.URLConnection which will not redirect between protocols
http, https are considered different protocols
@mkristian I assume the local servlet within gradle can proxy it, then it won;t be too much of a problem
Blane Dabney
@raelik
Mar 28 2016 18:24
@mkristian commented on torquebox/rubygems-servlets#13, tracked the issue down to maven-tools
Christian Meier
@mkristian
Mar 28 2016 18:29
@raelik not yet found the time for it but you are right in maven-tools. should be in the file: https://github.com/torquebox/maven-tools/blob/master/lib/maven/tools/coordinate.rb
Blane Dabney
@raelik
Mar 28 2016 18:41
in the case of a != dependency, we just need to strip out that =, correct?
I mean, it seems like the correct thing to do would be to add that as an exclusion instead
but that would require some fairly tricky refactoring in there
Christian Meier
@mkristian
Mar 28 2016 18:48
exclusions do not take versions only group-id and artifact-id. so this it not going to work
Blane Dabney
@raelik
Mar 28 2016 18:48
yeah, didn't think so
was just looking for that
ok, so it looks like maven does support excluding a specific version in the middle of a range
Christian Meier
@mkristian
Mar 28 2016 18:50
there is testcase for !1 like here https://github.com/torquebox/maven-tools/blob/master/spec/artifact_spec.rb#L31 - maybe this is complete non-sense anyways and should be !=1 altogether
does or does not ? I thought it does not does.
but long time ago that I checked
Blane Dabney
@raelik
Mar 28 2016 18:51
it does, it looks like this (sprockets 2.9.4 example): [1.1,1.3.0),(1.3.0,1.99999]
Christian Meier
@mkristian
Mar 28 2016 18:52
ok - cool - just use the grammar as is :)
Blane Dabney
@raelik
Mar 28 2016 18:53
the current maven-tools doesn't support that though, but it could be made to
Christian Meier
@mkristian
Mar 28 2016 18:53
yes, with this it can be made to comply the ruby side nicely
Blane Dabney
@raelik
Mar 28 2016 18:54
yeah, it looks like maven technically supports an arbitrary number of ranges within the version range spec
I don't know that rubygems does though, so that's probably a non-issue
but you could do something like this in maven: (,1.0],[1.2,1.3.0),(1.3.0,)
i.e. version <= 1.0 or >= 1.2, except for 1.3.0
Christian Meier
@mkristian
Mar 28 2016 18:57
if it is an "or" between the disjoint ranges then this could work
Blane Dabney
@raelik
Mar 28 2016 19:01
yeah, all the sets are 'or'ed together.
Christian Meier
@mkristian
Mar 28 2016 19:02
@raelik many thanks for looking into this so far, since I would have just kept the workaround as is thinking it could not be improved :)
Blane Dabney
@raelik
Mar 28 2016 19:04
No problem! This hasn't really been a huge issue for me, but it's keeping me from doing some tidying up of a rather gross looking spec_helper.rb in one of my projects :P