OpenSearch/distribution/shaded/pom.xml

174 lines
8.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>elasticsearch-distribution</artifactId>
<version>2.0.0-beta1-SNAPSHOT</version>
</parent>
<groupId>org.elasticsearch.distribution.shaded</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch Shaded Distribution</name>
<dependencies>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!-- see docs, incremental builds dont play well with shading otherwise -->
<configuration>
<skipIfEmpty>false</skipIfEmpty>
<forceCreation>true</forceCreation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
</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"/>
<ant antfile="${elasticsearch.integ.antfile}" target="check-shaded-jar-packages"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<shadeTestJar>false</shadeTestJar>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<artifactSet>
<excludes>
<exclude>org.apache.lucene:*</exclude>
<exclude>com.spatial4j:*</exclude>
</excludes>
</artifactSet>
<transformers>
<!-- copy over MANIFEST.MF from unshaded jar, but mark jar as shaded too -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<X-Build-Shaded>true</X-Build-Shaded>
</manifestEntries>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>org.elasticsearch.common</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.thirdparty</pattern>
<shadedPattern>org.elasticsearch.common.thirdparty</shadedPattern>
</relocation>
<relocation>
<pattern>com.carrotsearch.hppc</pattern>
<shadedPattern>org.elasticsearch.common.hppc</shadedPattern>
</relocation>
<relocation>
<pattern>org.HdrHistogram</pattern>
<shadedPattern>org.elasticsearch.common.HdrHistogram</shadedPattern>
</relocation>
<relocation>
<pattern>org.yaml</pattern>
<shadedPattern>org.elasticsearch.common.yaml</shadedPattern>
</relocation>
<relocation>
<pattern>com.twitter.jsr166e</pattern>
<shadedPattern>org.elasticsearch.common.util.concurrent.jsr166e</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.elasticsearch.common.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>org.joda.time</pattern>
<shadedPattern>org.elasticsearch.common.joda.time</shadedPattern>
</relocation>
<relocation>
<pattern>org.joda.convert</pattern>
<shadedPattern>org.elasticsearch.common.joda.convert</shadedPattern>
</relocation>
<relocation>
<pattern>org.jboss.netty</pattern>
<shadedPattern>org.elasticsearch.common.netty</shadedPattern>
</relocation>
<relocation>
<pattern>com.ning.compress</pattern>
<shadedPattern>org.elasticsearch.common.compress</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.mustachejava</pattern>
<shadedPattern>org.elasticsearch.common.mustache</shadedPattern>
</relocation>
<relocation>
<pattern>com.tdunning.math.stats</pattern>
<shadedPattern>org.elasticsearch.common.stats</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.lang</pattern>
<shadedPattern>org.elasticsearch.common.lang</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.cli</pattern>
<shadedPattern>org.elasticsearch.common.cli.commons</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/license/**</exclude>
<exclude>META-INF/*</exclude>
<exclude>META-INF/maven/**</exclude>
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
<exclude>/*.txt</exclude>
<exclude>build.properties</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>