distributions
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>distributions</artifactId>
<version>2.4.6</version>
</dependency><?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>parent</artifactId>
<version>2.4.6</version>
</parent>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>distributions</artifactId>
<packaging>pom</packaging>
<name>Distribution: Parent POM</name>
<properties>
<!-- Adding a module to the distribution:
1. modify packaging.module.list below
2. add the module dependency to unpack-modules -->
<!-- pipe-separated list of modules. for license checking. -->
<packaging.module.list>lang-groovy|lang-expression|reindex</packaging.module.list>
<!-- 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>
<!-- Properties for the license checker -->
<project.licenses.dir>${project.basedir}/../licenses</project.licenses.dir>
<project.licenses.check_target>${integ.scratch}</project.licenses.check_target>
<!-- license checker allows a perl regular expression for ignore -->
<project.licenses.ignore>(${project.build.finalName}|${packaging.module.list})</project.licenses.ignore>
<!-- we expect packaging formats to have integration tests, but not unit tests -->
<skip.unit.tests>true</skip.unit.tests>
<packaging.gpg.shortening.ant.script>${project.basedir}/../correct-sign-path.xml</packaging.gpg.shortening.ant.script>
<!-- By default we sign RPMs and DEBs using a dummy gpg directory that we check into
source control. Releases will override this with the real information. -->
<gpg.key>16E55242</gpg.key>
<!-- We're not using project.parent.basedir here by intention because it causes trouble
(i.e. the property does not get resolved; verified with
mvn help:effective-pom -pl distribution/rpm -Prpm). -->
<gpg.long.keypath>${project.basedir}/../src/test/resources/dummyGpg</gpg.long.keypath>
<!-- This is the path that is used internally for signing. gpg-agent allows this path to
be at most 108 characters on Linux (see struct sockaddr_un in <sys/un.h>) and even less
on other systems. By symlinking to the tmp directory, we reduce the path name length.
We use an internal property "gpg.default.keypath" which is not intended to be overridden
on the command line. Instead, when signing a package in the release process,
"gpg.keypath" should be provided (as it has been before). The build script will detect
this and will not use symlinking magic in this case.
-->
<gpg.default.keypath>${java.io.tmpdir}/shortGpg</gpg.default.keypath>
<gpg.keypath>${gpg.default.keypath}</gpg.keypath>
<gpg.keyring>${gpg.keypath}/secring.gpg</gpg.keyring>
<gpg.passphrase>dummy</gpg.passphrase>
<deb.sign>true</deb.sign>
</properties>
<!-- PUT TEST ONLY DEPS HERE. Let individual distributions figure out what they want -->
<dependencies>
<dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</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>
<!-- Embedded components in any distribution -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</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>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId>
</dependency>
<!-- we intentionally do not want slf4j in the distro by default, we use log4j
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
-->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Always generate a Javadoc file even if we don't have any java source
but only resources
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>empty-javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<classesDirectory>${basedir}/src/main/resources</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- 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>
<!-- bundled modules. distributions that want them enable by setting phase: prepare-package -->
<execution>
<id>unpack-modules</id>
<phase>none</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.elasticsearch.module</groupId>
<artifactId>lang-expression</artifactId>
<version>${elasticsearch.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/modules/lang-expression</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.elasticsearch.module</groupId>
<artifactId>lang-groovy</artifactId>
<version>${elasticsearch.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/modules/lang-groovy</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.elasticsearch.module</groupId>
<artifactId>reindex</artifactId>
<version>${elasticsearch.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/modules/reindex</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<!-- Many of the modules in this build have the artifactId "elasticsearch"
which break importing into Eclipse without this. -->
<projectNameTemplate>[groupId].[artifactId]</projectNameTemplate>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<!-- checks integration test scratch area (where we extract the distribution) -->
</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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- distribution modules don't provide any jar. No need to upload empty jars to maven central -->
<skipIfEmpty>true</skipIfEmpty>
</configuration>
</plugin>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>
<executions>
<execution>
<id>integ-tests</id>
<configuration>
<!-- currently only 1 cpu works, because integ tests don't make "unique" test directories? -->
<parallelism>1</parallelism>
<systemProperties>
<!-- use external cluster -->
<tests.cluster>localhost:${integ.transport.port}</tests.cluster>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>integ-test-zip</module>
<module>tar</module>
<module>zip</module>
<module>deb</module>
</modules>
<profiles>
<!--
We include automatically RPM module when it's available in common locations.
If your rpmbuild is in another location (but in path), run maven with rpm profile:
mvn deploy -Prpm
-->
<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>/usr/bin/rpmbuild</exists>
</file>
</activation>
<modules>
<module>rpm</module>
</modules>
</profile>
<!--
This is a helper profile to automatically deactivate signing on known platforms with gpg-agent 2.1 on which
signing just cannot work out of the box with Maven. While it could be possible to support RPM signing
on these platforms in a backwards-compatible manner it requires hacks on so many levels that this is just
not feasible and we'd rather deactivate signing on those platforms.
Note that this relies that the build infrastructure sets the environment variable "OSDISTRO" correctly with facter.
This means that the build *can* fail if the property is not set. In that case, please check the output of
"$(facter os.name) $(facter os.release.major)" and create a new profile here.
For local builds on developer machines that are affected use either the "skipSign" profile or also set
the environment variable OSDISTRO to the respective value.
Ideally, we would just activate the "skipSign" profile or connect the all activation properties for skipSign
via a logical condition but this is not possible (see also https://issues.apache.org/jira/browse/MNG-4565).
-->
<profile>
<id>fedora24</id>
<activation>
<property>
<name>env.OSDISTRO</name>
<value>Fedora 24</value>
</property>
</activation>
<properties>
<gpg.key></gpg.key>
<deb.sign>false</deb.sign>
</properties>
</profile>
<profile>
<id>fedora25</id>
<activation>
<property>
<name>env.OSDISTRO</name>
<value>Fedora 25</value>
</property>
</activation>
<properties>
<gpg.key></gpg.key>
<deb.sign>false</deb.sign>
</properties>
</profile>
<profile>
<!-- Activate me to skip signing the rpm. Signing the rpm requires a few dependencies and might not work
properly on some distributions. Its known to work on Centos-6, and, ironically, Ubunutu 14.04. -->
<id>skipSign</id>
<activation>
<property>
<name>skipSign</name>
</property>
</activation>
<properties>
<!-- Clearing this property prevents the rpm plugin from trying to sign the rpm. -->
<gpg.key></gpg.key>
<!-- Clearing this property because once we've cleared the above one we can't sign the deb either. -->
<deb.sign>false</deb.sign>
</properties>
</profile>
</profiles>
</project>