1150 lines
55 KiB
XML
1150 lines
55 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>
|
|
<groupId>org.elasticsearch</groupId>
|
|
<artifactId>elasticsearch</artifactId>
|
|
<version>2.0.0-SNAPSHOT</version>
|
|
<packaging>jar</packaging>
|
|
<name>Elasticsearch core</name>
|
|
<description>Elasticsearch - Open Source, Distributed, RESTful Search Engine</description>
|
|
<inceptionYear>2009</inceptionYear>
|
|
<licenses>
|
|
<license>
|
|
<name>The Apache Software License, Version 2.0</name>
|
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<scm>
|
|
<connection>scm:git:git@github.com:elasticsearch/elasticsearch.git</connection>
|
|
<developerConnection>scm:git:git@github.com:elasticsearch/elasticsearch.git</developerConnection>
|
|
<url>http://github.com/elasticsearch/elasticsearch</url>
|
|
</scm>
|
|
|
|
<parent>
|
|
<groupId>org.elasticsearch</groupId>
|
|
<artifactId>elasticsearch-parent</artifactId>
|
|
<version>2.0.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<properties>
|
|
<!-- testing is currently done unshaded :( -->
|
|
<elasticsearch.thirdparty.config>unshaded</elasticsearch.thirdparty.config>
|
|
<!-- Properties used for building RPM & DEB packages (see common/packaging.properties) -->
|
|
<packaging.elasticsearch.home.dir>/usr/share/elasticsearch</packaging.elasticsearch.home.dir>
|
|
<packaging.elasticsearch.bin.dir>/usr/share/elasticsearch/bin</packaging.elasticsearch.bin.dir>
|
|
<packaging.elasticsearch.conf.dir>/etc/elasticsearch</packaging.elasticsearch.conf.dir>
|
|
<packaging.elasticsearch.data.dir>/var/lib/elasticsearch</packaging.elasticsearch.data.dir>
|
|
<packaging.elasticsearch.user>elasticsearch</packaging.elasticsearch.user>
|
|
<packaging.elasticsearch.group>elasticsearch</packaging.elasticsearch.group>
|
|
<packaging.elasticsearch.log.dir>/var/log/elasticsearch</packaging.elasticsearch.log.dir>
|
|
<packaging.elasticsearch.plugins.dir>${packaging.elasticsearch.home.dir}/plugins</packaging.elasticsearch.plugins.dir>
|
|
<packaging.elasticsearch.pid.dir>/var/run/elasticsearch</packaging.elasticsearch.pid.dir>
|
|
<deb.sign>false</deb.sign>
|
|
<deb.sign.method>dpkg-sig</deb.sign.method>
|
|
</properties>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>oss-snapshots</id>
|
|
<name>Sonatype OSS Snapshots</name>
|
|
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.hamcrest</groupId>
|
|
<artifactId>hamcrest-all</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.carrotsearch.randomizedtesting</groupId>
|
|
<artifactId>randomizedtesting-runner</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-test-framework</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents</groupId>
|
|
<artifactId>httpclient</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.jimfs</groupId>
|
|
<artifactId>jimfs</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-core</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-backward-codecs</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-analyzers-common</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-queries</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-memory</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-highlighter</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-queryparser</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-suggest</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-join</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-spatial</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.lucene</groupId>
|
|
<artifactId>lucene-expressions</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.spatial4j</groupId>
|
|
<artifactId>spatial4j</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.vividsolutions</groupId>
|
|
<artifactId>jts</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<!-- needed for templating -->
|
|
<dependency>
|
|
<groupId>com.github.spullara.mustache.java</groupId>
|
|
<artifactId>compiler</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<!-- Lucene spatial -->
|
|
|
|
|
|
<!-- START: dependencies that are shaded -->
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.carrotsearch</groupId>
|
|
<artifactId>hppc</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>joda-time</groupId>
|
|
<artifactId>joda-time</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.joda</groupId>
|
|
<artifactId>joda-convert</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-core</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
<artifactId>jackson-dataformat-smile</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
|
<scope>compile</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
<artifactId>jackson-dataformat-cbor</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>io.netty</groupId>
|
|
<artifactId>netty</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.ning</groupId>
|
|
<artifactId>compress-lzf</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.tdunning</groupId>
|
|
<artifactId>t-digest</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>commons-cli</groupId>
|
|
<artifactId>commons-cli</artifactId>
|
|
</dependency>
|
|
|
|
<!-- END: dependencies that are shaded -->
|
|
|
|
<dependency>
|
|
<groupId>org.codehaus.groovy</groupId>
|
|
<artifactId>groovy-all</artifactId>
|
|
<classifier>indy</classifier>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>log4j</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>apache-log4j-extras</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-api</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>net.java.dev.jna</groupId>
|
|
<artifactId>jna</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.fusesource</groupId>
|
|
<artifactId>sigar</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<!-- We don't use this since the publish pom is then messed up -->
|
|
<!--
|
|
<dependency>
|
|
<groupId>sigar</groupId>
|
|
<artifactId>sigar</artifactId>
|
|
<scope>system</scope>
|
|
<systemPath>${project.basedir}/lib/sigar/sigar-1.6.4.jar</systemPath>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
-->
|
|
</dependencies>
|
|
|
|
<build>
|
|
|
|
<!-- This file contains all the common properties used to build
|
|
the different packages (tar.gz, deb, rpm) using Maven resources plugin -->
|
|
<filters>
|
|
<filter>${project.basedir}/src/packaging/common/packaging.properties</filter>
|
|
</filters>
|
|
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.basedir}/src/main/java</directory>
|
|
<includes>
|
|
<include>**/*.json</include>
|
|
<include>**/*.yml</include>
|
|
</includes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.basedir}/src/main/resources</directory>
|
|
<includes>
|
|
<include>**/*.*</include>
|
|
</includes>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
|
|
<testResources>
|
|
<testResource>
|
|
<directory>${project.basedir}/src/test/java</directory>
|
|
<includes>
|
|
<include>**/*.json</include>
|
|
<include>**/*.yml</include>
|
|
<include>**/*.txt</include>
|
|
<include>**/*.properties</include>
|
|
</includes>
|
|
<filtering>true</filtering>
|
|
</testResource>
|
|
<testResource>
|
|
<directory>${project.basedir}/src/test/java</directory>
|
|
<includes>
|
|
<include>**/*.gz</include>
|
|
</includes>
|
|
</testResource>
|
|
<testResource>
|
|
<directory>${project.basedir}/src/test/resources</directory>
|
|
<includes>
|
|
<include>**/*.*</include>
|
|
</includes>
|
|
</testResource>
|
|
<testResource>
|
|
<directory>${project.basedir}/rest-api-spec</directory>
|
|
<targetPath>rest-api-spec</targetPath>
|
|
<includes>
|
|
<include>api/*.json</include>
|
|
<include>test/**/*.yaml</include>
|
|
</includes>
|
|
</testResource>
|
|
<!-- shared test resources like log4j.properties -->
|
|
<testResource>
|
|
<directory>${elasticsearch.tools.directory}/shared-test-resources</directory>
|
|
<filtering>false</filtering>
|
|
</testResource>
|
|
</testResources>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<version>1.4.0</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>exec</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<executable>${jvm.executable}</executable>
|
|
<arguments>
|
|
<argument>-Des.security.manager.enabled=false</argument>
|
|
<argument>-classpath</argument>
|
|
<classpath/>
|
|
<argument>org.elasticsearch.bootstrap.Bootstrap</argument>
|
|
<argument>-Xms256m</argument>
|
|
<argument>-Xmx1g</argument>
|
|
<argument>-Djava.awt.headless=true</argument>
|
|
<argument>-XX:+UseParNewGC</argument>
|
|
<argument>-XX:+UseConcMarkSweepGC</argument>
|
|
<argument>-XX:CMSInitiatingOccupancyFraction=75</argument>
|
|
<argument>-XX:+UseCMSInitiatingOccupancyOnly</argument>
|
|
<argument>-XX:+HeapDumpOnOutOfMemoryError</argument>
|
|
<argument>-XX:+DisableExplicitGC</argument>
|
|
<argument>-Dfile.encoding=UTF-8</argument>
|
|
<argument>-Djna.nosys=true</argument>
|
|
<argument>-Delasticsearch</argument>
|
|
</arguments>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-test-sources</id>
|
|
<goals>
|
|
<goal>test-jar</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>org/elasticsearch/test/**/*</include>
|
|
<include>org/elasticsearch/bootstrap/BootstrapForTesting.class</include>
|
|
<include>org/elasticsearch/common/cli/CliToolTestCase.class</include>
|
|
<include>org/elasticsearch/common/cli/CliToolTestCase$*.class</include>
|
|
</includes>
|
|
<excludes>
|
|
<!-- unit tests for yaml suite parser & rest spec parser need to be excluded -->
|
|
<exclude>org/elasticsearch/test/rest/test/**/*</exclude>
|
|
<!-- unit tests for test framework classes-->
|
|
<exclude>org/elasticsearch/test/test/**/*</exclude>
|
|
</excludes>
|
|
</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>
|
|
<shadeTestJar>true</shadeTestJar>
|
|
<minimizeJar>true</minimizeJar>
|
|
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
|
|
<artifactSet>
|
|
<includes>
|
|
<include>com.google.guava:guava</include>
|
|
<include>com.carrotsearch:hppc</include>
|
|
<include>com.fasterxml.jackson.core:jackson-core</include>
|
|
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-smile</include>
|
|
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</include>
|
|
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-cbor</include>
|
|
<include>joda-time:joda-time</include>
|
|
<include>org.joda:joda-convert</include>
|
|
<include>io.netty:netty</include>
|
|
<include>com.ning:compress-lzf</include>
|
|
<include>com.github.spullara.mustache.java:compiler</include>
|
|
<include>com.tdunning:t-digest</include>
|
|
<include>org.apache.commons:commons-lang3</include>
|
|
<include>commons-cli:commons-cli</include>
|
|
</includes>
|
|
</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.carrotsearch.hppc</pattern>
|
|
<shadedPattern>org.elasticsearch.common.hppc</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>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.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>
|
|
<filter>
|
|
<artifact>io.netty:netty</artifact>
|
|
<includes>
|
|
<include>org/jboss/netty/**</include>
|
|
</includes>
|
|
</filter>
|
|
</filters>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>2.6</version>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-resources</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/bin</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.basedir}/bin</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>*.exe</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.basedir}/bin</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>*.exe</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<!-- Filters some files and uses packaging.properties when building the .deb package -->
|
|
<execution>
|
|
<id>copy-resources-deb</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/generated-packaging/deb/</outputDirectory>
|
|
<filters>
|
|
<filter>${project.basedir}/src/packaging/common/packaging.properties</filter>
|
|
<filter>${project.basedir}/src/packaging/deb/packaging.properties</filter>
|
|
</filters>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.basedir}/src/packaging/common/</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>packaging.properties</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.basedir}/src/packaging/deb/</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>packaging.properties</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.basedir}</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>bin/elasticsearch</include>
|
|
<include>bin/elasticsearch.in.sh</include>
|
|
<include>bin/plugin</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<!-- Filters some files and uses packaging.properties when building the .rpm package -->
|
|
<execution>
|
|
<id>copy-resources-rpm</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/generated-packaging/rpm/</outputDirectory>
|
|
<filters>
|
|
<filter>${project.basedir}/src/packaging/common/packaging.properties</filter>
|
|
<filter>${project.basedir}/src/packaging/rpm/packaging.properties</filter>
|
|
</filters>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/packaging/common/</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>packaging.properties</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>src/packaging/rpm/</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>packaging.properties</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.basedir}</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>bin/elasticsearch</include>
|
|
<include>bin/elasticsearch.in.sh</include>
|
|
<include>bin/plugin</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<configuration>
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
<outputDirectory>${project.build.directory}/releases/</outputDirectory>
|
|
<descriptors>
|
|
<descriptor>${project.basedir}/src/main/assemblies/targz-bin.xml</descriptor>
|
|
<descriptor>${project.basedir}/src/main/assemblies/zip-bin.xml</descriptor>
|
|
</descriptors>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-dependencies</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
<includeScope>runtime</includeScope>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- Deb Packaging -->
|
|
<plugin>
|
|
<!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md -->
|
|
<artifactId>jdeb</artifactId>
|
|
<groupId>org.vafer</groupId>
|
|
<version>1.4</version>
|
|
<configuration>
|
|
<deb>${project.build.directory}/releases/${project.artifactId}-${project.version}.deb</deb>
|
|
<controlDir>${project.build.directory}/generated-packaging/deb/scripts</controlDir>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>jdeb</goal>
|
|
</goals>
|
|
<configuration>
|
|
<signPackage>${deb.sign}</signPackage>
|
|
<keyring>${gpg.keyring}</keyring>
|
|
<key>${gpg.key}</key>
|
|
<passphrase>${gpg.passphrase}</passphrase>
|
|
<signMethod>${deb.sign.method}</signMethod>
|
|
<dataSet>
|
|
<!-- Add bin directory -->
|
|
<data>
|
|
<src>${project.build.directory}/generated-packaging/deb/bin</src>
|
|
<type>directory</type>
|
|
<includes>elasticsearch,elasticsearch.in.sh,plugin</includes>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>${packaging.elasticsearch.bin.dir}</prefix>
|
|
<filemode>755</filemode>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Add configuration files -->
|
|
<data>
|
|
<src>${project.basedir}/config</src>
|
|
<type>directory</type>
|
|
<excludes>.DS_Store</excludes>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>${packaging.elasticsearch.conf.dir}</prefix>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Add environment vars file -->
|
|
<data>
|
|
<src>${project.build.directory}/generated-packaging/deb/env/elasticsearch</src>
|
|
<type>file</type>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>/etc/default</prefix>
|
|
<filemode>644</filemode>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Add libs -->
|
|
<data>
|
|
<src>${project.build.directory}/</src>
|
|
<includes>${project.build.finalName}.jar</includes>
|
|
<type>directory</type>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>${packaging.elasticsearch.home.dir}/lib</prefix>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<data>
|
|
<src>${project.basedir}/lib/sigar/</src>
|
|
<includes>sigar-*.jar, libsigar-*-linux.*</includes>
|
|
<type>directory</type>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>${packaging.elasticsearch.home.dir}/lib/sigar</prefix>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<data>
|
|
<src>${project.build.directory}/lib</src>
|
|
<includes>lucene*, *log4j*, jna*, spatial4j*, jts*, groovy*, antlr-runtime*, asm*</includes>
|
|
<type>directory</type>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>${packaging.elasticsearch.home.dir}/lib</prefix>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Add init.d files -->
|
|
<data>
|
|
<src>${project.build.directory}/generated-packaging/deb/init.d/</src>
|
|
<type>directory</type>
|
|
<excludes>.DS_Store</excludes>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>/etc/init.d</prefix>
|
|
<filemode>755</filemode>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Adds systemd file -->
|
|
<data>
|
|
<src>${project.build.directory}/generated-packaging/deb/systemd/elasticsearch.service</src>
|
|
<dst>/usr/lib/systemd/system/elasticsearch.service</dst>
|
|
<type>file</type>
|
|
</data>
|
|
<!-- Add lintian files -->
|
|
<data>
|
|
<src>${project.build.directory}/generated-packaging/deb/lintian</src>
|
|
<type>directory</type>
|
|
<excludes>.DS_Store</excludes>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>/usr/share/lintian/overrides</prefix>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Add readme files -->
|
|
<data>
|
|
<src>${project.basedir}/</src>
|
|
<includes>*.txt, *.textile</includes>
|
|
<excludes>LICENSE.txt, .DS_Store</excludes>
|
|
<type>directory</type>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<prefix>${packaging.elasticsearch.home.dir}</prefix>
|
|
<user>root</user>
|
|
<group>root</group>
|
|
</mapper>
|
|
</data>
|
|
<!-- Add license files -->
|
|
<data>
|
|
<src>${project.build.directory}/generated-packaging/deb/copyright</src>
|
|
<dst>/usr/share/doc/elasticsearch/copyright</dst>
|
|
<type>file</type>
|
|
</data>
|
|
<!-- Adds and sets permission on default directories -->
|
|
<data>
|
|
<type>template</type>
|
|
<paths>
|
|
<path>${packaging.elasticsearch.data.dir}</path>
|
|
<path>${packaging.elasticsearch.log.dir}</path>
|
|
<path>${packaging.elasticsearch.plugins.dir}</path>
|
|
<path>${packaging.elasticsearch.pid.dir}</path>
|
|
</paths>
|
|
<mapper>
|
|
<type>perm</type>
|
|
<dirmode>755</dirmode>
|
|
<user>${packaging.elasticsearch.user}</user>
|
|
<group>${packaging.elasticsearch.group}</group>
|
|
</mapper>
|
|
</data>
|
|
</dataSet>
|
|
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- Rpm Packaging -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>rpm-maven-plugin</artifactId>
|
|
<version>2.1.2</version>
|
|
<configuration>
|
|
<distribution>Elasticsearch</distribution>
|
|
<group>Application/Internet</group>
|
|
<packager>Elasticsearch</packager>
|
|
<prefix>/usr</prefix>
|
|
<changelogFile>src/changelog</changelogFile>
|
|
<defineStatements>
|
|
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
|
|
<defineStatement>_binaries_in_noarch_packages_terminate_build 0</defineStatement>
|
|
</defineStatements>
|
|
<defaultFilemode>644</defaultFilemode>
|
|
<defaultDirmode>755</defaultDirmode>
|
|
<defaultUsername>root</defaultUsername>
|
|
<defaultGroupname>root</defaultGroupname>
|
|
<keyname>${gpg.key}</keyname>
|
|
<keypath>${gpg.keyring}</keypath>
|
|
<keyPassphrase>
|
|
<passphrase>${gpg.passphrase}</passphrase>
|
|
</keyPassphrase>
|
|
<mappings>
|
|
<!-- Add bin directory -->
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.bin.dir}/</directory>
|
|
<filemode>755</filemode>
|
|
<sources>
|
|
<source>
|
|
<location>${project.build.directory}/generated-packaging/rpm/bin</location>
|
|
<includes>
|
|
<include>elasticsearch</include>
|
|
<include>elasticsearch.in.sh</include>
|
|
<include>plugin</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Add configuration files -->
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.conf.dir}/</directory>
|
|
<configuration>noreplace</configuration>
|
|
<sources>
|
|
<source>
|
|
<location>${project.basedir}/config/</location>
|
|
<includes>
|
|
<include>*.yml</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Add environment vars file -->
|
|
<mapping>
|
|
<directory>/etc/sysconfig/</directory>
|
|
<directoryIncluded>false</directoryIncluded>
|
|
<configuration>noreplace</configuration>
|
|
<sources>
|
|
<source>
|
|
<location>${project.build.directory}/generated-packaging/rpm/env/</location>
|
|
<includes>
|
|
<include>elasticsearch</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Add libs -->
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.home.dir}/lib</directory>
|
|
<sources>
|
|
<source>
|
|
<location>target/lib/</location>
|
|
<includes>
|
|
<include>lucene*</include>
|
|
<include>*log4j*</include>
|
|
<include>jna*</include>
|
|
<include>spatial4j*</include>
|
|
<include>jts*</include>
|
|
<include>groovy*</include>
|
|
<include>antlr-runtime*</include>
|
|
<include>asm*</include>
|
|
</includes>
|
|
</source>
|
|
<source>
|
|
<location>${project.build.directory}/</location>
|
|
<includes>
|
|
<include>${project.build.finalName}.jar</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.home.dir}/lib/sigar</directory>
|
|
<sources>
|
|
<source>
|
|
<location>lib/sigar</location>
|
|
<includes>
|
|
<include>sigar*.jar</include>
|
|
<include>libsigar-*-linux.*</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Add init.d files -->
|
|
<mapping>
|
|
<directory>/etc/init.d</directory>
|
|
<directoryIncluded>false</directoryIncluded>
|
|
<filemode>755</filemode>
|
|
<configuration>true</configuration>
|
|
<sources>
|
|
<source>
|
|
<location>${project.build.directory}/generated-packaging/rpm/init.d</location>
|
|
<includes>
|
|
<include>elasticsearch</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Adds systemd file -->
|
|
<mapping>
|
|
<directory>/usr/lib/systemd/system/</directory>
|
|
<filemode>755</filemode>
|
|
<configuration>true</configuration>
|
|
<sources>
|
|
<source>
|
|
<location>${project.build.directory}/generated-packaging/rpm/systemd</location>
|
|
<includes>
|
|
<include>elasticsearch.service</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<mapping>
|
|
<directory>/usr/lib/sysctl.d/</directory>
|
|
<filemode>755</filemode>
|
|
<configuration>true</configuration>
|
|
<sources>
|
|
<source>
|
|
<location>${project.build.directory}/generated-packaging/rpm/systemd/sysctl.d</location>
|
|
<includes>
|
|
<include>elasticsearch.conf</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<mapping>
|
|
<directory>/usr/lib/tmpfiles.d/</directory>
|
|
<configuration>true</configuration>
|
|
<sources>
|
|
<source>
|
|
<location>${project.build.directory}/generated-packaging/rpm/systemd/</location>
|
|
<includes>
|
|
<include>elasticsearch.conf</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Add readme files -->
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.home.dir}</directory>
|
|
<sources>
|
|
<source>
|
|
<location>.</location>
|
|
<includes>
|
|
<include>LICENSE.txt</include>
|
|
<include>NOTICE.txt</include>
|
|
<include>README.textile</include>
|
|
</includes>
|
|
</source>
|
|
</sources>
|
|
</mapping>
|
|
<!-- Add and sets permission on default directories -->
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.data.dir}</directory>
|
|
<filemode>755</filemode>
|
|
<username>${packaging.elasticsearch.user}</username>
|
|
<groupname>${packaging.elasticsearch.group}</groupname>
|
|
</mapping>
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.log.dir}</directory>
|
|
<filemode>755</filemode>
|
|
<username>${packaging.elasticsearch.user}</username>
|
|
<groupname>${packaging.elasticsearch.group}</groupname>
|
|
</mapping>
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.plugins.dir}</directory>
|
|
<filemode>755</filemode>
|
|
<username>${packaging.elasticsearch.user}</username>
|
|
<groupname>${packaging.elasticsearch.group}</groupname>
|
|
</mapping>
|
|
<mapping>
|
|
<directory>${packaging.elasticsearch.pid.dir}</directory>
|
|
<filemode>755</filemode>
|
|
<username>${packaging.elasticsearch.user}</username>
|
|
<groupname>${packaging.elasticsearch.group}</groupname>
|
|
</mapping>
|
|
</mappings>
|
|
<preinstallScriptlet>
|
|
<scriptFile>${project.build.directory}/generated-packaging/rpm/scripts/preinst</scriptFile>
|
|
<fileEncoding>utf-8</fileEncoding>
|
|
</preinstallScriptlet>
|
|
<postinstallScriptlet>
|
|
<scriptFile>${project.build.directory}/generated-packaging/rpm/scripts/postinst</scriptFile>
|
|
<fileEncoding>utf-8</fileEncoding>
|
|
</postinstallScriptlet>
|
|
<preremoveScriptlet>
|
|
<scriptFile>${project.build.directory}/generated-packaging/rpm/scripts/prerm</scriptFile>
|
|
<fileEncoding>utf-8</fileEncoding>
|
|
</preremoveScriptlet>
|
|
<postremoveScriptlet>
|
|
<scriptFile>${project.build.directory}/generated-packaging/rpm/scripts/postrm</scriptFile>
|
|
<fileEncoding>utf-8</fileEncoding>
|
|
</postremoveScriptlet>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>test-jar</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>rest-api-spec/**/*</include>
|
|
<include>org/elasticsearch/test/**/*</include>
|
|
<include>org/elasticsearch/bootstrap/BootstrapForTesting.class</include>
|
|
<include>org/elasticsearch/common/cli/CliToolTestCase.class</include>
|
|
<include>org/elasticsearch/common/cli/CliToolTestCase$*.class</include>
|
|
</includes>
|
|
<excludes>
|
|
<!-- unit tests for yaml suite parser & rest spec parser need to be excluded -->
|
|
<exclude>org/elasticsearch/test/rest/test/**/*</exclude>
|
|
<!-- unit tests for test framework classes-->
|
|
<exclude>org/elasticsearch/test/test/**/*</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>jsr166e/**</exclude>
|
|
<exclude>org/apache/lucene/**</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.mycila</groupId>
|
|
<artifactId>license-maven-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<!-- Guice -->
|
|
<exclude>src/main/java/org/elasticsearch/common/inject/**</exclude>
|
|
<exclude>src/main/java/org/elasticsearch/common/geo/GeoHashUtils.java</exclude>
|
|
<exclude>src/main/java/org/apache/lucene/**/X*.java</exclude>
|
|
<!-- t-digest -->
|
|
<exclude>src/main/java/org/elasticsearch/search/aggregations/metrics/percentiles/tdigest/TDigestState.java</exclude>
|
|
<!-- netty pipelining -->
|
|
<exclude>src/main/java/org/elasticsearch/http/netty/pipelining/**</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
<profiles>
|
|
<!-- license profile, to generate third party license file -->
|
|
<profile>
|
|
<id>license</id>
|
|
<activation>
|
|
<property>
|
|
<name>license.generation</name>
|
|
<value>true</value>
|
|
</property>
|
|
</activation>
|
|
<!-- not including license-maven-plugin is sufficent to expose default license -->
|
|
</profile>
|
|
</profiles>
|
|
</project>
|