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

jar hell check should fail, if jars require higher java version #11936

Merged
merged 1 commit into from Jun 30, 2015

Conversation

rmuir
Copy link
Contributor

@rmuir rmuir commented Jun 30, 2015

This could happen e.g. if a plugin requires java 8, but the user is on java 7. Instead of strange classfile format errors, we can try for a nice exception.

In order to be efficient, we just check jar manifest metadata for this, if available. This is nonstandard but e.g. all lucene and ES jars have it.

Otherwise we'd have to do something that would be prohibitively slow (like looking at bytes of classes). So its a best effort.

@rmuir
Copy link
Contributor Author

rmuir commented Jun 30, 2015

note we also have other useful metadata in plugin jars like ES and lucene versions. I want to do that on separate issues. The java version is just the most basic check.

@rjernst
Copy link
Member

rjernst commented Jun 30, 2015

LGTM

rmuir added a commit that referenced this pull request Jun 30, 2015
jar hell check should fail, if jars require higher java version
@rmuir rmuir merged commit 70fbc53 into elastic:master Jun 30, 2015
@clintongormley clintongormley added >enhancement :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts labels Jun 30, 2015
@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
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >enhancement Team:Delivery Meta label for Delivery team v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants