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

Remove intellij jar hell leniency #13404

Closed
rmuir opened this issue Sep 8, 2015 · 6 comments
Closed

Remove intellij jar hell leniency #13404

rmuir opened this issue Sep 8, 2015 · 6 comments
Labels

Comments

@rmuir
Copy link
Contributor

rmuir commented Sep 8, 2015

Its confusing to people that we are lenient to jar hell when running under intellij: thats totally an intellij bug, but by allowing it, people think that jar hell check is "optional" or that we don't execute it in tests, which we totally do in maven and jenkins.

This leniency needs to be removed.

@s1monw
Copy link
Contributor

s1monw commented Sep 8, 2015

+1 I think it makes sense to run tests in IDEs the same way as we run in maven. I will try to figure out how to fix intellij and post a guide here.

@mikemccand
Copy link
Contributor

+1

1 similar comment
@rjernst
Copy link
Member

rjernst commented Sep 8, 2015

+1

@s1monw
Copy link
Contributor

s1monw commented Sep 9, 2015

running this patch with IntelliJ 14 passes without a jarhell.

diff --git a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java b/core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java
index a7b9043..d942cc2 100644
--- a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java
+++ b/core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java
@@ -61,13 +61,7 @@ public class BootstrapForTesting {
         try {
             JarHell.checkJarHell();
         } catch (Exception e) {
-            if (Boolean.parseBoolean(System.getProperty("tests.maven"))) {
-                throw new RuntimeException("found jar hell in test classpath", e);
-            } else {
-                Loggers.getLogger(BootstrapForTesting.class)
-                    .warn("Your ide or custom test runner has jar hell issues, " +
-                          "you might want to look into that", e);
-            }
+            throw new RuntimeException("found jar hell in test classpath", e);
         }

I think we are good to go

s1monw added a commit to s1monw/elasticsearch that referenced this issue Sep 10, 2015
s1monw added a commit that referenced this issue Sep 30, 2015
Closes #13404

Conflicts:
	core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java
@davireis
Copy link

Is there a way to disable the jar hell check? I am using elasticsearch with several other libraries, and there are no simple solutions to completely get rid of jar hell in all my dependencies. It seems that the way things are implemented, I can't even swallow the exception and move along.

@rmuir
Copy link
Contributor Author

rmuir commented Nov 29, 2015

No.

@elastic elastic locked and limited conversation to collaborators Nov 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants