summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Reelsen <alexander@reelsen.net>2015-06-03 10:39:31 +0200
committerAlexander Reelsen <alexander@reelsen.net>2015-07-27 17:50:54 +0200
commit9628d2632fa39fb8aa03f5eb008a65fc4948bb1a (patch)
treef1ae8177b1ebe5623b5507f34d32717f8a2cc1d5
parent01ae7300232ed66ea31ec51b0126158738dd6ade (diff)
Build: Split packages into submodules
This change creates a proper `distribution` modules in which we have today packaging for all of our four current packages: * zip * tar.gz * rpm * deb Licenes have moved into the distribution project as well. So have the config/ and the bin/ directory from the core/ project. The RPM package is now built, if rpmbuild exists. The bats tests have been moved as well. Also the zip distribution now executes the REST integration tests.
-rw-r--r--TESTING.asciidoc4
-rw-r--r--core/pom.xml624
-rw-r--r--distribution/deb/pom.xml280
-rw-r--r--distribution/deb/src/main/packaging/copyright (renamed from core/src/packaging/deb/copyright)0
-rwxr-xr-xdistribution/deb/src/main/packaging/init.d/elasticsearch (renamed from core/src/packaging/deb/init.d/elasticsearch)2
-rw-r--r--distribution/deb/src/main/packaging/lintian/elasticsearch (renamed from core/src/packaging/deb/lintian/elasticsearch)0
-rw-r--r--distribution/deb/src/main/packaging/packaging.properties (renamed from core/src/packaging/deb/packaging.properties)0
-rw-r--r--distribution/deb/src/main/packaging/scripts/conffiles (renamed from core/src/packaging/deb/scripts/conffiles)0
-rw-r--r--distribution/deb/src/main/packaging/scripts/control (renamed from core/src/packaging/deb/scripts/control)0
-rw-r--r--distribution/licenses/HdrHistogram-2.1.5.jar.sha1 (renamed from core/licenses/HdrHistogram-2.1.5.jar.sha1)0
-rw-r--r--distribution/licenses/HdrHistogram-LICENSE.txt (renamed from core/licenses/HdrHistogram-LICENSE.txt)0
-rw-r--r--distribution/licenses/HdrHistogram-NOTICE.txt (renamed from core/licenses/HdrHistogram-NOTICE.txt)0
-rw-r--r--distribution/licenses/antlr-runtime-3.5.jar.sha1 (renamed from core/licenses/antlr-runtime-3.5.jar.sha1)0
-rw-r--r--distribution/licenses/antlr-runtime-LICENSE.txt (renamed from core/licenses/antlr-runtime-LICENSE.txt)0
-rw-r--r--distribution/licenses/antlr-runtime-NOTICE.txt (renamed from core/licenses/antlr-runtime-NOTICE.txt)0
-rw-r--r--distribution/licenses/apache-log4j-extras-1.2.17.jar.sha1 (renamed from core/licenses/apache-log4j-extras-1.2.17.jar.sha1)0
-rw-r--r--distribution/licenses/apache-log4j-extras-DEPENDENCIES (renamed from core/licenses/apache-log4j-extras-DEPENDENCIES)0
-rw-r--r--distribution/licenses/apache-log4j-extras-LICENSE (renamed from core/licenses/apache-log4j-extras-LICENSE)0
-rw-r--r--distribution/licenses/apache-log4j-extras-NOTICE (renamed from core/licenses/apache-log4j-extras-NOTICE)0
-rw-r--r--distribution/licenses/asm-4.1.jar.sha1 (renamed from core/licenses/asm-4.1.jar.sha1)0
-rw-r--r--distribution/licenses/asm-LICENSE.txt (renamed from core/licenses/asm-LICENSE.txt)0
-rw-r--r--distribution/licenses/asm-NOTICE.txt (renamed from core/licenses/asm-NOTICE.txt)0
-rw-r--r--distribution/licenses/asm-commons-4.1.jar.sha1 (renamed from core/licenses/asm-commons-4.1.jar.sha1)0
-rw-r--r--distribution/licenses/asm-commons-LICENSE.txt (renamed from core/licenses/asm-commons-LICENSE.txt)0
-rw-r--r--distribution/licenses/asm-commons-NOTICE.txt (renamed from core/licenses/asm-commons-NOTICE.txt)0
-rw-r--r--distribution/licenses/commons-cli-1.2.jar.sha1 (renamed from core/licenses/commons-cli-1.2.jar.sha1)0
-rw-r--r--distribution/licenses/commons-cli-LICENSE.txt (renamed from core/licenses/commons-cli-LICENSE.txt)0
-rw-r--r--distribution/licenses/commons-cli-NOTICE.txt (renamed from core/licenses/commons-cli-NOTICE.txt)0
-rw-r--r--distribution/licenses/commons-lang3-3.3.2.jar.sha1 (renamed from core/licenses/commons-lang3-3.3.2.jar.sha1)0
-rw-r--r--distribution/licenses/commons-lang3-LICENSE.txt (renamed from core/licenses/commons-lang3-LICENSE.txt)0
-rw-r--r--distribution/licenses/commons-lang3-NOTICE.txt (renamed from core/licenses/commons-lang3-NOTICE.txt)0
-rw-r--r--distribution/licenses/compiler-0.8.13.jar.sha1 (renamed from core/licenses/compiler-0.8.13.jar.sha1)0
-rw-r--r--distribution/licenses/compiler-LICENSE.txt (renamed from core/licenses/compiler-LICENSE.txt)0
-rw-r--r--distribution/licenses/compiler-NOTICE.txt (renamed from core/licenses/compiler-NOTICE.txt)0
-rw-r--r--distribution/licenses/compress-lzf-1.0.2.jar.sha1 (renamed from core/licenses/compress-lzf-1.0.2.jar.sha1)0
-rw-r--r--distribution/licenses/compress-lzf-LICENSE (renamed from core/licenses/compress-lzf-LICENSE)0
-rw-r--r--distribution/licenses/compress-lzf-NOTICE (renamed from core/licenses/compress-lzf-NOTICE)0
-rw-r--r--distribution/licenses/groovy-all-2.4.4-indy.jar.sha1 (renamed from core/licenses/groovy-all-2.4.4-indy.jar.sha1)0
-rw-r--r--distribution/licenses/groovy-all-LICENSE-ANTLR.txt (renamed from core/licenses/groovy-all-LICENSE-ANTLR.txt)0
-rw-r--r--distribution/licenses/groovy-all-LICENSE-ASM.txt (renamed from core/licenses/groovy-all-LICENSE-ASM.txt)0
-rw-r--r--distribution/licenses/groovy-all-LICENSE-CLI.txt (renamed from core/licenses/groovy-all-LICENSE-CLI.txt)0
-rw-r--r--distribution/licenses/groovy-all-LICENSE-JSR223.txt (renamed from core/licenses/groovy-all-LICENSE-JSR223.txt)0
-rw-r--r--distribution/licenses/groovy-all-LICENSE.txt (renamed from core/licenses/groovy-all-LICENSE.txt)0
-rw-r--r--distribution/licenses/groovy-all-NOTICE.txt (renamed from core/licenses/groovy-all-NOTICE.txt)0
-rw-r--r--distribution/licenses/guava-18.0.jar.sha1 (renamed from core/licenses/guava-18.0.jar.sha1)0
-rw-r--r--distribution/licenses/guava-LICENSE.txt (renamed from core/licenses/guava-LICENSE.txt)0
-rw-r--r--distribution/licenses/guava-NOTICE.txt (renamed from core/licenses/guava-NOTICE.txt)0
-rw-r--r--distribution/licenses/hppc-0.7.1.jar.sha1 (renamed from core/licenses/hppc-0.7.1.jar.sha1)0
-rw-r--r--distribution/licenses/hppc-LICENSE.txt (renamed from core/licenses/hppc-LICENSE.txt)0
-rw-r--r--distribution/licenses/hppc-NOTICE.txt (renamed from core/licenses/hppc-NOTICE.txt)0
-rw-r--r--distribution/licenses/jackson-LICENSE (renamed from core/licenses/jackson-LICENSE)0
-rw-r--r--distribution/licenses/jackson-NOTICE (renamed from core/licenses/jackson-NOTICE)0
-rw-r--r--distribution/licenses/jackson-core-2.5.3.jar.sha1 (renamed from core/licenses/jackson-core-2.5.3.jar.sha1)0
-rw-r--r--distribution/licenses/jackson-dataformat-cbor-2.5.3.jar.sha1 (renamed from core/licenses/jackson-dataformat-cbor-2.5.3.jar.sha1)0
-rw-r--r--distribution/licenses/jackson-dataformat-smile-2.5.3.jar.sha1 (renamed from core/licenses/jackson-dataformat-smile-2.5.3.jar.sha1)0
-rw-r--r--distribution/licenses/jackson-dataformat-yaml-2.5.3.jar.sha1 (renamed from core/licenses/jackson-dataformat-yaml-2.5.3.jar.sha1)0
-rw-r--r--distribution/licenses/jna-4.1.0.jar.sha1 (renamed from core/licenses/jna-4.1.0.jar.sha1)0
-rw-r--r--distribution/licenses/jna-LICENSE.txt (renamed from core/licenses/jna-LICENSE.txt)0
-rw-r--r--distribution/licenses/jna-NOTICE.txt (renamed from core/licenses/jna-NOTICE.txt)0
-rw-r--r--distribution/licenses/joda-convert-1.2.jar.sha1 (renamed from core/licenses/joda-convert-1.2.jar.sha1)0
-rw-r--r--distribution/licenses/joda-convert-LICENSE.txt (renamed from core/licenses/joda-convert-LICENSE.txt)0
-rw-r--r--distribution/licenses/joda-convert-NOTICE.txt (renamed from core/licenses/joda-convert-NOTICE.txt)10
-rw-r--r--distribution/licenses/joda-time-2.8.jar.sha1 (renamed from core/licenses/joda-time-2.8.jar.sha1)0
-rw-r--r--distribution/licenses/joda-time-LICENSE.txt (renamed from core/licenses/joda-time-LICENSE.txt)0
-rw-r--r--distribution/licenses/joda-time-NOTICE.txt (renamed from core/licenses/joda-time-NOTICE.txt)10
-rw-r--r--distribution/licenses/jsr166e-1.1.0.jar.sha1 (renamed from core/licenses/jsr166e-1.1.0.jar.sha1)0
-rw-r--r--distribution/licenses/jsr166e-LICENSE (renamed from core/licenses/jsr166e-LICENSE)0
-rw-r--r--distribution/licenses/jsr166e-NOTICE (renamed from core/licenses/jsr166e-NOTICE)0
-rw-r--r--distribution/licenses/jts-1.13.jar.sha1 (renamed from core/licenses/jts-1.13.jar.sha1)0
-rw-r--r--distribution/licenses/jts-LICENSE.txt (renamed from core/licenses/jts-LICENSE.txt)0
-rw-r--r--distribution/licenses/jts-NOTICE.txt (renamed from core/licenses/jts-NOTICE.txt)0
-rw-r--r--distribution/licenses/log4j-1.2.17.jar.sha1 (renamed from core/licenses/log4j-1.2.17.jar.sha1)0
-rw-r--r--distribution/licenses/log4j-LICENSE (renamed from core/licenses/log4j-LICENSE)0
-rw-r--r--distribution/licenses/log4j-NOTICE (renamed from core/licenses/log4j-NOTICE)0
-rw-r--r--distribution/licenses/lucene-LICENSE.txt (renamed from core/licenses/lucene-LICENSE.txt)0
-rw-r--r--distribution/licenses/lucene-NOTICE.txt (renamed from core/licenses/lucene-NOTICE.txt)0
-rw-r--r--distribution/licenses/lucene-analyzers-common-5.2.1.jar.sha1 (renamed from core/licenses/lucene-analyzers-common-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-backward-codecs-5.2.1.jar.sha1 (renamed from core/licenses/lucene-backward-codecs-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-core-5.2.1.jar.sha1 (renamed from core/licenses/lucene-core-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-expressions-5.2.1.jar.sha1 (renamed from core/licenses/lucene-expressions-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-grouping-5.2.1.jar.sha1 (renamed from core/licenses/lucene-grouping-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-highlighter-5.2.1.jar.sha1 (renamed from core/licenses/lucene-highlighter-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-join-5.2.1.jar.sha1 (renamed from core/licenses/lucene-join-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-memory-5.2.1.jar.sha1 (renamed from core/licenses/lucene-memory-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-misc-5.2.1.jar.sha1 (renamed from core/licenses/lucene-misc-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-queries-5.2.1.jar.sha1 (renamed from core/licenses/lucene-queries-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-queryparser-5.2.1.jar.sha1 (renamed from core/licenses/lucene-queryparser-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-sandbox-5.2.1.jar.sha1 (renamed from core/licenses/lucene-sandbox-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-spatial-5.2.1.jar.sha1 (renamed from core/licenses/lucene-spatial-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/lucene-suggest-5.2.1.jar.sha1 (renamed from core/licenses/lucene-suggest-5.2.1.jar.sha1)0
-rw-r--r--distribution/licenses/netty-3.10.3.Final.jar.sha1 (renamed from core/licenses/netty-3.10.3.Final.jar.sha1)0
-rw-r--r--distribution/licenses/netty-LICENSE.txt (renamed from core/licenses/netty-LICENSE.txt)0
-rw-r--r--distribution/licenses/netty-NOTICE.txt (renamed from core/licenses/netty-NOTICE.txt)0
-rw-r--r--distribution/licenses/snakeyaml-1.12.jar.sha1 (renamed from core/licenses/snakeyaml-1.12.jar.sha1)0
-rw-r--r--distribution/licenses/snakeyaml-LICENSE.txt (renamed from core/licenses/snakeyaml-LICENSE.txt)0
-rw-r--r--distribution/licenses/snakeyaml-NOTICE.txt (renamed from core/licenses/snakeyaml-NOTICE.txt)0
-rw-r--r--distribution/licenses/spatial4j-0.4.1.jar.sha1 (renamed from core/licenses/spatial4j-0.4.1.jar.sha1)0
-rw-r--r--distribution/licenses/spatial4j-LICENSE.txt (renamed from core/licenses/spatial4j-LICENSE.txt)0
-rw-r--r--distribution/licenses/spatial4j-NOTICE.txt (renamed from core/licenses/spatial4j-NOTICE.txt)0
-rw-r--r--distribution/licenses/t-digest-3.0.jar.sha1 (renamed from core/licenses/t-digest-3.0.jar.sha1)0
-rw-r--r--distribution/licenses/t-digest-LICENSE.txt (renamed from core/licenses/t-digest-LICENSE.txt)0
-rw-r--r--distribution/licenses/t-digest-NOTICE.txt (renamed from core/licenses/t-digest-NOTICE.txt)0
-rw-r--r--distribution/pom.xml195
-rw-r--r--distribution/rpm/pom.xml390
-rw-r--r--distribution/rpm/src/main/packaging/init.d/elasticsearch (renamed from core/src/packaging/rpm/init.d/elasticsearch)1
-rw-r--r--distribution/rpm/src/main/packaging/packaging.properties (renamed from core/src/packaging/rpm/packaging.properties)0
-rwxr-xr-xdistribution/rpm/src/main/resources/logo/elastic.gifbin0 -> 1865 bytes
-rw-r--r--distribution/src/main/assemblies/common-bin.xml96
-rw-r--r--distribution/src/main/packaging/env/elasticsearch (renamed from core/src/packaging/common/env/elasticsearch)0
-rw-r--r--distribution/src/main/packaging/packaging.properties (renamed from core/src/packaging/common/packaging.properties)0
-rw-r--r--distribution/src/main/packaging/scripts/postinst (renamed from core/src/packaging/common/scripts/postinst)0
-rw-r--r--distribution/src/main/packaging/scripts/postrm119
-rw-r--r--distribution/src/main/packaging/scripts/preinst (renamed from core/src/packaging/common/scripts/preinst)0
-rw-r--r--distribution/src/main/packaging/scripts/prerm (renamed from core/src/packaging/common/scripts/prerm)0
-rw-r--r--distribution/src/main/packaging/systemd/elasticsearch.conf (renamed from core/src/packaging/common/systemd/elasticsearch.conf)0
-rw-r--r--distribution/src/main/packaging/systemd/elasticsearch.service (renamed from core/src/packaging/common/systemd/elasticsearch.service)2
-rw-r--r--distribution/src/main/packaging/systemd/sysctl/elasticsearch.conf (renamed from core/src/packaging/common/systemd/sysctl/elasticsearch.conf)0
-rw-r--r--distribution/src/main/resources/LICENSE.txt202
-rw-r--r--distribution/src/main/resources/NOTICE.txt5
-rw-r--r--distribution/src/main/resources/README.textile235
-rwxr-xr-xdistribution/src/main/resources/bin/elasticsearch (renamed from core/bin/elasticsearch)6
-rw-r--r--distribution/src/main/resources/bin/elasticsearch-service-mgr.exe (renamed from core/bin/elasticsearch-service-mgr.exe)bin104448 -> 104448 bytes
-rw-r--r--distribution/src/main/resources/bin/elasticsearch-service-x64.exe (renamed from core/bin/elasticsearch-service-x64.exe)bin103936 -> 103936 bytes
-rw-r--r--distribution/src/main/resources/bin/elasticsearch-service-x86.exe (renamed from core/bin/elasticsearch-service-x86.exe)bin80896 -> 80896 bytes
-rw-r--r--distribution/src/main/resources/bin/elasticsearch.bat (renamed from core/bin/elasticsearch.bat)0
-rw-r--r--distribution/src/main/resources/bin/elasticsearch.in.bat (renamed from core/bin/elasticsearch.in.bat)8
-rw-r--r--distribution/src/main/resources/bin/elasticsearch.in.sh (renamed from core/bin/elasticsearch.in.sh)8
-rwxr-xr-xdistribution/src/main/resources/bin/plugin (renamed from core/bin/plugin)0
-rw-r--r--distribution/src/main/resources/bin/plugin.bat (renamed from core/bin/plugin.bat)0
-rw-r--r--distribution/src/main/resources/bin/service.bat (renamed from core/bin/service.bat)0
-rw-r--r--distribution/src/main/resources/config/elasticsearch.yml (renamed from core/config/elasticsearch.yml)0
-rw-r--r--distribution/src/main/resources/config/logging.yml (renamed from core/config/logging.yml)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/20_tar_package.bats (renamed from core/src/test/resources/packaging/scripts/20_tar_package.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/25_tar_plugins.bats (renamed from core/src/test/resources/packaging/scripts/25_tar_plugins.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/30_deb_package.bats (renamed from core/src/test/resources/packaging/scripts/30_deb_package.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/40_rpm_package.bats (renamed from core/src/test/resources/packaging/scripts/40_rpm_package.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/50_plugins.bats (renamed from core/src/test/resources/packaging/scripts/50_plugins.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/60_systemd.bats (renamed from core/src/test/resources/packaging/scripts/60_systemd.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/70_sysv_initd.bats (renamed from core/src/test/resources/packaging/scripts/70_sysv_initd.bats)0
-rw-r--r--distribution/src/test/resources/packaging/scripts/packaging_test_utils.bash (renamed from core/src/test/resources/packaging/scripts/packaging_test_utils.bash)0
-rw-r--r--distribution/tar/pom.xml75
-rw-r--r--distribution/tar/src/main/assemblies/targz-bin.xml (renamed from core/src/main/assemblies/targz-bin.xml)2
-rw-r--r--distribution/zip/pom.xml131
-rw-r--r--distribution/zip/src/main/assemblies/zip-bin.xml (renamed from core/src/main/assemblies/zip-bin.xml)2
-rw-r--r--distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java (renamed from core/src/test/java/org/elasticsearch/test/rest/RestIT.java)0
-rw-r--r--pom.xml37
146 files changed, 1763 insertions, 681 deletions
diff --git a/TESTING.asciidoc b/TESTING.asciidoc
index e471bf858f..ccfa8d14de 100644
--- a/TESTING.asciidoc
+++ b/TESTING.asciidoc
@@ -318,4 +318,6 @@ environment before the tests are executed:
ES_CLEAN_BEFORE_TEST=true bats 30_deb_package.bats
---------------------------------------------------------------------------
-
+The current mode of execution is to copy all the packages that should be tested
+into one directory, then copy the bats files into the same directory and run
+those.
diff --git a/core/pom.xml b/core/pom.xml
index 122bfeea98..b507a36707 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -18,24 +18,9 @@
<properties>
- <!-- 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>
- <packaging.elasticsearch.systemd.dir>/usr/lib/systemd/system</packaging.elasticsearch.systemd.dir>
- <packaging.elasticsearch.systemd.sysctl.dir>/usr/lib/sysctl.d</packaging.elasticsearch.systemd.sysctl.dir>
- <packaging.elasticsearch.tmpfilesd.dir>/usr/lib/tmpfiles.d</packaging.elasticsearch.tmpfilesd.dir>
- <deb.sign>false</deb.sign>
- <deb.sign.method>dpkg-sig</deb.sign.method>
+ <skip.integ.tests>true</skip.integ.tests>
</properties>
-
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
@@ -230,12 +215,6 @@
<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>
@@ -431,532 +410,6 @@
</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.build.directory}/lib</src>
- <excludes>${project.build.finalName}-shaded.jar,${project.build.finalName}-sources.jar,${project.build.finalName}-tests.jar,${project.build.finalName}-test-sources.jar,slf4j-api-*.jar</excludes>
- <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>${packaging.elasticsearch.systemd.dir}/elasticsearch.service</dst>
- <type>file</type>
- </data>
- <!-- Adds systemd/sysctl.d configuration file -->
- <data>
- <src>${project.build.directory}/generated-packaging/deb/systemd/sysctl/elasticsearch.conf</src>
- <dst>${packaging.elasticsearch.systemd.sysctl.dir}/elasticsearch.conf</dst>
- <type>file</type>
- </data>
- <!-- Adds systemd/tmpfiles.d configuration file -->
- <data>
- <src>${project.build.directory}/generated-packaging/deb/systemd/elasticsearch.conf</src>
- <dst>${packaging.elasticsearch.tmpfilesd.dir}/elasticsearch.conf</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.3</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>
- <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>
- <excludes>
- <exclude>${project.build.finalName}-shaded.jar</exclude>
- <exclude>${project.build.finalName}-sources.jar</exclude>
- <exclude>${project.build.finalName}-tests.jar</exclude>
- <exclude>${project.build.finalName}-test-sources.jar</exclude>
- <exclude>slf4j-api-*.jar</exclude>
- </excludes>
- </source>
- <source>
- <location>${project.build.directory}/</location>
- <includes>
- <include>${project.build.finalName}.jar</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>${packaging.elasticsearch.systemd.dir}</directory>
- <directoryIncluded>false</directoryIncluded>
- <configuration>true</configuration>
- <sources>
- <source>
- <location>${project.build.directory}/generated-packaging/rpm/systemd</location>
- <includes>
- <include>elasticsearch.service</include>
- </includes>
- </source>
- </sources>
- </mapping>
- <!-- Adds systemd/sysctl.d configuration file -->
- <mapping>
- <directory>${packaging.elasticsearch.systemd.sysctl.dir}</directory>
- <configuration>true</configuration>
- <sources>
- <source>
- <location>${project.build.directory}/generated-packaging/rpm/systemd/sysctl</location>
- <includes>
- <include>elasticsearch.conf</include>
- </includes>
- </source>
- </sources>
- </mapping>
- <!-- Adds systemd/tmpfiles.d configuration file -->
- <mapping>
- <directory>${packaging.elasticsearch.tmpfilesd.dir}</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>
@@ -1003,32 +456,6 @@
</target>
</configuration>
</execution>
- <!-- start up external cluster -->
- <execution>
- <id>integ-setup</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster"/>
- </target>
- </configuration>
- </execution>
- <!-- shut down external cluster -->
- <execution>
- <id>integ-teardown</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
- </target>
- </configuration>
- </execution>
</executions>
</plugin>
</plugins>
@@ -1074,54 +501,5 @@
</activation>
<!-- not including license-maven-plugin is sufficent to expose default license -->
</profile>
- <profile>
- <id>release</id> <!-- named after the parents release profile to be activated -->
- <activation>
- <property>
- <name>package.rpm</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>rpm-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-rpm</id>
- <goals>
- <goal>attached-rpm</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>sign-rpm</id>
- <activation>
- <property>
- <name>rpm.sign</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>rpm-maven-plugin</artifactId>
- <configuration>
- <keyname>${gpg.key}</keyname>
- <keypath>${gpg.keyring}</keypath>
- <keyPassphrase>
- <passphrase>${gpg.passphrase}</passphrase>
- </keyPassphrase>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml
new file mode 100644
index 0000000000..f4cfd05efc
--- /dev/null
+++ b/distribution/deb/pom.xml
@@ -0,0 +1,280 @@
+<?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>
+
+ <artifactId>elasticsearch-deb</artifactId>
+ <packaging>deb</packaging>
+ <name>Elasticsearch DEB Distribution</name>
+
+ <properties>
+ <skip.integ.tests>true</skip.integ.tests>
+ <deb.sign>false</deb.sign>
+ <deb.sign.method>dpkg-sig</deb.sign.method>
+ </properties>
+
+ <build>
+
+ <filters>
+ <filter>${project.basedir}/src/main/packaging/packaging.properties</filter>
+ </filters>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <!-- 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/main/packaging/packaging.properties</filter>
+ <filter>${project.basedir}/src/main/packaging/packaging.properties</filter>
+ </filters>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/../src/main/packaging/</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>packaging.properties</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>${project.basedir}/src/main/packaging/</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>packaging.properties</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>${project.basedir}/../src/main/resources</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>
+ <!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md -->
+ <artifactId>jdeb</artifactId>
+ <groupId>org.vafer</groupId>
+ <version>1.4</version>
+ <configuration>
+ <!-- By default it should generates target/${artifactId}_${version}.deb but we get elasticsearch_2.0.0~SNAPSHOT_all.deb -->
+ <deb>${project.build.directory}/releases/elasticsearch-${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}/../src/main/resources/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>elasticsearch-${project.version}.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.build.directory}/../target/lib</src>
+ <excludes>${project.build.finalName}-shaded.jar,${project.build.finalName}-sources.jar,${project.build.finalName}-tests.jar,${project.build.finalName}-test-sources.jar,slf4j-api-*.jar</excludes>
+ <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>${packaging.elasticsearch.systemd.dir}/elasticsearch.service</dst>
+ <type>file</type>
+ </data>
+ <!-- Adds systemd/sysctl.d configuration file -->
+ <data>
+ <src>${project.build.directory}/generated-packaging/deb/systemd/sysctl/elasticsearch.conf</src>
+ <dst>${packaging.elasticsearch.systemd.sysctl.dir}/elasticsearch.conf</dst>
+ <type>file</type>
+ </data>
+ <!-- Adds systemd/tmpfiles.d configuration file -->
+ <data>
+ <src>${project.build.directory}/generated-packaging/deb/systemd/elasticsearch.conf</src>
+ <dst>${packaging.elasticsearch.tmpfilesd.dir}/elasticsearch.conf</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/main/resources/</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>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>check-license</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <condition property="licenses.exists">
+ <available file="${basedir}/../licenses" type="dir"/>
+ </condition>
+ <echo taskName="license check">Running license check</echo>
+ <!-- on windows checksums are calculated wrong -->
+ <exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" osfamily="unix" >
+ <arg value="check_license_and_sha.pl"/>
+ <arg value="--check"/>
+ <arg value="${basedir}/../licenses"/>
+ <arg value="${basedir}/target/releases/${project.build.finalName}.deb"/>
+ </exec>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/core/src/packaging/deb/copyright b/distribution/deb/src/main/packaging/copyright
index d93b550af9..d93b550af9 100644
--- a/core/src/packaging/deb/copyright
+++ b/distribution/deb/src/main/packaging/copyright
diff --git a/core/src/packaging/deb/init.d/elasticsearch b/distribution/deb/src/main/packaging/init.d/elasticsearch
index 0c5e91d83b..19198c9131 100755
--- a/core/src/packaging/deb/init.d/elasticsearch
+++ b/distribution/deb/src/main/packaging/init.d/elasticsearch
@@ -173,7 +173,7 @@ case "$1" in
fi
# Start Daemon
- start-stop-daemon --start -b --user "$ES_USER" -c "$ES_USER" --pidfile "$PID_FILE" --exec $DAEMON -- $DAEMON_OPTS
+ start-stop-daemon -d $ES_HOME --start -b --user "$ES_USER" -c "$ES_USER" --pidfile "$PID_FILE" --exec $DAEMON -- $DAEMON_OPTS
return=$?
if [ $return -eq 0 ]
then
diff --git a/core/src/packaging/deb/lintian/elasticsearch b/distribution/deb/src/main/packaging/lintian/elasticsearch
index 1ca52eaed2..1ca52eaed2 100644
--- a/core/src/packaging/deb/lintian/elasticsearch
+++ b/distribution/deb/src/main/packaging/lintian/elasticsearch
diff --git a/core/src/packaging/deb/packaging.properties b/distribution/deb/src/main/packaging/packaging.properties
index f268cde4ca..f268cde4ca 100644
--- a/core/src/packaging/deb/packaging.properties
+++ b/distribution/deb/src/main/packaging/packaging.properties
diff --git a/core/src/packaging/deb/scripts/conffiles b/distribution/deb/src/main/packaging/scripts/conffiles
index 9f65841678..9f65841678 100644
--- a/core/src/packaging/deb/scripts/conffiles
+++ b/distribution/deb/src/main/packaging/scripts/conffiles
diff --git a/core/src/packaging/deb/scripts/control b/distribution/deb/src/main/packaging/scripts/control
index b98ce2066c..b98ce2066c 100644
--- a/core/src/packaging/deb/scripts/control
+++ b/distribution/deb/src/main/packaging/scripts/control
diff --git a/core/licenses/HdrHistogram-2.1.5.jar.sha1 b/distribution/licenses/HdrHistogram-2.1.5.jar.sha1
index 8a74670eab..8a74670eab 100644
--- a/core/licenses/HdrHistogram-2.1.5.jar.sha1
+++ b/distribution/licenses/HdrHistogram-2.1.5.jar.sha1
diff --git a/core/licenses/HdrHistogram-LICENSE.txt b/distribution/licenses/HdrHistogram-LICENSE.txt
index c9473ed5fa..c9473ed5fa 100644
--- a/core/licenses/HdrHistogram-LICENSE.txt
+++ b/distribution/licenses/HdrHistogram-LICENSE.txt
diff --git a/core/licenses/HdrHistogram-NOTICE.txt b/distribution/licenses/HdrHistogram-NOTICE.txt
index e69de29bb2..e69de29bb2 100644
--- a/core/licenses/HdrHistogram-NOTICE.txt
+++ b/distribution/licenses/HdrHistogram-NOTICE.txt
diff --git a/core/licenses/antlr-runtime-3.5.jar.sha1 b/distribution/licenses/antlr-runtime-3.5.jar.sha1
index d90b777a4a..d90b777a4a 100644
--- a/core/licenses/antlr-runtime-3.5.jar.sha1
+++ b/distribution/licenses/antlr-runtime-3.5.jar.sha1
diff --git a/core/licenses/antlr-runtime-LICENSE.txt b/distribution/licenses/antlr-runtime-LICENSE.txt
index a6e3ad0850..a6e3ad0850 100644
--- a/core/licenses/antlr-runtime-LICENSE.txt
+++ b/distribution/licenses/antlr-runtime-LICENSE.txt
diff --git a/core/licenses/antlr-runtime-NOTICE.txt b/distribution/licenses/antlr-runtime-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/antlr-runtime-NOTICE.txt
+++ b/distribution/licenses/antlr-runtime-NOTICE.txt
diff --git a/core/licenses/apache-log4j-extras-1.2.17.jar.sha1 b/distribution/licenses/apache-log4j-extras-1.2.17.jar.sha1
index 147721b891..147721b891 100644
--- a/core/licenses/apache-log4j-extras-1.2.17.jar.sha1
+++ b/distribution/licenses/apache-log4j-extras-1.2.17.jar.sha1
diff --git a/core/licenses/apache-log4j-extras-DEPENDENCIES b/distribution/licenses/apache-log4j-extras-DEPENDENCIES
index 499b71ef33..499b71ef33 100644
--- a/core/licenses/apache-log4j-extras-DEPENDENCIES
+++ b/distribution/licenses/apache-log4j-extras-DEPENDENCIES
diff --git a/core/licenses/apache-log4j-extras-LICENSE b/distribution/licenses/apache-log4j-extras-LICENSE
index 6279e5206d..6279e5206d 100644
--- a/core/licenses/apache-log4j-extras-LICENSE
+++ b/distribution/licenses/apache-log4j-extras-LICENSE
diff --git a/core/licenses/apache-log4j-extras-NOTICE b/distribution/licenses/apache-log4j-extras-NOTICE
index e02b7500ec..e02b7500ec 100644
--- a/core/licenses/apache-log4j-extras-NOTICE
+++ b/distribution/licenses/apache-log4j-extras-NOTICE
diff --git a/core/licenses/asm-4.1.jar.sha1 b/distribution/licenses/asm-4.1.jar.sha1
index fca9878081..fca9878081 100644
--- a/core/licenses/asm-4.1.jar.sha1
+++ b/distribution/licenses/asm-4.1.jar.sha1
diff --git a/core/licenses/asm-LICENSE.txt b/distribution/licenses/asm-LICENSE.txt
index afb064f2f2..afb064f2f2 100644
--- a/core/licenses/asm-LICENSE.txt
+++ b/distribution/licenses/asm-LICENSE.txt
diff --git a/core/licenses/asm-NOTICE.txt b/distribution/licenses/asm-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/asm-NOTICE.txt
+++ b/distribution/licenses/asm-NOTICE.txt
diff --git a/core/licenses/asm-commons-4.1.jar.sha1 b/distribution/licenses/asm-commons-4.1.jar.sha1
index 2b534751bf..2b534751bf 100644
--- a/core/licenses/asm-commons-4.1.jar.sha1
+++ b/distribution/licenses/asm-commons-4.1.jar.sha1
diff --git a/core/licenses/asm-commons-LICENSE.txt b/distribution/licenses/asm-commons-LICENSE.txt
index afb064f2f2..afb064f2f2 100644
--- a/core/licenses/asm-commons-LICENSE.txt
+++ b/distribution/licenses/asm-commons-LICENSE.txt
diff --git a/core/licenses/asm-commons-NOTICE.txt b/distribution/licenses/asm-commons-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/asm-commons-NOTICE.txt
+++ b/distribution/licenses/asm-commons-NOTICE.txt
diff --git a/core/licenses/commons-cli-1.2.jar.sha1 b/distribution/licenses/commons-cli-1.2.jar.sha1
index 6dacb321cd..6dacb321cd 100644
--- a/core/licenses/commons-cli-1.2.jar.sha1
+++ b/distribution/licenses/commons-cli-1.2.jar.sha1
diff --git a/core/licenses/commons-cli-LICENSE.txt b/distribution/licenses/commons-cli-LICENSE.txt
index 57bc88a15a..57bc88a15a 100644
--- a/core/licenses/commons-cli-LICENSE.txt
+++ b/distribution/licenses/commons-cli-LICENSE.txt
diff --git a/core/licenses/commons-cli-NOTICE.txt b/distribution/licenses/commons-cli-NOTICE.txt
index 72eb32a902..72eb32a902 100644
--- a/core/licenses/commons-cli-NOTICE.txt
+++ b/distribution/licenses/commons-cli-NOTICE.txt
diff --git a/core/licenses/commons-lang3-3.3.2.jar.sha1 b/distribution/licenses/commons-lang3-3.3.2.jar.sha1
index bdd913cf23..bdd913cf23 100644
--- a/core/licenses/commons-lang3-3.3.2.jar.sha1
+++ b/distribution/licenses/commons-lang3-3.3.2.jar.sha1
diff --git a/core/licenses/commons-lang3-LICENSE.txt b/distribution/licenses/commons-lang3-LICENSE.txt
index d645695673..d645695673 100644
--- a/core/licenses/commons-lang3-LICENSE.txt
+++ b/distribution/licenses/commons-lang3-LICENSE.txt
diff --git a/core/licenses/commons-lang3-NOTICE.txt b/distribution/licenses/commons-lang3-NOTICE.txt
index 078282451b..078282451b 100644
--- a/core/licenses/commons-lang3-NOTICE.txt
+++ b/distribution/licenses/commons-lang3-NOTICE.txt
diff --git a/core/licenses/compiler-0.8.13.jar.sha1 b/distribution/licenses/compiler-0.8.13.jar.sha1
index dc15a10b03..dc15a10b03 100644
--- a/core/licenses/compiler-0.8.13.jar.sha1
+++ b/distribution/licenses/compiler-0.8.13.jar.sha1
diff --git a/core/licenses/compiler-LICENSE.txt b/distribution/licenses/compiler-LICENSE.txt
index ac68303cc1..ac68303cc1 100644
--- a/core/licenses/compiler-LICENSE.txt
+++ b/distribution/licenses/compiler-LICENSE.txt
diff --git a/core/licenses/compiler-NOTICE.txt b/distribution/licenses/compiler-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/compiler-NOTICE.txt
+++ b/distribution/licenses/compiler-NOTICE.txt
diff --git a/core/licenses/compress-lzf-1.0.2.jar.sha1 b/distribution/licenses/compress-lzf-1.0.2.jar.sha1
index 14e4a7f147..14e4a7f147 100644
--- a/core/licenses/compress-lzf-1.0.2.jar.sha1
+++ b/distribution/licenses/compress-lzf-1.0.2.jar.sha1
diff --git a/core/licenses/compress-lzf-LICENSE b/distribution/licenses/compress-lzf-LICENSE
index 8d6813f770..8d6813f770 100644
--- a/core/licenses/compress-lzf-LICENSE
+++ b/distribution/licenses/compress-lzf-LICENSE
diff --git a/core/licenses/compress-lzf-NOTICE b/distribution/licenses/compress-lzf-NOTICE
index 382a800c80..382a800c80 100644
--- a/core/licenses/compress-lzf-NOTICE
+++ b/distribution/licenses/compress-lzf-NOTICE
diff --git a/core/licenses/groovy-all-2.4.4-indy.jar.sha1 b/distribution/licenses/groovy-all-2.4.4-indy.jar.sha1
index 458716cefd..458716cefd 100644
--- a/core/licenses/groovy-all-2.4.4-indy.jar.sha1
+++ b/distribution/licenses/groovy-all-2.4.4-indy.jar.sha1
diff --git a/core/licenses/groovy-all-LICENSE-ANTLR.txt b/distribution/licenses/groovy-all-LICENSE-ANTLR.txt
index d62cc1ab2d..d62cc1ab2d 100644
--- a/core/licenses/groovy-all-LICENSE-ANTLR.txt
+++ b/distribution/licenses/groovy-all-LICENSE-ANTLR.txt
diff --git a/core/licenses/groovy-all-LICENSE-ASM.txt b/distribution/licenses/groovy-all-LICENSE-ASM.txt
index ae898f7554..ae898f7554 100644
--- a/core/licenses/groovy-all-LICENSE-ASM.txt
+++ b/distribution/licenses/groovy-all-LICENSE-ASM.txt
diff --git a/core/licenses/groovy-all-LICENSE-CLI.txt b/distribution/licenses/groovy-all-LICENSE-CLI.txt
index 57bc88a15a..57bc88a15a 100644
--- a/core/licenses/groovy-all-LICENSE-CLI.txt
+++ b/distribution/licenses/groovy-all-LICENSE-CLI.txt
diff --git a/core/licenses/groovy-all-LICENSE-JSR223.txt b/distribution/licenses/groovy-all-LICENSE-JSR223.txt
index b750c0f5f7..b750c0f5f7 100644
--- a/core/licenses/groovy-all-LICENSE-JSR223.txt
+++ b/distribution/licenses/groovy-all-LICENSE-JSR223.txt
diff --git a/core/licenses/groovy-all-LICENSE.txt b/distribution/licenses/groovy-all-LICENSE.txt
index e0908d496f..e0908d496f 100644
--- a/core/licenses/groovy-all-LICENSE.txt
+++ b/distribution/licenses/groovy-all-LICENSE.txt
diff --git a/core/licenses/groovy-all-NOTICE.txt b/distribution/licenses/groovy-all-NOTICE.txt
index 72eb32a902..72eb32a902 100644
--- a/core/licenses/groovy-all-NOTICE.txt
+++ b/distribution/licenses/groovy-all-NOTICE.txt
diff --git a/core/licenses/guava-18.0.jar.sha1 b/distribution/licenses/guava-18.0.jar.sha1
index 4e97237b0b..4e97237b0b 100644
--- a/core/licenses/guava-18.0.jar.sha1
+++ b/distribution/licenses/guava-18.0.jar.sha1
diff --git a/core/licenses/guava-LICENSE.txt b/distribution/licenses/guava-LICENSE.txt
index d645695673..d645695673 100644
--- a/core/licenses/guava-LICENSE.txt
+++ b/distribution/licenses/guava-LICENSE.txt
diff --git a/core/licenses/guava-NOTICE.txt b/distribution/licenses/guava-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/guava-NOTICE.txt
+++ b/distribution/licenses/guava-NOTICE.txt
diff --git a/core/licenses/hppc-0.7.1.jar.sha1 b/distribution/licenses/hppc-0.7.1.jar.sha1
index d3e00e1c47..d3e00e1c47 100644
--- a/core/licenses/hppc-0.7.1.jar.sha1
+++ b/distribution/licenses/hppc-0.7.1.jar.sha1
diff --git a/core/licenses/hppc-LICENSE.txt b/distribution/licenses/hppc-LICENSE.txt
index 31467575cd..31467575cd 100644
--- a/core/licenses/hppc-LICENSE.txt
+++ b/distribution/licenses/hppc-LICENSE.txt
diff --git a/core/licenses/hppc-NOTICE.txt b/distribution/licenses/hppc-NOTICE.txt
index 1d8842c0bc..1d8842c0bc 100644
--- a/core/licenses/hppc-NOTICE.txt
+++ b/distribution/licenses/hppc-NOTICE.txt
diff --git a/core/licenses/jackson-LICENSE b/distribution/licenses/jackson-LICENSE
index f5f45d26a4..f5f45d26a4 100644
--- a/core/licenses/jackson-LICENSE
+++ b/distribution/licenses/jackson-LICENSE
diff --git a/core/licenses/jackson-NOTICE b/distribution/licenses/jackson-NOTICE
index 4c976b7b4c..4c976b7b4c 100644
--- a/core/licenses/jackson-NOTICE
+++ b/distribution/licenses/jackson-NOTICE
diff --git a/core/licenses/jackson-core-2.5.3.jar.sha1 b/distribution/licenses/jackson-core-2.5.3.jar.sha1
index 190d78c0fc..190d78c0fc 100644
--- a/core/licenses/jackson-core-2.5.3.jar.sha1
+++ b/distribution/licenses/jackson-core-2.5.3.jar.sha1
diff --git a/core/licenses/jackson-dataformat-cbor-2.5.3.jar.sha1 b/distribution/licenses/jackson-dataformat-cbor-2.5.3.jar.sha1
index a93edd273b..a93edd273b 100644
--- a/core/licenses/jackson-dataformat-cbor-2.5.3.jar.sha1
+++ b/distribution/licenses/jackson-dataformat-cbor-2.5.3.jar.sha1
diff --git a/core/licenses/jackson-dataformat-smile-2.5.3.jar.sha1 b/distribution/licenses/jackson-dataformat-smile-2.5.3.jar.sha1
index 48a810b823..48a810b823 100644
--- a/core/licenses/jackson-dataformat-smile-2.5.3.jar.sha1
+++ b/distribution/licenses/jackson-dataformat-smile-2.5.3.jar.sha1
diff --git a/core/licenses/jackson-dataformat-yaml-2.5.3.jar.sha1 b/distribution/licenses/jackson-dataformat-yaml-2.5.3.jar.sha1
index 7e988feac9..7e988feac9 100644
--- a/core/licenses/jackson-dataformat-yaml-2.5.3.jar.sha1
+++ b/distribution/licenses/jackson-dataformat-yaml-2.5.3.jar.sha1
diff --git a/core/licenses/jna-4.1.0.jar.sha1 b/distribution/licenses/jna-4.1.0.jar.sha1
index 09ad909492..09ad909492 100644
--- a/core/licenses/jna-4.1.0.jar.sha1
+++ b/distribution/licenses/jna-4.1.0.jar.sha1
diff --git a/core/licenses/jna-LICENSE.txt b/distribution/licenses/jna-LICENSE.txt
index f433b1a53f..f433b1a53f 100644
--- a/core/licenses/jna-LICENSE.txt
+++ b/distribution/licenses/jna-LICENSE.txt
diff --git a/core/licenses/jna-NOTICE.txt b/distribution/licenses/jna-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/jna-NOTICE.txt
+++ b/distribution/licenses/jna-NOTICE.txt
diff --git a/core/licenses/joda-convert-1.2.jar.sha1 b/distribution/licenses/joda-convert-1.2.jar.sha1
index 37c3e87058..37c3e87058 100644
--- a/core/licenses/joda-convert-1.2.jar.sha1
+++ b/distribution/licenses/joda-convert-1.2.jar.sha1
diff --git a/core/licenses/joda-convert-LICENSE.txt b/distribution/licenses/joda-convert-LICENSE.txt
index 75b52484ea..75b52484ea 100644
--- a/core/licenses/joda-convert-LICENSE.txt
+++ b/distribution/licenses/joda-convert-LICENSE.txt
diff --git a/core/licenses/joda-convert-NOTICE.txt b/distribution/licenses/joda-convert-NOTICE.txt
index ac95834168..dffbcf31ca 100644
--- a/core/licenses/joda-convert-NOTICE.txt
+++ b/distribution/licenses/joda-convert-NOTICE.txt
@@ -1,5 +1,5 @@
-=============================================================================
-= NOTICE file corresponding to section 4d of the Apache License Version 2.0 =
-=============================================================================
-This product includes software developed by
-Joda.org (http://www.joda.org/).
+=============================================================================
+= NOTICE file corresponding to section 4d of the Apache License Version 2.0 =
+=============================================================================
+This product includes software developed by
+Joda.org (http://www.joda.org/).
diff --git a/core/licenses/joda-time-2.8.jar.sha1 b/distribution/licenses/joda-time-2.8.jar.sha1
index 4e181bf932..4e181bf932 100644
--- a/core/licenses/joda-time-2.8.jar.sha1
+++ b/distribution/licenses/joda-time-2.8.jar.sha1
diff --git a/core/licenses/joda-time-LICENSE.txt b/distribution/licenses/joda-time-LICENSE.txt
index 75b52484ea..75b52484ea 100644
--- a/core/licenses/joda-time-LICENSE.txt
+++ b/distribution/licenses/joda-time-LICENSE.txt
diff --git a/core/licenses/joda-time-NOTICE.txt b/distribution/licenses/joda-time-NOTICE.txt
index ac95834168..dffbcf31ca 100644
--- a/core/licenses/joda-time-NOTICE.txt
+++ b/distribution/licenses/joda-time-NOTICE.txt
@@ -1,5 +1,5 @@
-=============================================================================
-= NOTICE file corresponding to section 4d of the Apache License Version 2.0 =
-=============================================================================
-This product includes software developed by
-Joda.org (http://www.joda.org/).
+=============================================================================
+= NOTICE file corresponding to section 4d of the Apache License Version 2.0 =
+=============================================================================
+This product includes software developed by
+Joda.org (http://www.joda.org/).
diff --git a/core/licenses/jsr166e-1.1.0.jar.sha1 b/distribution/licenses/jsr166e-1.1.0.jar.sha1
index 8457fdff43..8457fdff43 100644
--- a/core/licenses/jsr166e-1.1.0.jar.sha1
+++ b/distribution/licenses/jsr166e-1.1.0.jar.sha1
diff --git a/core/licenses/jsr166e-LICENSE b/distribution/licenses/jsr166e-LICENSE
index 897fe057df..897fe057df 100644
--- a/core/licenses/jsr166e-LICENSE
+++ b/distribution/licenses/jsr166e-LICENSE
diff --git a/core/licenses/jsr166e-NOTICE b/distribution/licenses/jsr166e-NOTICE
index 8b13789179..8b13789179 100644
--- a/core/licenses/jsr166e-NOTICE
+++ b/distribution/licenses/jsr166e-NOTICE
diff --git a/core/licenses/jts-1.13.jar.sha1 b/distribution/licenses/jts-1.13.jar.sha1
index 2899139aab..2899139aab 100644
--- a/core/licenses/jts-1.13.jar.sha1
+++ b/distribution/licenses/jts-1.13.jar.sha1
diff --git a/core/licenses/jts-LICENSE.txt b/distribution/licenses/jts-LICENSE.txt
index 65c5ca88a6..65c5ca88a6 100644
--- a/core/licenses/jts-LICENSE.txt
+++ b/distribution/licenses/jts-LICENSE.txt
diff --git a/core/licenses/jts-NOTICE.txt b/distribution/licenses/jts-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/jts-NOTICE.txt
+++ b/distribution/licenses/jts-NOTICE.txt
diff --git a/core/licenses/log4j-1.2.17.jar.sha1 b/distribution/licenses/log4j-1.2.17.jar.sha1
index 383110e29f..383110e29f 100644
--- a/core/licenses/log4j-1.2.17.jar.sha1
+++ b/distribution/licenses/log4j-1.2.17.jar.sha1
diff --git a/core/licenses/log4j-LICENSE b/distribution/licenses/log4j-LICENSE
index 6279e5206d..6279e5206d 100644
--- a/core/licenses/log4j-LICENSE
+++ b/distribution/licenses/log4j-LICENSE
diff --git a/core/licenses/log4j-NOTICE b/distribution/licenses/log4j-NOTICE
index 0375732360..0375732360 100644
--- a/core/licenses/log4j-NOTICE
+++ b/distribution/licenses/log4j-NOTICE
diff --git a/core/licenses/lucene-LICENSE.txt b/distribution/licenses/lucene-LICENSE.txt
index 28b134f5f8..28b134f5f8 100644
--- a/core/licenses/lucene-LICENSE.txt
+++ b/distribution/licenses/lucene-LICENSE.txt
diff --git a/core/licenses/lucene-NOTICE.txt b/distribution/licenses/lucene-NOTICE.txt
index ecf08201a5..ecf08201a5 100644
--- a/core/licenses/lucene-NOTICE.txt
+++ b/distribution/licenses/lucene-NOTICE.txt
diff --git a/core/licenses/lucene-analyzers-common-5.2.1.jar.sha1 b/distribution/licenses/lucene-analyzers-common-5.2.1.jar.sha1
index 48f8e58147..48f8e58147 100644
--- a/core/licenses/lucene-analyzers-common-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-analyzers-common-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-backward-codecs-5.2.1.jar.sha1 b/distribution/licenses/lucene-backward-codecs-5.2.1.jar.sha1
index f01d68718f..f01d68718f 100644
--- a/core/licenses/lucene-backward-codecs-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-backward-codecs-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-core-5.2.1.jar.sha1 b/distribution/licenses/lucene-core-5.2.1.jar.sha1
index cbebe2b858..cbebe2b858 100644
--- a/core/licenses/lucene-core-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-core-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-expressions-5.2.1.jar.sha1 b/distribution/licenses/lucene-expressions-5.2.1.jar.sha1
index 1823826d96..1823826d96 100644
--- a/core/licenses/lucene-expressions-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-expressions-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-grouping-5.2.1.jar.sha1 b/distribution/licenses/lucene-grouping-5.2.1.jar.sha1
index 23cea6c545..23cea6c545 100644
--- a/core/licenses/lucene-grouping-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-grouping-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-highlighter-5.2.1.jar.sha1 b/distribution/licenses/lucene-highlighter-5.2.1.jar.sha1
index 67e9e8ee40..67e9e8ee40 100644
--- a/core/licenses/lucene-highlighter-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-highlighter-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-join-5.2.1.jar.sha1 b/distribution/licenses/lucene-join-5.2.1.jar.sha1
index 00c2c22e08..00c2c22e08 100644
--- a/core/licenses/lucene-join-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-join-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-memory-5.2.1.jar.sha1 b/distribution/licenses/lucene-memory-5.2.1.jar.sha1
index 93c743ba1a..93c743ba1a 100644
--- a/core/licenses/lucene-memory-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-memory-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-misc-5.2.1.jar.sha1 b/distribution/licenses/lucene-misc-5.2.1.jar.sha1
index 227b55c2d2..227b55c2d2 100644
--- a/core/licenses/lucene-misc-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-misc-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-queries-5.2.1.jar.sha1 b/distribution/licenses/lucene-queries-5.2.1.jar.sha1
index 026e3a9032..026e3a9032 100644
--- a/core/licenses/lucene-queries-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-queries-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-queryparser-5.2.1.jar.sha1 b/distribution/licenses/lucene-queryparser-5.2.1.jar.sha1
index a2d8e2cc29..a2d8e2cc29 100644
--- a/core/licenses/lucene-queryparser-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-queryparser-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-sandbox-5.2.1.jar.sha1 b/distribution/licenses/lucene-sandbox-5.2.1.jar.sha1
index 3caf307207..3caf307207 100644
--- a/core/licenses/lucene-sandbox-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-sandbox-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-spatial-5.2.1.jar.sha1 b/distribution/licenses/lucene-spatial-5.2.1.jar.sha1
index 20f07e938c..20f07e938c 100644
--- a/core/licenses/lucene-spatial-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-spatial-5.2.1.jar.sha1
diff --git a/core/licenses/lucene-suggest-5.2.1.jar.sha1 b/distribution/licenses/lucene-suggest-5.2.1.jar.sha1
index 12a585d32b..12a585d32b 100644
--- a/core/licenses/lucene-suggest-5.2.1.jar.sha1
+++ b/distribution/licenses/lucene-suggest-5.2.1.jar.sha1
diff --git a/core/licenses/netty-3.10.3.Final.jar.sha1 b/distribution/licenses/netty-3.10.3.Final.jar.sha1
index 097fe6e844..097fe6e844 100644
--- a/core/licenses/netty-3.10.3.Final.jar.sha1
+++ b/distribution/licenses/netty-3.10.3.Final.jar.sha1
diff --git a/core/licenses/netty-LICENSE.txt b/distribution/licenses/netty-LICENSE.txt
index d645695673..d645695673 100644
--- a/core/licenses/netty-LICENSE.txt
+++ b/distribution/licenses/netty-LICENSE.txt
diff --git a/core/licenses/netty-NOTICE.txt b/distribution/licenses/netty-NOTICE.txt
index 5b2e21acea..5b2e21acea 100644
--- a/core/licenses/netty-NOTICE.txt
+++ b/distribution/licenses/netty-NOTICE.txt
diff --git a/core/licenses/snakeyaml-1.12.jar.sha1 b/distribution/licenses/snakeyaml-1.12.jar.sha1
index b57cf105f2..b57cf105f2 100644
--- a/core/licenses/snakeyaml-1.12.jar.sha1
+++ b/distribution/licenses/snakeyaml-1.12.jar.sha1
diff --git a/core/licenses/snakeyaml-LICENSE.txt b/distribution/licenses/snakeyaml-LICENSE.txt
index d9a10c0d8e..d9a10c0d8e 100644
--- a/core/licenses/snakeyaml-LICENSE.txt
+++ b/distribution/licenses/snakeyaml-LICENSE.txt
diff --git a/core/licenses/snakeyaml-NOTICE.txt b/distribution/licenses/snakeyaml-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/snakeyaml-NOTICE.txt
+++ b/distribution/licenses/snakeyaml-NOTICE.txt
diff --git a/core/licenses/spatial4j-0.4.1.jar.sha1 b/distribution/licenses/spatial4j-0.4.1.jar.sha1
index 1c2883bd83..1c2883bd83 100644
--- a/core/licenses/spatial4j-0.4.1.jar.sha1
+++ b/distribution/licenses/spatial4j-0.4.1.jar.sha1
diff --git a/core/licenses/spatial4j-LICENSE.txt b/distribution/licenses/spatial4j-LICENSE.txt
index d645695673..d645695673 100644
--- a/core/licenses/spatial4j-LICENSE.txt
+++ b/distribution/licenses/spatial4j-LICENSE.txt
diff --git a/core/licenses/spatial4j-NOTICE.txt b/distribution/licenses/spatial4j-NOTICE.txt
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/core/licenses/spatial4j-NOTICE.txt
+++ b/distribution/licenses/spatial4j-NOTICE.txt
diff --git a/core/licenses/t-digest-3.0.jar.sha1 b/distribution/licenses/t-digest-3.0.jar.sha1
index 6deec27800..6deec27800 100644
--- a/core/licenses/t-digest-3.0.jar.sha1
+++ b/distribution/licenses/t-digest-3.0.jar.sha1
diff --git a/core/licenses/t-digest-LICENSE.txt b/distribution/licenses/t-digest-LICENSE.txt
index e06d208186..e06d208186 100644
--- a/core/licenses/t-digest-LICENSE.txt
+++ b/distribution/licenses/t-digest-LICENSE.txt
diff --git a/core/licenses/t-digest-NOTICE.txt b/distribution/licenses/t-digest-NOTICE.txt
index 319f7b55cb..319f7b55cb 100644
--- a/core/licenses/t-digest-NOTICE.txt
+++ b/distribution/licenses/t-digest-NOTICE.txt
diff --git a/distribution/pom.xml b/distribution/pom.xml
new file mode 100644
index 0000000000..dff4457433
--- /dev/null
+++ b/distribution/pom.xml
@@ -0,0 +1,195 @@
+<?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</groupId>
+ <artifactId>elasticsearch-parent</artifactId>
+ <version>2.0.0-beta1-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.elasticsearch.distribution</groupId>
+ <artifactId>elasticsearch-distribution</artifactId>
+ <packaging>pom</packaging>
+ <name>Elasticsearch Distribution</name>
+
+ <properties>
+ <skipTests>true</skipTests>
+ <!-- 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>
+ <packaging.elasticsearch.systemd.dir>/usr/lib/systemd/system</packaging.elasticsearch.systemd.dir>
+ <packaging.elasticsearch.systemd.sysctl.dir>/usr/lib/sysctl.d</packaging.elasticsearch.systemd.sysctl.dir>
+ <packaging.elasticsearch.tmpfilesd.dir>/usr/lib/tmpfiles.d</packaging.elasticsearch.tmpfilesd.dir>
+
+ <!-- rpmbuild location : default to /usr/bin/rpmbuild -->
+ <packaging.rpm.rpmbuild>/usr/bin/rpmbuild</packaging.rpm.rpmbuild>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.elasticsearch</groupId>
+ <artifactId>elasticsearch</artifactId>
+ </dependency>
+
+ <!-- They were marked as optional in core so we need to explicitly add them -->
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-expressions</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.spatial4j</groupId>
+ <artifactId>spatial4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.vividsolutions</groupId>
+ <artifactId>jts</artifactId>
+ </dependency>
+ <!-- needed for templating -->
+ <dependency>
+ <groupId>com.github.spullara.mustache.java</groupId>
+ <artifactId>compiler</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <classifier>indy</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>apache-log4j-extras</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.carrotsearch.randomizedtesting</groupId>
+ <artifactId>randomizedtesting-runner</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>elasticsearch-${project.version}</finalName>
+ <plugins>
+ <!-- We copy libs for deb and rpm -->
+ <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>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <!-- <version>1.8</version> -->
+ <!-- <configuration><skip>true</skip></configuration> -->
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <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}/../src/main/resources/bin</directory>
+ <filtering>true</filtering>
+ <excludes>
+ <exclude>*.exe</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>${project.basedir}/../src/main/resources/bin</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>*.exe</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <modules>
+ <module>tar</module>
+ <module>zip</module>
+ <module>deb</module>
+ </modules>
+
+ <profiles>
+ <profile>
+ <id>macos_brew</id>
+ <activation>
+ <file>
+ <!-- Folks having /usr/local/bin/rpmbuild available will be able to build the rpm module -->
+ <exists>/usr/local/bin/rpmbuild</exists>
+ </file>
+ </activation>
+ <modules>
+ <module>rpm</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>rpm</id>
+ <activation>
+ <file>
+ <!-- Folks having /usr/bin/rpmbuild available will be able to build the rpm module -->
+ <exists>${packaging.rpm.rpmbuild}</exists>
+ </file>
+ </activation>
+ <modules>
+ <module>rpm</module>
+ </modules>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml
new file mode 100644
index 0000000000..9cb3e29859
--- /dev/null
+++ b/distribution/rpm/pom.xml
@@ -0,0 +1,390 @@
+<?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>
+
+ <artifactId>elasticsearch-rpm</artifactId>
+ <name>Elasticsearch RPM Distribution</name>
+ <packaging>rpm</packaging>
+
+ <properties>
+ <skip.integ.tests>true</skip.integ.tests>
+ </properties>
+
+ <build>
+
+ <filters>
+ <filter>${project.basedir}/src/main/packaging/packaging.properties</filter>
+ </filters>
+
+ <plugins>
+ <!-- No need to have some source jar for the RPM -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.4</version>
+ <configuration><skipSource>true</skipSource></configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <!-- 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/main/packaging/packaging.properties</filter>
+ <filter>${project.basedir}/src/main/packaging/packaging.properties</filter>
+ </filters>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/../src/main/packaging/</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>packaging.properties</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>${project.basedir}/src/main/packaging/</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>packaging.properties</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>${project.basedir}/../src/main/resources</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>
+ <!-- Rpm Packaging -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <configuration>
+ <disabled>false</disabled>
+ <name>elasticsearch</name>
+ <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>
+ <icon>${project.basedir}/src/main/resources/logo/elastic.gif</icon>
+ <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}/../src/main/resources/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>
+ <excludes>
+ <exclude>${project.build.finalName}-shaded.jar</exclude>
+ <exclude>${project.build.finalName}-sources.jar</exclude>
+ <exclude>${project.build.finalName}-tests.jar</exclude>
+ <exclude>${project.build.finalName}-test-sources.jar</exclude>
+ <exclude>slf4j-api-*.jar</exclude>
+ </excludes>
+ </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>${packaging.elasticsearch.systemd.dir}</directory>
+ <directoryIncluded>false</directoryIncluded>
+ <configuration>true</configuration>
+ <sources>
+ <source>
+ <location>${project.build.directory}/generated-packaging/rpm/systemd</location>
+ <includes>
+ <include>elasticsearch.service</include>
+ </includes>
+ </source>
+ </sources>
+ </mapping>
+ <!-- Adds systemd/sysctl.d configuration file -->
+ <mapping>
+ <directory>${packaging.elasticsearch.systemd.sysctl.dir}</directory>
+ <configuration>true</configuration>
+ <sources>
+ <source>
+ <location>${project.build.directory}/generated-packaging/rpm/systemd/sysctl</location>
+ <includes>
+ <include>elasticsearch.conf</include>
+ </includes>
+ </source>
+ </sources>
+ </mapping>
+ <!-- Adds systemd/tmpfiles.d configuration file -->
+ <mapping>
+ <directory>${packaging.elasticsearch.tmpfilesd.dir}</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>${project.basedir}/../src/main/resources/</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-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-rpm</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <type>${project.packaging}</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/releases/</outputDirectory>
+ <destFileName>elasticsearch-${project.version}.rpm</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>check-license</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <condition property="licenses.exists">
+ <available file="${basedir}/../licenses" type="dir"/>
+ </condition>
+ <echo taskName="license check">Running license check</echo>
+ <!-- on windows checksums are calculated wrong -->
+ <exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" osfamily="unix" >
+ <arg value="check_license_and_sha.pl"/>
+ <arg value="--check"/>
+ <arg value="${basedir}/../licenses"/>
+ <arg value="${basedir}/target/releases/${project.build.finalName}.rpm"/>
+ </exec>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <activation>
+ <property>
+ <name>package.rpm</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-rpm</id>
+ <goals>
+ <goal>attached-rpm</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>sign-rpm</id>
+ <activation>
+ <property>
+ <name>rpm.sign</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <configuration>
+ <group>Application/Internet</group>
+ <keyname>${gpg.key}</keyname>
+ <keypath>${gpg.keyring}</keypath>
+ <keyPassphrase>
+ <passphrase>${gpg.passphrase}</passphrase>
+ </keyPassphrase>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/core/src/packaging/rpm/init.d/elasticsearch b/distribution/rpm/src/main/packaging/init.d/elasticsearch
index da3e5ac8b9..2b247f933b 100644
--- a/core/src/packaging/rpm/init.d/elasticsearch
+++ b/distribution/rpm/src/main/packaging/init.d/elasticsearch
@@ -107,6 +107,7 @@ start() {
touch "$pidfile" && chown "$ES_USER":"$ES_GROUP" "$pidfile"
fi
+ cd $ES_HOME
echo -n $"Starting $prog: "
# if not running, start it up here, usually something like "daemon $exec"
daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -d -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.conf=$CONF_DIR
diff --git a/core/src/packaging/rpm/packaging.properties b/distribution/rpm/src/main/packaging/packaging.properties
index 7aa3228e38..7aa3228e38 100644
--- a/core/src/packaging/rpm/packaging.properties
+++ b/distribution/rpm/src/main/packaging/packaging.properties
diff --git a/distribution/rpm/src/main/resources/logo/elastic.gif b/distribution/rpm/src/main/resources/logo/elastic.gif
new file mode 100755
index 0000000000..e3b20998d5
--- /dev/null
+++ b/distribution/rpm/src/main/resources/logo/elastic.gif
Binary files differ
diff --git a/distribution/src/main/assemblies/common-bin.xml b/distribution/src/main/assemblies/common-bin.xml
new file mode 100644
index 0000000000..eed959a0e1
--- /dev/null
+++ b/distribution/src/main/assemblies/common-bin.xml
@@ -0,0 +1,96 @@
+<component>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <includes>
+ <include>org.apache.lucene:lucene*</include>
+ <include>log4j:log4j</include>
+ <include>log4j:apache-log4j-extras</include>
+ <include>net.java.dev.jna:jna</include>
+ <include>com.spatial4j:spatial4j</include>
+ <include>com.vividsolutions:jts</include>
+ <include>org.codehaus.groovy:groovy-all</include>
+ <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>
+ <include>com.twitter:jsr166e</include>
+ <include>org.hdrhistogram:HdrHistogram</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <useTransitiveDependencies>false</useTransitiveDependencies>
+ <includes>
+ <include>org.elasticsearch:elasticsearch</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>../src/main/resources/config</directory>
+ <outputDirectory>config</outputDirectory>
+ <includes>
+ <include>*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <filtered>true</filtered>
+ <directory>../src/main/resources/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <lineEnding>dos</lineEnding>
+ <includes>
+ <include>elasticsearch.in.bat</include>
+ <include>elasticsearch.bat</include>
+ <include>plugin.bat</include>
+ <include>service.bat</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <filtered>false</filtered>
+ <directory>../src/main/resources/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>*.exe</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <filtered>true</filtered>
+ <directory>../src/main/resources/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ <directoryMode>0755</directoryMode>
+ <lineEnding>unix</lineEnding>
+ <includes>
+ <include>elasticsearch.in.sh</include>
+ <include>elasticsearch</include>
+ <include>plugin</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>../src/main/resources/README.textile</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ <file>
+ <source>../src/main/resources/LICENSE.txt</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ <file>
+ <source>../src/main/resources/NOTICE.txt</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ </files>
+</component>
diff --git a/core/src/packaging/common/env/elasticsearch b/distribution/src/main/packaging/env/elasticsearch
index cdf05bb900..cdf05bb900 100644
--- a/core/src/packaging/common/env/elasticsearch
+++ b/distribution/src/main/packaging/env/elasticsearch
diff --git a/core/src/packaging/common/packaging.properties b/distribution/src/main/packaging/packaging.properties
index ff95c9d2c1..ff95c9d2c1 100644
--- a/core/src/packaging/common/packaging.properties
+++ b/distribution/src/main/packaging/packaging.properties
diff --git a/core/src/packaging/common/scripts/postinst b/distribution/src/main/packaging/scripts/postinst
index 3d47a0338d..3d47a0338d 100644
--- a/core/src/packaging/common/scripts/postinst
+++ b/distribution/src/main/packaging/scripts/postinst
diff --git a/distribution/src/main/packaging/scripts/postrm b/distribution/src/main/packaging/scripts/postrm
new file mode 100644
index 0000000000..1b44d3a8b3
--- /dev/null
+++ b/distribution/src/main/packaging/scripts/postrm
@@ -0,0 +1,119 @@
+${packaging.scripts.header}
+
+#
+# This script is executed in the post-removal phase
+#
+# On Debian,
+# $1=remove : indicates a removal
+# $1=purge : indicates an upgrade
+#
+# On RedHat,
+# $1=1 : indicates an new install
+# $1=2 : indicates an upgrade
+
+
+
+SOURCE_ENV_FILE=true
+REMOVE_DIRS=false
+REMOVE_SERVICE=false
+REMOVE_USER_AND_GROUP=false
+
+case "$1" in
+
+ # Debian ####################################################
+ remove)
+ REMOVE_DIRS=true
+ REMOVE_SERVICE=true
+ ;;
+
+ purge)
+ REMOVE_USER_AND_GROUP=true
+ SOURCE_ENV_FILE=false
+ ;;
+ failed-upgrade|abort-install|abort-upgrade|disappear|upgrade|disappear)
+ ;;
+
+ # RedHat ####################################################
+ 0)
+ REMOVE_DIRS=true
+ REMOVE_SERVICE=true
+ REMOVE_USER_AND_GROUP=true
+ ;;
+ 2)
+ # If $1=1 this is an upgrade
+ IS_UPGRADE=true
+ ;;
+
+ *)
+ echo "post remove script called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# Sets the default values for elasticsearch variables used in this script
+ES_USER="${packaging.elasticsearch.user}"
+ES_GROUP="${packaging.elasticsearch.group}"
+LOG_DIR="${packaging.elasticsearch.log.dir}"
+PLUGINS_DIR="${packaging.elasticsearch.plugins.dir}"
+PID_DIR="${packaging.elasticsearch.pid.dir}"
+DATA_DIR="${packaging.elasticsearch.data.dir}"
+
+# Source the default env file
+if [ "$SOURCE_ENV_FILE" = "true" ]; then
+ ES_ENV_FILE="${packaging.env.file}"
+ if [ -f "$ES_ENV_FILE" ]; then
+ . "$ES_ENV_FILE"
+ fi
+fi
+
+if [ "$REMOVE_SERVICE" = "true" ]; then
+ if command -v systemctl >/dev/null; then
+ systemctl --no-reload disable elasticsearch.service > /dev/null 2>&1 || true
+ fi
+
+ if command -v chkconfig >/dev/null; then
+ chkconfig --del elasticsearch 2> /dev/null || true
+ fi
+
+ if command -v update-rc.d >/dev/null; then
+ update-rc.d elasticsearch remove >/dev/null || true
+ fi
+fi
+
+if [ "$REMOVE_DIRS" = "true" ]; then
+
+ if [ -d "$LOG_DIR" ]; then
+ echo -n "Deleting log directory..."
+ rm -rf "$LOG_DIR"
+ echo " OK"
+ fi
+
+ if [ -d "$PLUGINS_DIR" ]; then
+ echo -n "Deleting plugins directory..."
+ rm -rf "$PLUGINS_DIR"
+ echo " OK"
+ fi
+
+ if [ -d "$PID_DIR" ]; then
+ echo -n "Deleting PID directory..."
+ rm -rf "$PID_DIR"
+ echo " OK"
+ fi
+
+ # Delete the data directory if and only if empty
+ if [ -d "$DATA_DIR" ]; then
+ rmdir --ignore-fail-on-non-empty "$DATA_DIR"
+ fi
+fi
+
+if [ "$REMOVE_USER_AND_GROUP" = "true" ]; then
+ if id "$ES_USER" > /dev/null 2>&1 ; then
+ userdel "$ES_USER"
+ fi
+
+ if getent group "$ES_GROUP" > /dev/null 2>&1 ; then
+ groupdel "$ES_GROUP"
+ fi
+fi
+
+${packaging.scripts.footer}
diff --git a/core/src/packaging/common/scripts/preinst b/distribution/src/main/packaging/scripts/preinst
index d3df84ecd0..d3df84ecd0 100644
--- a/core/src/packaging/common/scripts/preinst
+++ b/distribution/src/main/packaging/scripts/preinst
diff --git a/core/src/packaging/common/scripts/prerm b/distribution/src/main/packaging/scripts/prerm
index e8da006906..e8da006906 100644
--- a/core/src/packaging/common/scripts/prerm
+++ b/distribution/src/main/packaging/scripts/prerm
diff --git a/core/src/packaging/common/systemd/elasticsearch.conf b/distribution/src/main/packaging/systemd/elasticsearch.conf
index 98dd5e61c2..98dd5e61c2 100644
--- a/core/src/packaging/common/systemd/elasticsearch.conf
+++ b/distribution/src/main/packaging/systemd/elasticsearch.conf
diff --git a/core/src/packaging/common/systemd/elasticsearch.service b/distribution/src/main/packaging/systemd/elasticsearch.service
index a4c269973b..b857d6136b 100644
--- a/core/src/packaging/common/systemd/elasticsearch.service
+++ b/distribution/src/main/packaging/systemd/elasticsearch.service
@@ -13,6 +13,8 @@ Environment=LOG_DIR=${packaging.elasticsearch.log.dir}
Environment=PID_DIR=${packaging.elasticsearch.pid.dir}
EnvironmentFile=-${packaging.env.file}
+WorkingDirectory=${packaging.elasticsearch.home.dir}
+
User=${packaging.elasticsearch.user}
Group=${packaging.elasticsearch.group}
diff --git a/core/src/packaging/common/systemd/sysctl/elasticsearch.conf b/distribution/src/main/packaging/systemd/sysctl/elasticsearch.conf
index 052cd89cf0..052cd89cf0 100644
--- a/core/src/packaging/common/systemd/sysctl/elasticsearch.conf
+++ b/distribution/src/main/packaging/systemd/sysctl/elasticsearch.conf
diff --git a/distribution/src/main/resources/LICENSE.txt b/distribution/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/distribution/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/distribution/src/main/resources/NOTICE.txt b/distribution/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000000..23cae9e206
--- /dev/null
+++ b/distribution/src/main/resources/NOTICE.txt
@@ -0,0 +1,5 @@
+Elasticsearch
+Copyright 2009-2015 Elasticsearch
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).
diff --git a/distribution/src/main/resources/README.textile b/distribution/src/main/resources/README.textile
new file mode 100644
index 0000000000..720f357406
--- /dev/null
+++ b/distribution/src/main/resources/README.textile
@@ -0,0 +1,235 @@
+h1. Elasticsearch
+
+h2. A Distributed RESTful Search Engine
+
+h3. "https://www.elastic.co/products/elasticsearch":https://www.elastic.co/products/elasticsearch
+
+Elasticsearch is a distributed RESTful search engine built for the cloud. Features include:
+
+* Distributed and Highly Available Search Engine.
+** Each index is fully sharded with a configurable number of shards.
+** Each shard can have one or more replicas.
+** Read / Search operations performed on either one of the replica shard.
+* Multi Tenant with Multi Types.
+** Support for more than one index.
+** Support for more than one type per index.
+** Index level configuration (number of shards, index storage, ...).
+* Various set of APIs
+** HTTP RESTful API
+** Native Java API.
+** All APIs perform automatic node operation rerouting.
+* Document oriented
+** No need for upfront schema definition.
+** Schema can be defined per type for customization of the indexing process.
+* Reliable, Asynchronous Write Behind for long term persistency.
+* (Near) Real Time Search.
+* Built on top of Lucene
+** Each shard is a fully functional Lucene index
+** All the power of Lucene easily exposed through simple configuration / plugins.
+* Per operation consistency
+** Single document level operations are atomic, consistent, isolated and durable.
+* Open Source under the Apache License, version 2 ("ALv2")
+
+h2. Getting Started
+
+First of all, DON'T PANIC. It will take 5 minutes to get the gist of what Elasticsearch is all about.
+
+h3. Requirements
+
+You need to have a recent version of Java installed. See the "Setup":http://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html#jvm-version page for more information.
+
+h3. Installation
+
+* "Download":https://www.elastic.co/downloads/elasticsearch and unzip the Elasticsearch official distribution.
+* Run @bin/elasticsearch@ on unix, or @bin\elasticsearch.bat@ on windows.
+* Run @curl -X GET http://localhost:9200/@.
+* Start more servers ...
+
+h3. Indexing
+
+Let's try and index some twitter like information. First, let's create a twitter user, and add some tweets (the @twitter@ index will be created automatically):
+
+<pre>
+curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" : "Shay Banon" }'
+
+curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '
+{
+ "user": "kimchy",
+ "postDate": "2009-11-15T13:12:00",
+ "message": "Trying out Elasticsearch, so far so good?"
+}'
+
+curl -XPUT 'http://localhost:9200/twitter/tweet/2' -d '
+{
+ "user": "kimchy",
+ "postDate": "2009-11-15T14:12:12",
+ "message": "Another tweet, will it be indexed?"
+}'
+</pre>
+
+Now, let's see if the information was added by GETting it:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/user/kimchy?pretty=true'
+curl -XGET 'http://localhost:9200/twitter/tweet/1?pretty=true'
+curl -XGET 'http://localhost:9200/twitter/tweet/2?pretty=true'
+</pre>
+
+h3. Searching
+
+Mmm search..., shouldn't it be elastic?
+Let's find all the tweets that @kimchy@ posted:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/tweet/_search?q=user:kimchy&pretty=true'
+</pre>
+
+We can also use the JSON query language Elasticsearch provides instead of a query string:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/tweet/_search?pretty=true' -d '
+{
+ "query" : {
+ "match" : { "user": "kimchy" }
+ }
+}'
+</pre>
+
+Just for kicks, let's get all the documents stored (we should see the user as well):
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/_search?pretty=true' -d '
+{
+ "query" : {
+ "matchAll" : {}
+ }
+}'
+</pre>
+
+We can also do range search (the @postDate@ was automatically identified as date)
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/_search?pretty=true' -d '
+{
+ "query" : {
+ "range" : {
+ "postDate" : { "from" : "2009-11-15T13:00:00", "to" : "2009-11-15T14:00:00" }
+ }
+ }
+}'
+</pre>
+
+There are many more options to perform search, after all, it's a search product no? All the familiar Lucene queries are available through the JSON query language, or through the query parser.
+
+h3. Multi Tenant - Indices and Types
+
+Maan, that twitter index might get big (in this case, index size == valuation). Let's see if we can structure our twitter system a bit differently in order to support such large amounts of data.
+
+Elasticsearch supports multiple indices, as well as multiple types per index. In the previous example we used an index called @twitter@, with two types, @user@ and @tweet@.
+
+Another way to define our simple twitter system is to have a different index per user (note, though that each index has an overhead). Here is the indexing curl's in this case:
+
+<pre>
+curl -XPUT 'http://localhost:9200/kimchy/info/1' -d '{ "name" : "Shay Banon" }'
+
+curl -XPUT 'http://localhost:9200/kimchy/tweet/1' -d '
+{
+ "user": "kimchy",
+ "postDate": "2009-11-15T13:12:00",
+ "message": "Trying out Elasticsearch, so far so good?"
+}'
+
+curl -XPUT 'http://localhost:9200/kimchy/tweet/2' -d '
+{
+ "user": "kimchy",
+ "postDate": "2009-11-15T14:12:12",
+ "message": "Another tweet, will it be indexed?"
+}'
+</pre>
+
+The above will index information into the @kimchy@ index, with two types, @info@ and @tweet@. Each user will get his own special index.
+
+Complete control on the index level is allowed. As an example, in the above case, we would want to change from the default 5 shards with 1 replica per index, to only 1 shard with 1 replica per index (== per twitter user). Here is how this can be done (the configuration can be in yaml as well):
+
+<pre>
+curl -XPUT http://localhost:9200/another_user/ -d '
+{
+ "index" : {
+ "numberOfShards" : 1,
+ "numberOfReplicas" : 1
+ }
+}'
+</pre>
+
+Search (and similar operations) are multi index aware. This means that we can easily search on more than one
+index (twitter user), for example:
+
+<pre>
+curl -XGET 'http://localhost:9200/kimchy,another_user/_search?pretty=true' -d '
+{
+ "query" : {
+ "matchAll" : {}
+ }
+}'
+</pre>
+
+Or on all the indices:
+
+<pre>
+curl -XGET 'http://localhost:9200/_search?pretty=true' -d '
+{
+ "query" : {
+ "matchAll" : {}
+ }
+}'
+</pre>
+
+{One liner teaser}: And the cool part about that? You can easily search on multiple twitter users (indices), with different boost levels per user (index), making social search so much simpler (results from my friends rank higher than results from friends of my friends).
+
+h3. Distributed, Highly Available
+
+Let's face it, things will fail....
+
+Elasticsearch is a highly available and distributed search engine. Each index is broken down into shards, and each shard can have one or more replica. By default, an index is created with 5 shards and 1 replica per shard (5/1). There are many topologies that can be used, including 1/10 (improve search performance), or 20/1 (improve indexing performance, with search executed in a map reduce fashion across shards).
+
+In order to play with the distributed nature of Elasticsearch, simply bring more nodes up and shut down nodes. The system will continue to serve requests (make sure you use the correct http port) with the latest data indexed.
+
+h3. Where to go from here?
+
+We have just covered a very small portion of what Elasticsearch is all about. For more information, please refer to the "elastic.co":http://www.elastic.co/products/elasticsearch website.
+
+h3. Building from Source
+
+Elasticsearch uses "Maven":http://maven.apache.org for its build system.
+
+In order to create a distribution, simply run the @mvn clean package
+-DskipTests@ command in the cloned directory.
+
+The distribution will be created under @target/releases@.
+
+See the "TESTING":TESTING.asciidoc file for more information about
+running the Elasticsearch test suite.
+
+h3. Upgrading to Elasticsearch 1.x?
+
+In order to ensure a smooth upgrade process from earlier versions of Elasticsearch (< 1.0.0), it is recommended to perform a full cluster restart. Please see the "setup reference":https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html for more details on the upgrade process.
+
+h1. License
+
+<pre>
+This software is licensed under the Apache License, version 2 ("ALv2"), quoted below.
+
+Copyright 2009-2015 Elasticsearch <https://www.elastic.co>
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+</pre>
diff --git a/core/bin/elasticsearch b/distribution/src/main/resources/bin/elasticsearch
index bd324a7b5c..f05f3d3010 100755
--- a/core/bin/elasticsearch
+++ b/distribution/src/main/resources/bin/elasticsearch
@@ -57,12 +57,12 @@
# Maven will replace the project.name with elasticsearch below. If that
# hasn't been done, we assume that this is not a packaged version and the
# user has forgotten to run Maven to create a package.
-IS_PACKAGED_VERSION='${project.artifactId}'
-if [ "$IS_PACKAGED_VERSION" != "elasticsearch" ]; then
+IS_PACKAGED_VERSION='${project.parent.artifactId}'
+if [ "$IS_PACKAGED_VERSION" != "elasticsearch-distribution" ]; then
cat >&2 << EOF
Error: You must build the project with Maven or download a pre-built package
before you can run Elasticsearch. See 'Building from Source' in README.textile
-or visit http://www.elasticsearch.org/download to get a pre-built package.
+or visit https://www.elastic.co/download to get a pre-built package.
EOF
exit 1
fi
diff --git a/core/bin/elasticsearch-service-mgr.exe b/distribution/src/main/resources/bin/elasticsearch-service-mgr.exe
index 730240403a..730240403a 100644
--- a/core/bin/elasticsearch-service-mgr.exe
+++ b/distribution/src/main/resources/bin/elasticsearch-service-mgr.exe
Binary files differ
diff --git a/core/bin/elasticsearch-service-x64.exe b/distribution/src/main/resources/bin/elasticsearch-service-x64.exe
index dab7def755..dab7def755 100644
--- a/core/bin/elasticsearch-service-x64.exe
+++ b/distribution/src/main/resources/bin/elasticsearch-service-x64.exe
Binary files differ
diff --git a/core/bin/elasticsearch-service-x86.exe b/distribution/src/main/resources/bin/elasticsearch-service-x86.exe
index 4240720018..4240720018 100644
--- a/core/bin/elasticsearch-service-x86.exe
+++ b/distribution/src/main/resources/bin/elasticsearch-service-x86.exe
Binary files differ
diff --git a/core/bin/elasticsearch.bat b/distribution/src/main/resources/bin/elasticsearch.bat
index fb39780d01..fb39780d01 100644
--- a/core/bin/elasticsearch.bat
+++ b/distribution/src/main/resources/bin/elasticsearch.bat
diff --git a/core/bin/elasticsearch.in.bat b/distribution/src/main/resources/bin/elasticsearch.in.bat
index b25a679fc9..b3eccc0a62 100644
--- a/core/bin/elasticsearch.in.bat
+++ b/distribution/src/main/resources/bin/elasticsearch.in.bat
@@ -88,11 +88,5 @@ set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8
REM Use our provided JNA always versus the system one
set JAVA_OPTS=%JAVA_OPTS% -Djna.nosys=true
-set CORE_CLASSPATH=%ES_HOME%/lib/${project.build.finalName}.jar;%ES_HOME%/lib/*
-if "%ES_CLASSPATH%" == "" (
-set ES_CLASSPATH=%CORE_CLASSPATH%
-) else (
-set ES_CLASSPATH=%ES_CLASSPATH%;%CORE_CLASSPATH%
-)
-
+set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/${project.build.finalName}.jar;%ES_HOME%/lib/*
set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%"
diff --git a/core/bin/elasticsearch.in.sh b/distribution/src/main/resources/bin/elasticsearch.in.sh
index 92eab40307..631ec98921 100644
--- a/core/bin/elasticsearch.in.sh
+++ b/distribution/src/main/resources/bin/elasticsearch.in.sh
@@ -1,12 +1,6 @@
#!/bin/sh
-CORE_CLASSPATH="$ES_HOME/lib/${project.build.finalName}.jar:$ES_HOME/lib/*"
-
-if [ "x$ES_CLASSPATH" = "x" ]; then
- ES_CLASSPATH="$CORE_CLASSPATH"
-else
- ES_CLASSPATH="$ES_CLASSPATH:$CORE_CLASSPATH"
-fi
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/lib/${project.build.finalName}.jar:$ES_HOME/lib/*"
if [ "x$ES_MIN_MEM" = "x" ]; then
ES_MIN_MEM=${packaging.elasticsearch.heap.min}
diff --git a/core/bin/plugin b/distribution/src/main/resources/bin/plugin
index 15bf59ca7b..15bf59ca7b 100755
--- a/core/bin/plugin
+++ b/distribution/src/main/resources/bin/plugin
diff --git a/core/bin/plugin.bat b/distribution/src/main/resources/bin/plugin.bat
index a5e593ceee..a5e593ceee 100644
--- a/core/bin/plugin.bat
+++ b/distribution/src/main/resources/bin/plugin.bat
diff --git a/core/bin/service.bat b/distribution/src/main/resources/bin/service.bat
index a20d6e252a..a20d6e252a 100644
--- a/core/bin/service.bat
+++ b/distribution/src/main/resources/bin/service.bat
diff --git a/core/config/elasticsearch.yml b/distribution/src/main/resources/config/elasticsearch.yml
index b3baf765b3..b3baf765b3 100644
--- a/core/config/elasticsearch.yml
+++ b/distribution/src/main/resources/config/elasticsearch.yml
diff --git a/core/config/logging.yml b/distribution/src/main/resources/config/logging.yml
index 035106eeec..035106eeec 100644
--- a/core/config/logging.yml
+++ b/distribution/src/main/resources/config/logging.yml
diff --git a/core/src/test/resources/packaging/scripts/20_tar_package.bats b/distribution/src/test/resources/packaging/scripts/20_tar_package.bats
index b5daaece1d..b5daaece1d 100644
--- a/core/src/test/resources/packaging/scripts/20_tar_package.bats
+++ b/distribution/src/test/resources/packaging/scripts/20_tar_package.bats
diff --git a/core/src/test/resources/packaging/scripts/25_tar_plugins.bats b/distribution/src/test/resources/packaging/scripts/25_tar_plugins.bats
index f8f1481699..f8f1481699 100644
--- a/core/src/test/resources/packaging/scripts/25_tar_plugins.bats
+++ b/distribution/src/test/resources/packaging/scripts/25_tar_plugins.bats
diff --git a/core/src/test/resources/packaging/scripts/30_deb_package.bats b/distribution/src/test/resources/packaging/scripts/30_deb_package.bats
index aa7a370d80..aa7a370d80 100644
--- a/core/src/test/resources/packaging/scripts/30_deb_package.bats
+++ b/distribution/src/test/resources/packaging/scripts/30_deb_package.bats
diff --git a/core/src/test/resources/packaging/scripts/40_rpm_package.bats b/distribution/src/test/resources/packaging/scripts/40_rpm_package.bats
index 6a9007e4bb..6a9007e4bb 100644
--- a/core/src/test/resources/packaging/scripts/40_rpm_package.bats
+++ b/distribution/src/test/resources/packaging/scripts/40_rpm_package.bats
diff --git a/core/src/test/resources/packaging/scripts/50_plugins.bats b/distribution/src/test/resources/packaging/scripts/50_plugins.bats
index 5986a52811..5986a52811 100644
--- a/core/src/test/resources/packaging/scripts/50_plugins.bats
+++ b/distribution/src/test/resources/packaging/scripts/50_plugins.bats
diff --git a/core/src/test/resources/packaging/scripts/60_systemd.bats b/distribution/src/test/resources/packaging/scripts/60_systemd.bats
index 011b063a16..011b063a16 100644
--- a/core/src/test/resources/packaging/scripts/60_systemd.bats
+++ b/distribution/src/test/resources/packaging/scripts/60_systemd.bats
diff --git a/core/src/test/resources/packaging/scripts/70_sysv_initd.bats b/distribution/src/test/resources/packaging/scripts/70_sysv_initd.bats
index 0cd0d652c4..0cd0d652c4 100644
--- a/core/src/test/resources/packaging/scripts/70_sysv_initd.bats
+++ b/distribution/src/test/resources/packaging/scripts/70_sysv_initd.bats
diff --git a/core/src/test/resources/packaging/scripts/packaging_test_utils.bash b/distribution/src/test/resources/packaging/scripts/packaging_test_utils.bash
index b5fe262efd..b5fe262efd 100644
--- a/core/src/test/resources/packaging/scripts/packaging_test_utils.bash
+++ b/distribution/src/test/resources/packaging/scripts/packaging_test_utils.bash
diff --git a/distribution/tar/pom.xml b/distribution/tar/pom.xml
new file mode 100644
index 0000000000..ffc33c17ae
--- /dev/null
+++ b/distribution/tar/pom.xml
@@ -0,0 +1,75 @@
+<?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>
+
+ <artifactId>elasticsearch-tar</artifactId>
+ <name>Elasticsearch TAR Distribution</name>
+
+ <properties>
+ <skip.integ.tests>true</skip.integ.tests>
+ </properties>
+
+ <build>
+ <filters>
+ <filter>${project.basedir}/../src/main/packaging/packaging.properties</filter>
+ </filters>
+
+ <plugins>
+ <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>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>check-license</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <condition property="licenses.exists">
+ <available file="${basedir}/../licenses" type="dir"/>
+ </condition>
+ <echo taskName="license check">Running license check</echo>
+ <!-- on windows checksums are calculated wrong -->
+ <exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" osfamily="unix" >
+ <arg value="check_license_and_sha.pl"/>
+ <arg value="--check"/>
+ <arg value="${basedir}/../licenses"/>
+ <arg value="${basedir}/target/releases/${project.build.finalName}.tar.gz"/>
+ </exec>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/core/src/main/assemblies/targz-bin.xml b/distribution/tar/src/main/assemblies/targz-bin.xml
index f342f6a090..7a42a2de98 100644
--- a/core/src/main/assemblies/targz-bin.xml
+++ b/distribution/tar/src/main/assemblies/targz-bin.xml
@@ -8,6 +8,6 @@
<includeBaseDirectory>true</includeBaseDirectory>
<componentDescriptors>
- <componentDescriptor>src/main/assemblies/common-bin.xml</componentDescriptor>
+ <componentDescriptor>../src/main/assemblies/common-bin.xml</componentDescriptor>
</componentDescriptors>
</assembly>
diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml
new file mode 100644
index 0000000000..1ca8ed117c
--- /dev/null
+++ b/distribution/zip/pom.xml
@@ -0,0 +1,131 @@
+<?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>
+
+ <artifactId>elasticsearch-zip</artifactId>
+ <name>Elasticsearch ZIP Distribution</name>
+
+ <properties>
+ <skip.integ.tests>false</skip.integ.tests>
+ </properties>
+
+ <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.elasticsearch</groupId>
+ <artifactId>elasticsearch</artifactId>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <filters>
+ <filter>${project.basedir}/../src/main/packaging/packaging.properties</filter>
+ </filters>
+
+ <plugins>
+ <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/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-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>check-license</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <condition property="licenses.exists">
+ <available file="${basedir}/../licenses" type="dir"/>
+ </condition>
+ <echo taskName="license check">Running license check</echo>
+ <!-- on windows checksums are calculated wrong -->
+ <exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" osfamily="unix" >
+ <arg value="check_license_and_sha.pl"/>
+ <arg value="--check"/>
+ <arg value="${basedir}/../licenses"/>
+ <arg value="${basedir}/target/releases/${project.build.finalName}.zip"/>
+ </exec>
+ </target>
+ </configuration>
+ </execution>
+ <!-- execution and integration tests -->
+ <!-- start up external cluster -->
+ <execution>
+ <id>integ-setup</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster"/>
+ </target>
+ </configuration>
+ </execution>
+ <!-- shut down external cluster -->
+ <execution>
+ <id>integ-teardown</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/core/src/main/assemblies/zip-bin.xml b/distribution/zip/src/main/assemblies/zip-bin.xml
index 6ac0f7a8bb..661d5540cf 100644
--- a/core/src/main/assemblies/zip-bin.xml
+++ b/distribution/zip/src/main/assemblies/zip-bin.xml
@@ -8,6 +8,6 @@
<includeBaseDirectory>true</includeBaseDirectory>
<componentDescriptors>
- <componentDescriptor>src/main/assemblies/common-bin.xml</componentDescriptor>
+ <componentDescriptor>../src/main/assemblies/common-bin.xml</componentDescriptor>
</componentDescriptors>
</assembly>
diff --git a/core/src/test/java/org/elasticsearch/test/rest/RestIT.java b/distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java
index 167a5f04f9..167a5f04f9 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/RestIT.java
+++ b/distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java
diff --git a/pom.xml b/pom.xml
index e4e9150bbc..c3b271e532 100644
--- a/pom.xml
+++ b/pom.xml
@@ -918,14 +918,16 @@
<skip>${skip.integ.tests}</skip>
<artifactItems>
<artifactItem>
- <groupId>org.elasticsearch</groupId>
- <artifactId>elasticsearch</artifactId>
+ <groupId>org.elasticsearch.distribution</groupId>
+ <artifactId>elasticsearch-zip</artifactId>
<version>${elasticsearch.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
+ <!-- these packaging builds sneakily rename their artifacts to look nothing
+ like their artifact id, so we must duplicate that rename here -->
+ <destFileName>elasticsearch-${elasticsearch.version}.zip</destFileName>
</artifactItem>
</artifactItems>
- <useBaseVersion>true</useBaseVersion>
<outputDirectory>${integ.deps}</outputDirectory>
</configuration>
</execution>
@@ -937,12 +939,14 @@
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
<version>1.3</version>
+ <extensions>true</extensions>
</plugin>
<plugin>
<!-- We just declare which plugin version to use. Each project can have then its own settings -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
- <version>2.1.2</version>
+ <version>2.1.3</version>
+ <extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -1124,28 +1128,6 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
<version>1.8</version>
<executions>
<execution>
- <id>check-license</id>
- <phase>verify</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <condition property="licenses.exists">
- <available file="${basedir}/licenses" type="dir"/>
- </condition>
- <echo taskName="license check">Running license check</echo>
- <!-- on windows checksums are calculated wrong -->
- <exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" osfamily="unix" >
- <arg value="check_license_and_sha.pl"/>
- <arg value="--check"/>
- <arg value="${basedir}/licenses"/>
- <arg value="${basedir}/target/releases/${project.build.finalName}.zip"/>
- </exec>
- </target>
- </configuration>
- </execution>
- <execution>
<id>set-permgen</id>
<phase>validate</phase>
<goals>
@@ -1502,7 +1484,8 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
<modules>
<module>dev-tools</module>
<module>rest-api-spec</module>
- <module>plugins</module>
<module>core</module>
+ <module>distribution</module>
+ <module>plugins</module>
</modules>
</project>