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

Naming clash with Joda convert classes #10290

Closed
marko-asplund opened this issue Mar 27, 2015 · 12 comments
Closed

Naming clash with Joda convert classes #10290

marko-asplund opened this issue Mar 27, 2015 · 12 comments
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts discuss Team:Delivery Meta label for Delivery team

Comments

@marko-asplund
Copy link
Contributor

elasticsearch.jar (v1.5.0) re-packages Joda convert classes:

  • org.joda.convert.FromString
  • org.joda.convert.ToString

this will create a naming clash in projects that use Joda convert.

@Pyppe
Copy link

Pyppe commented Mar 27, 2015

Same issue here. Cannot create our own packaged application, because elasticsearch.jar contains the above-mentioned joda-classes.

@marko-asplund
Copy link
Contributor Author

here's how to reproduce this issue:

wget https://dl.bintray.com/sbt/native-packages/sbt/0.13.8/sbt-0.13.8.zip
unzip sbt-0.13.8.zip
git clone https://github.com/marko-asplund/es-repro
cd es-repro
../sbt/bin/sbt assembly

Assembly fails with ES 1.5.0. However, if you edit build.sbt in the repository to replace the ES 1.5.0 dependency with ES 1.4.4 assembly is performed successfully.

@fuwaneko
Copy link

fuwaneko commented Jun 4, 2015

Very annoying bug effectively preventing us from creating fat jar in our project. Looking back to original issue #4660 that introduced monkey-patched files from joda-convert into ES I can only sigh at how developers sometimes do things purely wrong and forget about it until it blows up someday.

I can't even use usual sbt/sbt-assembly stuff to exclude these files during build. That's unacceptable.

@pheaver
Copy link

pheaver commented Aug 29, 2015

Yup, I'm also unable to build a package because of this.

@s1monw
Copy link
Contributor

s1monw commented Aug 29, 2015

can you guys use the shaded jar?

 <groupId>org.elasticsearch.distribution.shaded</groupId>
 <artifactId>elasticsearch</artifactId>

@pheaver
Copy link

pheaver commented Aug 29, 2015

Oh, I'm not familiar with that. Do you know how I would use that in sbt?

@s1monw
Copy link
Contributor

s1monw commented Aug 29, 2015

I don't know sbt but how do you use elasticsearch?

@s1monw
Copy link
Contributor

s1monw commented Aug 29, 2015

libraryDependencies += "org.elasticsearch.distribution.shaded" % "elasticsearch" % "2.0.0-beta1" according to http://search.maven.org/#artifactdetails%7Corg.elasticsearch.distribution.shaded%7Celasticsearch%7C2.0.0-beta1%7Cjar

@pheaver
Copy link

pheaver commented Aug 29, 2015

So the shaded package is only available as 2.x? I'm not sure if that will work.

Also, I'm using https://github.com/sksamuel/elastic4s, which maybe has a dependency on the non-shaded elasticsearch, so even when I try the shaded package I still get errors about conflicting versions of elasticsearch.

@s1monw
Copy link
Contributor

s1monw commented Aug 29, 2015

So the shaded package is only available as 2.x? I'm not sure if that will work.

yeah the 1.x dev branch is closed we are mainly focusing on 2.x now

@m4dc4p
Copy link

m4dc4p commented Sep 2, 2015

2.0.0 isn't even out of beta. Please fix this issue. It's super annoying. Just do a point release! (1.7.2)

@clintongormley
Copy link

Closed by #13358

@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts discuss Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

9 participants