Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.58k stars 591 forks source link

unirest-java 3.14.3 POM does not contain Apache HTTP Client dependency anymore #474

Closed timomeinen closed 1 year ago

timomeinen commented 1 year ago

It seems there was a deployment issue with the latest release:

https://search.maven.org/artifact/com.konghq/unirest-java/3.14.3/jar

The published pom.xml does not contain dependency to org.apache.httpcomponents:httpclient anymore.

haroon-sheikh commented 1 year ago

I was just about to report the same. We're seeing a similar issue java.lang.NoClassDefFoundError: org/apache/http/nio/protocol/HttpAsyncResponseConsumer

It could possibly be due to an update to the maven-shade-plugin https://github.com/Kong/unirest-java/commit/11cea491a96d7f975680cae2c4509396eaa18279

mgerlach commented 1 year ago

Same here.

Also jackson is missing when using unirest-objectmapper-jackson.

The packaged unirest-java and unirest-objectmapper-jackson pom.xml files you get from Maven Central are different from the ones in this repo:

https://github.com/Kong/unirest-java/blob/v3.14.3/unirest/pom.xml has the httpcomponents dependencies which are missing in the package from Maven Central https://github.com/Kong/unirest-java/blob/v3.14.3/object-mapper-jackson/pom.xml has the jackson dependency which is missing in the package from Maven Central

We were able to fix the missing Http... class by using the "standalone" variant of unirest-java (includes shaded dependencies), but with the objectmapper-jackson we do not want (maybe even cannot) do it as we need to use it with additional jackson dependencies which do not work with the included shaded ones.

ryber commented 1 year ago

damn you guys are really on top of updating to the most recent version huh 😄

I agree its probably the shade plugin, I reverted that and I cut a new version. Can someone try it out and let me know if its still an issue?

timomeinen commented 1 year ago

@ryber We use Renovate to keep up-to-date and for minor releases like this one we simply automerge.

timomeinen commented 1 year ago

Thanks @ryber. Works again.

haroon-sheikh commented 1 year ago

Thanks @ryber for the speedy fix. It works for me too.

mgerlach commented 1 year ago

Thanks @ryber 👍, Renovate PR with new version is looking good!