-
Notifications
You must be signed in to change notification settings - Fork 25.2k
REST client pom.xml has runtime dependencies #19835
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
Comments
The workaround for now is to add in the project which uses a REST client: <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency> |
Hmm - I think it'd be much more friendly to call them compile dependencies. We mostly want them to be. If the user really wants them to be runtime dependencies they can override the scope in their pom. |
I have no idea where this runtime thing comes from, they are declared compile in our build.gradle. https://github.com/elastic/elasticsearch/blob/master/client/rest/build.gradle#L34 |
I expect it is a pom generation thing. |
@rjernst do you know where this may come from? let me know if I can help. |
This change works around a known issue with using the maven-publish gralde plugin. All deps are marked in the generated pom as runtime. With this change, they are set back to compile time. This also simplified the transitive dependencies exclusion to work the same as how it was fixed in gradle 2.14 (wildcard exclusions). closes elastic#19835
This is an issue with the I opened a PR to fix: #19876 |
With alpha5-SNAPSHOT, here is an extract of the generated
pom.xml
. See https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/client/rest/5.0.0-alpha5-SNAPSHOT/rest-5.0.0-alpha5-20160805.100826-168.pomWhich basically means that you can't use OOTB the apache classes:
This won't compile.
Note that it was working well with alpha4. I did not try a "final" released version of alpha5 though.
The text was updated successfully, but these errors were encountered: