From a5a27a5cd9182d7f44196b8c1e89332d46b270a1 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 05:54:55 -0400 Subject: [PATCH] Add jar hell check test for the shaded jar --- .../org/elasticsearch/bootstrap/JarHell.java | 3 +++ .../main/resources/ant/integration-tests.xml | 10 ++++++++++ distribution/shaded/pom.xml | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java b/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java index a77392f1197..1f6e3345c38 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java @@ -47,8 +47,11 @@ import java.util.jar.Manifest; public class JarHell { /** Simple driver class, can be used eg. from builds. Returns non-zero on jar-hell */ + @SuppressForbidden(reason = "command line tool") public static void main(String args[]) throws Exception { + System.out.println("checking for jar hell..."); checkJarHell(); + System.out.println("no jar hell found"); } /** diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index 6a391397d4f..2582cab3c6c 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -276,4 +276,14 @@ + + + + + + + + + + diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml index 770862ce2fe..9b1d7b08963 100644 --- a/distribution/shaded/pom.xml +++ b/distribution/shaded/pom.xml @@ -38,6 +38,24 @@ + + org.apache.maven.plugins + maven-antrun-plugin + + + check-for-jar-hell + integration-test + + run + + + + + + + + + org.apache.maven.plugins maven-shade-plugin