瀏覽代碼

Give intellij its jar hell back. This is not an invitation for more leniency.

Robert Muir 10 年之前
父節點
當前提交
164cf2775f
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java

+ 7 - 1
core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java

@@ -61,7 +61,13 @@ public class BootstrapForTesting {
         try {
             JarHell.checkJarHell();
         } catch (Exception e) {
-            throw new RuntimeException("found jar hell in test classpath", 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);
+            }
         }
 
         // make sure java.io.tmpdir exists always (in case code uses it in a static initializer)