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

Publish SNAPSHOTs on Sonatype #34

Closed
sschuberth opened this issue Mar 10, 2016 · 15 comments
Closed

Publish SNAPSHOTs on Sonatype #34

sschuberth opened this issue Mar 10, 2016 · 15 comments

Comments

@sschuberth
Copy link
Contributor

Can we get SNAPSHOTs published on Sonatype? We'd esp. need gerrit-rest-java-client-0.8.8-SNAPSHOT.jar for @EdwinKempin's ReviewIT Android app :-)

@EdwinKempin
Copy link
Contributor

This request is about the httpclient-android branch.

@sschuberth
Copy link
Contributor Author

This request is about the httpclient-android branch.

Oh, sorry, I wasn't aware of that. In that case, maybe it's too confusing to publish a SNAPSHOT that is not built from master? What's the plan to integrate httpclient-android to master?

@uwolfer
Copy link
Owner

uwolfer commented Mar 10, 2016

Great work on ReviewIT! 👍

I have not looked into publishing snapshots yet, but I release "normal" releases to Sonatype (but not the httpclient-branch yet). If you know any easy (probably almost automated way) to publish snapshots to Sonatype, please let me know.

I really would like to have just one branch, but this is not possible because of the httpclient issue on Android... (at least the last time I have looked into it together with the author of mGerrit, which was probably almost a year ago). If there is a good way to implement it the same way for Android and "normal" JRE, it would be great. If you have any idea here, please let me know.

@sschuberth
Copy link
Contributor Author

The httpclient issue is indeed annoying. @uwolfer just wondering, have you considered instead using using Retrofit? Being based on OkHttp it should work equally well on Android and JVM.

@uwolfer
Copy link
Owner

uwolfer commented Mar 13, 2016

mGerrit developer @p4r4n01d has tried to port it to OkHttp some time ago but he decided to stay with HttpClient after some time because of missing features.

His work-in-progress (abandoned) can be found here: https://github.com/p4r4n01d/gerrit-rest-java-client/commits/okhttp

I have not looked into Retrofit yet.

@sschuberth
Copy link
Contributor Author

@p4r4n01d Would you have any details on the missing features and whether using Retrofit on top of OkHttp would help?

@sschuberth
Copy link
Contributor Author

@uwolfer WRT publishing snapshots to Sonatype, have you checked the videos at http://central.sonatype.org/pages/ossrh-guide.html? For the httpclient-android branch you could probably publish with the classifier set to android, and publish this artifact in parallel to the one from the master branch.

@p4r4n01d
Copy link
Contributor

@sschuberth I have done some searching through my emails from when I was working on this and from what I remember, only the Apache library supports all the methods of authentication that Gerrit (and this library) uses. I had a lot of problems with digest authentication using OkHttp as they didn't properly support it. This is a big problem if Gerrit's default authentication method is digest as I think it is.

I would be really happy porting this to use OkHttp, but it is not an option if half the features in this library are dropped as OkHttp doesn't support them. I would also be happy if the Guava dependency is removed (that is a big library which adds a TON of methods) but that is another story...

I sent this to @uwolfer on 30/05:

For OkHttp: I have essentially given up trying to do digest authentication without apache. I tried to match the response header as closely to the included apache implementation, but I always get 403 forbidden back when the apache one succeeds (I was using a real server for testing). As it can authenticate and fetch/parse the response, the next step is to attempt the migration for mGerrit, then I'll worry about things like preemptive auth.

@p4r4n01d
Copy link
Contributor

@sschuberth Where can I find out more about this ReviewIT app? I am pretty interested in other code review apps. Is there anywhere I can have a look at other than Gerrit code review (which is rather ironic btw)?

@sschuberth
Copy link
Contributor Author

@p4r4n01d The ReviewIt app currently is only hosted on googlesource.com, but you can anonymously clone it via:

git clone https://gerrit.googlesource.com/apps/reviewit

so that should not be a big issue. @EdwinKempin's original announcement in the repo-discuss group is over here.

@sschuberth
Copy link
Contributor Author

I would also be happy if the Guava dependency is removed (that is a big library which adds a TON of methods) but that is another story...

Is method count on Android still an issue for you in multi-dex times?

@p4r4n01d
Copy link
Contributor

Thanks for that link.

It is not really an issue.

@sschuberth
Copy link
Contributor Author

I had a lot of problems with digest authentication using OkHttp as they didn't properly support it.

They indeed still do not seem to support it: square/okhttp#205

However, the https://github.com/rburgst/okhttp-digest library might come to the rescue, though I haven't tried it yet.

@sschuberth
Copy link
Contributor Author

Closing the request for a SNAPSHOT published from the httpclient-android branch in favor of using JitPack as suggested here.

@uwolfer
Copy link
Owner

uwolfer commented Mar 21, 2016

@sschuberth: Nice solution! Probably other users of the Android branch can also use it.

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

4 participants