Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "how to host private gems" to Readme #15

Closed
fapdash opened this issue Nov 2, 2016 · 8 comments
Closed

Add "how to host private gems" to Readme #15

fapdash opened this issue Nov 2, 2016 · 8 comments

Comments

@fapdash
Copy link

fapdash commented Nov 2, 2016

I tried to drop my .gem file into /target/hosted but it's not showing up at http://0.0.0.0:8989/hosted/.
It would be really helpful if you could add a paragraph describing how to add gems.

@mkristian
Copy link
Member

right, I never added it as I never added tests for it. will find some time over the weekend.

@fapdash
Copy link
Author

fapdash commented Nov 3, 2016

Thank you, I'm trying to use/serve a private/local gem in a gradle build with jruby gradle plugin, if that matters.

@mkristian
Copy link
Member

I guessed it already since I saw an issue from you on the gradle list - yes it is the right usecase. I just do not have too much extra time during the week (anymore)

@mkristian
Copy link
Member

still pending . . .

@mkristian
Copy link
Member

@fap- I did indeed to add some code to get the upload working - thanx for asking. could you check it out and test this on your side before I make a new release ?

@fapdash
Copy link
Author

fapdash commented Nov 13, 2016

I pushed a gem with nexus.

gem nexus asciidoctor-pdf-1.5.0.alpha.14.hosted.gem 
[...]
Uploading gem to Nexus...
OK

Server saved it

[INFO] hosted: /gems/asciidoctor-pdf-1.5.0.alpha.14.hosted.gem - RubygemsFile[type=GEM, storage=/gems/a/asciidoctor-pdf-1.5.0.alpha.14.hosted.gem, remote=/gems/asciidoctor-pdf-1.5.0.alpha.14.hosted.gem, name=asciidoctor-pdf-1.5.0.alpha.14.hosted, state=PAYLOAD, payload=HttpInputOverHTTP@6d87243f[c=1389056,s=EOF]]

I can download the gem from
http://localhost:8989/hosted/gems/asciidoctor-pdf-1.5.0.alpha.14.hosted.gem
But there is no pom
http://localhost:8989/hosted/gems/asciidoctor-pdf-1.5.0.alpha.14.hosted.pom => 404

Using I tested this with jruby gradle base plugin 1.3.3 with their suggested config.

jruby {
    defaultRepositories false
}

repositories {
    maven { url 'http://localhost:8989/releases' }
}

dependencies {
    gems 'rubygems:asciidoctor-pdf:1.5.0.alpha.14.hosted'
}
Resource missing. [HTTP GET: http://localhost:8989/releases/rubygems/asciidoctor-pdf/1.5.0.alpha.14.hosted/asciidoctor-pdf-1.5.0.alpha.14.hosted.pom]
Resource missing. [HTTP HEAD: http://localhost:8989/releases/rubygems/asciidoctor-pdf/1.5.0.alpha.14.hosted/asciidoctor-pdf-1.5.0.alpha.14.hosted.jar]

Changing the maven endpoint to /hosted or /merge didn't work either.

Btw we got shown a way to use custom gems locally with the plugin here.
It's has the disadvantage that the dependencies have to be specified by hand but it works.
So if you are short on time and nobody else wants this feature I would suggest to maybe skip this feature for now? (assuming the fix is not trivial)

@mkristian
Copy link
Member

/hosted/maven/releases is the right endpoint. will add this to the readme as well.

@fapdash
Copy link
Author

fapdash commented Nov 14, 2016

This endpoint works! I had to activate the default repositories for jruby, so he would find the other dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants