Add jar hell check test for the shaded jar
This commit is contained in:
parent
aaf0976cb7
commit
a5a27a5cd9
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -276,4 +276,14 @@
|
|||
<startup-elasticsearch home="${integ.scratch}/rpm-extracted/usr/share/elasticsearch/"/>
|
||||
</target>
|
||||
|
||||
<!-- check shaded jar for jar hell -->
|
||||
<target name="check-for-jar-hell">
|
||||
<java failonerror="true" fork="true" classname="org.elasticsearch.bootstrap.JarHell">
|
||||
<classpath>
|
||||
<pathelement location="${project.build.directory}/${project.artifactId}-${project.version}.jar"/>
|
||||
<pathelement location="${org.apache.lucene:lucene-core:jar}"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -38,6 +38,24 @@
|
|||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>check-for-jar-hell</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<ant antfile="${elasticsearch.integ.antfile}" target="check-for-jar-hell"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
|
|
Loading…
Reference in New Issue