OpenSearch/pom.xml

1500 lines
78 KiB
XML
Raw Normal View History

2011-12-05 18:05:44 -05:00
<?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>
2011-12-05 18:05:44 -05:00
<groupId>org.elasticsearch</groupId>
<artifactId>parent</artifactId>
2015-09-03 04:43:28 -04:00
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Elasticsearch: Parent POM</name>
<description>Parent POM</description>
2011-12-05 18:05:44 -05:00
<inceptionYear>2009</inceptionYear>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
2011-12-05 18:05:44 -05:00
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
2011-12-05 18:05:44 -05:00
<scm>
<connection>scm:git:git@github.com:elastic/elasticsearch.git</connection>
<developerConnection>scm:git:git@github.com:elastic/elasticsearch.git</developerConnection>
<url>http://github.com/elastic/elasticsearch</url>
2011-12-05 18:05:44 -05:00
</scm>
<properties>
2015-07-03 02:12:01 -04:00
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- elasticsearch stack -->
<elasticsearch.version>${project.version}</elasticsearch.version>
<jvm.executable>${java.home}${file.separator}bin${file.separator}java</jvm.executable>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Path warnings must be ignored because maven doesnt create the classes output
dir when no source files exist (eg for distribution or qa modules) -->
<xlint.options>-Xlint:-path</xlint.options>
<doclint.options>-Xdoclint:-missing</doclint.options>
<!-- libraries -->
<lucene.version>5.4.0</lucene.version>
<lucene.snapshot.revision>1702855</lucene.snapshot.revision>
<lucene.maven.version>5.4.0-snapshot-${lucene.snapshot.revision}</lucene.maven.version>
<testframework.version>2.1.17</testframework.version>
2015-09-04 08:55:03 -04:00
<jackson.version>2.6.2</jackson.version>
<slf4j.version>1.6.2</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<jacoco.version>0.7.5.201505241946</jacoco.version>
2015-08-14 09:27:23 -04:00
<elasticsearch.s3.repository>s3://download.elasticsearch.org/elasticsearch/staging/</elasticsearch.s3.repository>
<!-- Build resources properties -->
<elasticsearch.tools.directory>${project.build.directory}/dev-tools</elasticsearch.tools.directory>
<elasticsearch.license.header>${elasticsearch.tools.directory}/license-check/elasticsearch_license_header.txt</elasticsearch.license.header>
<elasticsearch.license.headerDefinition>${elasticsearch.tools.directory}/license-check/license_header_definition.xml</elasticsearch.license.headerDefinition>
<elasticsearch.integ.antfile.default>${elasticsearch.tools.directory}/ant/integration-tests.xml</elasticsearch.integ.antfile.default>
<elasticsearch.integ.antfile>${elasticsearch.integ.antfile.default}</elasticsearch.integ.antfile>
<!-- Properties for the license checker -->
<project.licenses.dir>${project.basedir}/licenses</project.licenses.dir>
<project.licenses.check_target>${basedir}/target/releases/${project.build.finalName}.zip</project.licenses.check_target>
<!-- Test properties -->
<tests.jvms>auto</tests.jvms>
<tests.shuffle>true</tests.shuffle>
<tests.output>onerror</tests.output>
<tests.client.ratio></tests.client.ratio>
<tests.bwc.path>${project.basedir}/backwards</tests.bwc.path>
<tests.locale>random</tests.locale>
<tests.timezone>random</tests.timezone>
<es.logger.level>ERROR</es.logger.level>
<tests.heap.size>512m</tests.heap.size>
<tests.heapdump.path>${project.build.directory}/heapdump/</tests.heapdump.path>
<tests.topn>5</tests.topn>
<execution.hint.file>.local-${elasticsearch.version}-execution-hints.log</execution.hint.file>
<execution.hint.integ.file>.local-${elasticsearch.version}-integ-execution-hints.log</execution.hint.integ.file>
<tests.assertion.disabled>false</tests.assertion.disabled>
<tests.verbose>false</tests.verbose>
<tests.seed></tests.seed>
<tests.bwc></tests.bwc>
<tests.bwc.path></tests.bwc.path>
<tests.bwc.version></tests.bwc.version>
<tests.jvm.argline></tests.jvm.argline>
<tests.appendseed></tests.appendseed>
<tests.iters></tests.iters>
<tests.maxfailures></tests.maxfailures>
<tests.class></tests.class>
<tests.method></tests.method>
<tests.nightly></tests.nightly>
<tests.badapples></tests.badapples>
<tests.weekly></tests.weekly>
<tests.awaitsfix></tests.awaitsfix>
<tests.timeoutSuite></tests.timeoutSuite>
<tests.showSuccess></tests.showSuccess>
<tests.thirdparty></tests.thirdparty>
<tests.config></tests.config>
<tests.enable_mock_modules></tests.enable_mock_modules>
<tests.rest></tests.rest>
<tests.rest.suite></tests.rest.suite>
<tests.rest.blacklist></tests.rest.blacklist>
<tests.rest.spec></tests.rest.spec>
2015-07-06 15:13:50 -04:00
<tests.rest.load_packaged></tests.rest.load_packaged>
<tests.network></tests.network>
Default to unicast discovery, with default host list of 127.0.0.1, [::1] Fix unicast discovery to work when a host has multiple addresses. Ban dangerous methods in java.net with forbidden APIs. Fix ipv6 bugs and formatting of network addresses everywhere. Closes #12999 Closes #12993 Squashed commit of the following: commit 6c1aa001d091c5cf25212a53dc701fb704337f1e Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 14:25:43 2015 -0400 Fix these to be correct with addresses just in case commit 648215627e84abf58a71400e7dc9ae775efb71d6 Merge: d00561b 41d8fbe Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 13:23:09 2015 -0400 Merge branch 'master' into unicast_all_the_way_down commit d00561b76fd1aa5850699f7901f3dae3d4d402b7 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:38:50 2015 +0200 limit local ports to 5 in UnicastZenPing commit e2e15c594006746cbe24432694294a71cc99deb8 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:32:47 2015 -0400 fix port limiting commit 10153cb7adadda81a1f482445e703836b65cf5e2 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:18:37 2015 -0400 don't serialize scopeids: that's broken commit 2aa63d43db2baec68a2e9bc227cfeb85dfeb4f83 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:06:51 2015 +0200 restore @Network commit c840f1d1ef438826ae1ecfd5e45942a0e30dc9c0 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:02:30 2015 +0200 Use NetworkAddress.formatAddress where applicable in plugins commit 374ce878852b35d626b7a29c8c4773545b0e9ddd Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 15:34:06 2015 +0200 Use NetworkAddress.formatAddress where applicable commit e7a606d63f1bc43c1b62b6e17adf707c76d43a15 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 10:17:57 2015 +0200 Add @Multicast annotation to disable multicast tests by default. We only run multicast tests now when we explicitly state it. A working multicast env is required which is not always the case. commit 2d7d2d0347179696ab41f71f048b13305014c85b Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:51:28 2015 +0200 Remove extra check for local mode in InternalTestCluster commit dda59ac39aa136d4687b9274c2692cd77f8b8f66 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:37:03 2015 +0200 Handle node mode across entire test cluster We used static methods reading sys properties to define the node mode per cluster. this had lots of problems when tests couldn't cope with mixed or only local mode. Now we are passing it down to the cluster from the test which allows to @SuppressNetworkMode / @SupressLocalMode on the test to force consistent node configurations. commit 058197b7a408318995c88ce7f6762e32348de0de Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:19:14 2015 -0400 really ban InetSocketAddress's trappy method and break build and go to sleep, sorry commit ac8779185aee1e17e6f5a81766290fdfc9c603ba Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:16:52 2015 -0400 Ban methods that might surprisingly cause DNS lookups commit e64fe3dff2b11503e5f2831eb9863d64f56c5538 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:59:05 2015 -0400 Add unit test commit f15434f20fb1a3691b1cc16028597d8fae937e05 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:39:02 2015 -0400 fix ipv6 formatting bugs commit 05c2c74098052c75fbb79ea1818a295ef2e03e30 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:12:05 2015 -0400 format addresses correctly so I can actually read what comes out of our logs and stats apis commit 4f9389dcf1e8925f23153c5eb271b4ce2294dbaf Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 21:26:52 2015 -0400 ban dangerous methods in java.net commit 6aacd4d9925f324903d1d099a6cf5f862aeaf677 Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 20:59:24 2015 -0400 ban lenient method commit f466a842c60163d1f4554bdce8a4163edb534c2c Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:29:00 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 0de007a33b33fb68cf85cd86db4ca4f8ce10bbc9 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:10:07 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 539f6ca6e5137e0d496239adc8684688dedcc824 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:02:01 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 004c2881b25467f332acc8c9f9e92b1f0f9d314e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:51:45 2015 -0400 Fix multinode commit 54113af325ce31571811c49fdaae89d5687be4ba Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:36:45 2015 -0400 fix integration tests commit 0156a77a56319d6b9737ec6a531992052e50bd59 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 23:32:18 2015 +0200 enable multicast in MulticastZenPingIT.java commit 1791caa35da853ce0122485fa3fd4674c671ec6e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:23:16 2015 -0400 Fix constant commit 22820b53e0b2dc9fd47145c2bc29ce912a8fd484 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:59:09 2015 +0200 give it some extra ids for local transport crazyness commit b2138fafa94a8a085813fd48356df63e57ade5b3 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:51:42 2015 +0200 pass on local addresses from configured transport rather than hard code IP addresses commit 1bf5de1f457b081e0ce262b57d2b55d39c434156 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:04:31 2015 +0200 fix PluggableTransportModuleIT.java to use local disco and detach port limit for node local disco commit b6706eddfa04c43947c16551359ae98a463d34aa Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 14:16:03 2015 -0400 Default to unicast discovery, with default host list of 127.0.0.1, [::1]
2015-08-20 14:26:40 -04:00
<tests.multicast></tests.multicast>
<tests.cluster></tests.cluster>
<tests.filter></tests.filter>
<env.ES_TEST_LOCAL></env.ES_TEST_LOCAL>
<tests.security.manager>true</tests.security.manager>
<tests.compatibility></tests.compatibility>
<tests.ifNoTests>fail</tests.ifNoTests>
2015-07-03 02:12:01 -04:00
<skip.unit.tests>${skipTests}</skip.unit.tests>
<skip.integ.tests>${skipTests}</skip.integ.tests>
<integ.scratch>${project.build.directory}/integ tests</integ.scratch>
<integ.deps>${project.build.directory}/integ deps</integ.deps>
<integ.temp>${integ.scratch}/temp</integ.temp>
<integ.http.port>9400</integ.http.port>
<integ.transport.port>9500</integ.transport.port>
<integ.http.port.sec>9600</integ.http.port.sec>
<integ.transport.port.sec>9700</integ.transport.port.sec>
<no.commit.pattern>\bno(n|)commit\b</no.commit.pattern>
2011-12-05 18:05:44 -05:00
</properties>
<repositories>
<repository>
<id>elasticsearch-releases</id>
<url>http://maven.elasticsearch.org/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>oss-snapshots</id>
<name>Sonatype OSS Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>Lucene snapshots</id>
<url>https://download.elasticsearch.org/lucenesnapshots/${lucene.snapshot.revision}</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>dev-tools</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
<version>${testframework.version}</version>
</dependency>
2012-12-02 16:29:49 -05:00
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
2011-12-05 18:05:44 -05:00
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>com.google.jimfs</groupId>
<artifactId>jimfs</artifactId>
<version>1.0</version>
</dependency>
2015-05-07 06:02:33 -04:00
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${lucene.maven.version}</version>
2015-06-29 23:13:45 -04:00
<!-- we specify our own junit4 version -->
<exclusions>
<exclusion>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-ant</artifactId>
</exclusion>
</exclusions>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>test-jar</type>
</dependency>
2011-12-05 19:42:25 -05:00
2015-07-06 12:29:30 -04:00
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.6</version>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-backward-codecs</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries</artifactId>
<version>${lucene.maven.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-memory</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${lucene.maven.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-suggest</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-join</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<!-- Lucene spatial, make sure when upgrading to work with latest version of jts/spatial4j dependencies -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-spatial</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
<version>0.4.1</version>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.13</version>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- needed for templating -->
<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId>
<version>0.8.13</version>
</dependency>
2011-12-05 19:42:25 -05:00
<!-- Used in plugins -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-phonetic</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-kuromoji</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-stempel</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-icu</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-smartcn</artifactId>
<version>${lucene.maven.version}</version>
</dependency>
2014-03-23 03:56:45 -04:00
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId>
<version>0.7.1</version>
</dependency>
2014-05-13 18:42:48 -04:00
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<!-- joda 2.0 moved to using volatile fields for datetime -->
<!-- When updating to a new version, make sure to update our copy of BaseDateTime -->
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>3.10.3.Final</version>
</dependency>
2011-12-05 18:05:44 -05:00
<dependency>
<groupId>com.ning</groupId>
<artifactId>compress-lzf</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>com.tdunning</groupId>
<artifactId>t-digest</artifactId>
<version>3.0</version>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId>
<version>${log4j.version}</version>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.1.0</version>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
2015-07-14 13:41:54 -04:00
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
2015-07-14 13:41:54 -04:00
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>
</plugin>
<!-- we only use failsafe's "verify" right now -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[${maven.compiler.source},)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
<execution>
<id>enforce-maven-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
[build] remove shaded elasticsearch version The shaded version of elasticsearch was built at the very beginning to avoid dependency conflicts in a specific case where: * People use elasticsearch from Java * People needs to embed elasticsearch jar within their own application (as it's today the only way to get a `TransportClient`) * People also embed in their application another (most of the time older) version of dependency we are using for elasticsearch, such as: Guava, Joda, Jackson... This conflict issue can be solved within the projects themselves by either upgrade the dependency version and use the one provided by elasticsearch or by shading elasticsearch project and relocating some conflicting packages. Example ------- As an example, let's say you want to use within your project `Joda 2.1` but elasticsearch `2.0.0-beta1` provides `Joda 2.8`. Let's say you also want to run all that with shield plugin. Create a new maven project or module with: ```xml <groupId>fr.pilato.elasticsearch.test</groupId> <artifactId>es-shaded</artifactId> <version>1.0-SNAPSHOT</version> <properties> <elasticsearch.version>2.0.0-beta1</elasticsearch.version> </properties> <dependencies> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>${elasticsearch.version}</version> </dependency> <dependency> <groupId>org.elasticsearch.plugin</groupId> <artifactId>shield</artifactId> <version>${elasticsearch.version}</version> </dependency> </dependencies> ``` And now shade and relocate all packages which conflicts with your own application: ```xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <relocations> <relocation> <pattern>org.joda</pattern> <shadedPattern>fr.pilato.thirdparty.joda</shadedPattern> </relocation> </relocations> </configuration> </execution> </executions> </plugin> </plugins> </build> ``` You can create now a shaded version of elasticsearch + shield by running `mvn clean install`. In your project, you can now depend on: ```xml <dependency> <groupId>fr.pilato.elasticsearch.test</groupId> <artifactId>es-shaded</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.1</version> </dependency> ``` Build then your TransportClient as usual: ```java TransportClient client = TransportClient.builder() .settings(Settings.builder() .put("path.home", ".") .put("shield.user", "username:password") .put("plugin.types", "org.elasticsearch.shield.ShieldPlugin") ) .build(); client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("localhost", 9300))); // Index some data client.prepareIndex("test", "doc", "1").setSource("foo", "bar").setRefresh(true).get(); SearchResponse searchResponse = client.prepareSearch("test").get(); ``` If you want to use your own version of Joda, then import for example `org.joda.time.DateTime`. If you want to access to the shaded version (not recommended though), import `fr.pilato.thirdparty.joda.time.DateTime`. You can run a simple test to make sure that both classes can live together within the same JVM: ```java CodeSource codeSource = new org.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource(); System.out.println("unshaded = " + codeSource); codeSource = new fr.pilato.thirdparty.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource(); System.out.println("shaded = " + codeSource); ``` It will print: ``` unshaded = (file:/path/to/joda-time-2.1.jar <no signer certificates>) shaded = (file:/path/to/es-shaded-1.0-SNAPSHOT.jar <no signer certificates>) ``` This PR also removes fully-loaded module. By the way, the project can now build with Maven 3.3.3 so we can relax a bit our maven policy.
2015-09-01 12:54:52 -04:00
<version>[3.1.0,)</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
<execution>
<id>print-versions</id>
<phase>validate</phase>
<goals>
<goal>display-info</goal>
</goals>
</execution>
<execution>
<id>enforce-java-home-is-set</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireEnvironmentVariable>
<variableName>JAVA_HOME</variableName>
<message>"JAVA_HOME must be set and point to the jdk to run the tests"</message>
</requireEnvironmentVariable>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<fork>true</fork>
<maxmem>512m</maxmem>
<!-- REMOVE WHEN UPGRADE:
see https://jira.codehaus.org/browse/MCOMPILER-209 it's a bug where
incremental compilation doesn't work unless it's set to false causeing
recompilation of the entire codebase each time without any changes. Should
be fixed in version > 3.1
-->
<useIncrementalCompilation>false</useIncrementalCompilation>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
<arg>-Xlint:all</arg>
<arg>${xlint.options}</arg>
<arg>-Xdoclint:all/private</arg>
<arg>${doclint.options}</arg>
<arg>${javac.werror}</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>
<version>${testframework.version}</version>
<!-- general test configuration, used for both unit and integ tests -->
<configuration>
<jvm>${jvm.executable}</jvm>
<argLine>${tests.jvm.argline}</argLine>
<heartbeat>10</heartbeat>
<jvmOutputAction>warn</jvmOutputAction>
<leaveTemporary>true</leaveTemporary>
<parallelism>${tests.jvms}</parallelism>
<!-- System assertions (-esa) are disabled for now because of what looks like a
JDK bug triggered by Groovy on JDK7. We should look at re-enabling system
assertions when we upgrade to a new version of Groovy (currently 2.4.4) or
require JDK8. See https://issues.apache.org/jira/browse/GROOVY-7528.
-->
<assertions enableSystemAssertions="false">
<enable/>
<disable package="${tests.assertion.disabled}"/>
<!-- pass org.elasticsearch to run without assertions -->
</assertions>
<jvmArgs>
<param>-Xmx${tests.heap.size}</param>
<param>-Xms${tests.heap.size}</param>
<param>-XX:MaxDirectMemorySize=512m</param>
<param>-Des.logger.prefix=</param>
<param>-XX:+HeapDumpOnOutOfMemoryError</param>
<param>-XX:HeapDumpPath=${tests.heapdump.path}</param>
</jvmArgs>
<shuffleOnSlave>${tests.shuffle}</shuffleOnSlave>
<sysouts>${tests.verbose}</sysouts>
<seed>${tests.seed}</seed>
<!-- enforce unique suite names, or reporting stuff can be screwed up -->
<uniqueSuiteNames>true</uniqueSuiteNames>
<systemProperties>
<!-- we use './temp' since this is per JVM and tests are forbidden from writing to CWD -->
<java.io.tmpdir>./temp</java.io.tmpdir>
<!-- RandomizedTesting library system properties -->
<tests.bwc>${tests.bwc}</tests.bwc>
<tests.bwc.path>${tests.bwc.path}</tests.bwc.path>
<tests.bwc.version>${tests.bwc.version}</tests.bwc.version>
<tests.jvm.argline>${tests.jvm.argline}</tests.jvm.argline>
<tests.appendseed>${tests.appendseed}</tests.appendseed>
<tests.cluster>${tests.cluster}</tests.cluster>
<tests.iters>${tests.iters}</tests.iters>
<tests.project>${project.groupId}:${project.artifactId}</tests.project>
<!-- needed to know which project we are in for plugin permissions -->
<tests.artifact>${project.artifactId}</tests.artifact>
<tests.maxfailures>${tests.maxfailures}</tests.maxfailures>
<tests.failfast>${tests.failfast}</tests.failfast>
<tests.class>${tests.class}</tests.class>
<tests.method>${tests.method}</tests.method>
<tests.nightly>${tests.nightly}</tests.nightly>
<tests.verbose>${tests.verbose}</tests.verbose>
<tests.badapples>${tests.badapples}</tests.badapples>
<tests.weekly>${tests.weekly}</tests.weekly>
<haltOnFailure>${tests.failfast}</haltOnFailure>
<tests.awaitsfix>${tests.awaitsfix}</tests.awaitsfix>
<tests.timeoutSuite>${tests.timeoutSuite}</tests.timeoutSuite>
<tests.showSuccess>${tests.showSuccess}</tests.showSuccess>
<tests.thirdparty>${tests.thirdparty}</tests.thirdparty>
<tests.config>${tests.config}</tests.config>
<tests.coverage>${tests.coverage}</tests.coverage>
<tests.coverage.dir>${project.build.directory}</tests.coverage.dir>
<tests.client.ratio>${tests.client.ratio}</tests.client.ratio>
<tests.enable_mock_modules>${tests.enable_mock_modules}</tests.enable_mock_modules>
<tests.assertion.disabled>${tests.assertion.disabled}</tests.assertion.disabled>
<tests.rest>${tests.rest}</tests.rest>
<tests.rest.suite>${tests.rest.suite}</tests.rest.suite>
<tests.rest.blacklist>${tests.rest.blacklist}</tests.rest.blacklist>
<tests.rest.spec>${tests.rest.spec}</tests.rest.spec>
<tests.network>${tests.network}</tests.network>
<tests.heap.size>${tests.heap.size}</tests.heap.size>
<tests.filter>${tests.filter}</tests.filter>
<tests.version>${elasticsearch.version}</tests.version>
<tests.locale>${tests.locale}</tests.locale>
<tests.rest.load_packaged>${tests.rest.load_packaged}</tests.rest.load_packaged>
<tests.timezone>${tests.timezone}</tests.timezone>
<es.node.local>${env.ES_TEST_LOCAL}</es.node.local>
<es.node.mode>${es.node.mode}</es.node.mode>
<es.logger.level>${es.logger.level}</es.logger.level>
<tests.security.manager>${tests.security.manager}</tests.security.manager>
<tests.compatibility>${tests.compatibility}</tests.compatibility>
<java.awt.headless>true</java.awt.headless>
<!-- true if we are running tests from maven (as opposed to IDE, etc).
allows us to assert certain things work, like libsigar -->
<tests.maven>true</tests.maven>
</systemProperties>
<listeners>
<report-text
showThrowable="true"
showStackTraces="true"
showOutput="${tests.output}"
showStatusOk="false"
showStatusError="true"
showStatusFailure="true"
showStatusIgnored="true"
showSuiteSummary="true"
showNumFailures="30"
timestamps="false">
<filtertrace>
<!-- custom filters: we carefully only omit test infra noise here -->
<containsstring contains=".SlaveMain." />
<containsregex pattern="^(\s+at )(org\.junit\.)" />
<!-- also includes anonymous classes inside these two: -->
<containsregex pattern="^(\s+at )(com\.carrotsearch\.randomizedtesting.RandomizedRunner)" />
<containsregex pattern="^(\s+at )(com\.carrotsearch\.randomizedtesting.ThreadLeakControl)" />
<containsregex pattern="^(\s+at )(com\.carrotsearch\.randomizedtesting.rules\.)" />
<containsregex pattern="^(\s+at )(org\.apache\.lucene.util\.TestRule)" />
<containsregex pattern="^(\s+at )(org\.apache\.lucene.util\.AbstractBeforeAfterRule)" />
</filtertrace>
</report-text>
</listeners>
</configuration>
<executions>
<execution>
<id>tests</id>
<phase>test</phase>
<goals>
<goal>junit4</goal>
</goals>
<configuration>
<ifNoTests>${tests.ifNoTests}</ifNoTests>
2015-07-03 02:12:01 -04:00
<skipTests>${skip.unit.tests}</skipTests>
<listeners>
<report-ant-xml mavenExtensions="true"
dir="${project.build.directory}/surefire-reports"/>
<report-execution-times historyLength="20"
file="${basedir}/${execution.hint.file}"/>
</listeners>
<balancers>
<execution-times>
<fileset dir="${basedir}" includes="${execution.hint.file}"/>
</execution-times>
</balancers>
<includes>
<include>**/*Tests.class</include>
</includes>
<excludes>
<exclude>**/*$*.class</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>integ-tests</id>
<phase>integration-test</phase>
<goals>
<goal>junit4</goal>
</goals>
<configuration>
<ifNoTests>warn</ifNoTests>
<haltOnFailure>false</haltOnFailure>
<skipTests>${skip.integ.tests}</skipTests>
<listeners>
<report-ant-xml
mavenExtensions="true"
2015-07-20 11:02:50 -04:00
summaryFile="${project.build.directory}/failsafe-reports/failsafe-summary.xml"
dir="${project.build.directory}/failsafe-reports"/>
<report-execution-times historyLength="20"
file="${basedir}/${execution.hint.integ.file}"/>
</listeners>
<balancers>
<execution-times>
<fileset dir="${basedir}" includes="${execution.hint.integ.file}"/>
</execution-times>
</balancers>
<includes>
<include>**/*IT.class</include>
</includes>
<systemProperties>
<!-- let framework know we are running integ tests, for correct 'reproduce with' line -->
<tests.verify.phase>true</tests.verify.phase>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
<!-- disable surefire, we use junit4 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
2015-07-03 02:12:01 -04:00
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skip>${skip.integ.tests}</skip>
<failIfNoTests>true</failIfNoTests>
</configuration>
2015-07-03 02:12:01 -04:00
<executions>
<execution>
<id>verify</id>
<goals>
2015-07-03 02:12:01 -04:00
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
<configuration>
<resourceBundles>
<resourceBundle>org.elasticsearch:dev-tools:${elasticsearch.version}</resourceBundle>
<resourceBundle>org.elasticsearch:rest-api-spec:${elasticsearch.version}</resourceBundle>
</resourceBundles>
<outputDirectory>${elasticsearch.tools.directory}</outputDirectory>
<!-- don't include dev-tools in artifacts -->
<attachToMain>false</attachToMain>
<attachToTest>false</attachToTest>
</configuration>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
2015-09-30 12:55:52 -04:00
<version>2.0</version>
<executions>
<execution>
<id>check-forbidden-apis</id>
<configuration>
<targetVersion>${maven.compiler.target}</targetVersion>
<!-- disallow undocumented classes like sun.misc.Unsafe: -->
<internalRuntimeForbidden>true</internalRuntimeForbidden>
<!-- if the used Java version is too new, don't fail, just do nothing: -->
<failOnUnsupportedJava>false</failOnUnsupportedJava>
<bundledSignatures>
<!-- This will automatically choose the right signatures based on 'targetVersion': -->
<bundledSignature>jdk-unsafe</bundledSignature>
<bundledSignature>jdk-deprecated</bundledSignature>
<bundledSignature>jdk-system-out</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${elasticsearch.tools.directory}/forbidden/core-signatures.txt</signaturesFile>
<signaturesFile>${elasticsearch.tools.directory}/forbidden/all-signatures.txt</signaturesFile>
[build] remove shaded elasticsearch version The shaded version of elasticsearch was built at the very beginning to avoid dependency conflicts in a specific case where: * People use elasticsearch from Java * People needs to embed elasticsearch jar within their own application (as it's today the only way to get a `TransportClient`) * People also embed in their application another (most of the time older) version of dependency we are using for elasticsearch, such as: Guava, Joda, Jackson... This conflict issue can be solved within the projects themselves by either upgrade the dependency version and use the one provided by elasticsearch or by shading elasticsearch project and relocating some conflicting packages. Example ------- As an example, let's say you want to use within your project `Joda 2.1` but elasticsearch `2.0.0-beta1` provides `Joda 2.8`. Let's say you also want to run all that with shield plugin. Create a new maven project or module with: ```xml <groupId>fr.pilato.elasticsearch.test</groupId> <artifactId>es-shaded</artifactId> <version>1.0-SNAPSHOT</version> <properties> <elasticsearch.version>2.0.0-beta1</elasticsearch.version> </properties> <dependencies> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>${elasticsearch.version}</version> </dependency> <dependency> <groupId>org.elasticsearch.plugin</groupId> <artifactId>shield</artifactId> <version>${elasticsearch.version}</version> </dependency> </dependencies> ``` And now shade and relocate all packages which conflicts with your own application: ```xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <relocations> <relocation> <pattern>org.joda</pattern> <shadedPattern>fr.pilato.thirdparty.joda</shadedPattern> </relocation> </relocations> </configuration> </execution> </executions> </plugin> </plugins> </build> ``` You can create now a shaded version of elasticsearch + shield by running `mvn clean install`. In your project, you can now depend on: ```xml <dependency> <groupId>fr.pilato.elasticsearch.test</groupId> <artifactId>es-shaded</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.1</version> </dependency> ``` Build then your TransportClient as usual: ```java TransportClient client = TransportClient.builder() .settings(Settings.builder() .put("path.home", ".") .put("shield.user", "username:password") .put("plugin.types", "org.elasticsearch.shield.ShieldPlugin") ) .build(); client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("localhost", 9300))); // Index some data client.prepareIndex("test", "doc", "1").setSource("foo", "bar").setRefresh(true).get(); SearchResponse searchResponse = client.prepareSearch("test").get(); ``` If you want to use your own version of Joda, then import for example `org.joda.time.DateTime`. If you want to access to the shaded version (not recommended though), import `fr.pilato.thirdparty.joda.time.DateTime`. You can run a simple test to make sure that both classes can live together within the same JVM: ```java CodeSource codeSource = new org.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource(); System.out.println("unshaded = " + codeSource); codeSource = new fr.pilato.thirdparty.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource(); System.out.println("shaded = " + codeSource); ``` It will print: ``` unshaded = (file:/path/to/joda-time-2.1.jar <no signer certificates>) shaded = (file:/path/to/es-shaded-1.0-SNAPSHOT.jar <no signer certificates>) ``` This PR also removes fully-loaded module. By the way, the project can now build with Maven 3.3.3 so we can relax a bit our maven policy.
2015-09-01 12:54:52 -04:00
<signaturesFile>${elasticsearch.tools.directory}/forbidden/third-party-signatures.txt</signaturesFile>
</signaturesFiles>
<signatures>${forbidden.signatures}</signatures>
<suppressAnnotations><annotation>**.SuppressForbidden</annotation></suppressAnnotations>
</configuration>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
<execution>
<id>check-forbidden-test-apis</id>
<configuration>
<targetVersion>${maven.compiler.target}</targetVersion>
<!-- disallow undocumented classes like sun.misc.Unsafe: -->
<internalRuntimeForbidden>true</internalRuntimeForbidden>
<!-- if the used Java version is too new, don't fail, just do nothing: -->
<failOnUnsupportedJava>false</failOnUnsupportedJava>
<bundledSignatures>
<!-- This will automatically choose the right signatures based on 'targetVersion': -->
<bundledSignature>jdk-unsafe</bundledSignature>
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${elasticsearch.tools.directory}/forbidden/test-signatures.txt</signaturesFile>
<signaturesFile>${elasticsearch.tools.directory}/forbidden/all-signatures.txt</signaturesFile>
</signaturesFiles>
<signatures>${forbidden.test.signatures}</signatures>
<suppressAnnotations><annotation>**.SuppressForbidden</annotation></suppressAnnotations>
</configuration>
<phase>test-compile</phase>
<goals>
<goal>testCheck</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- We just declare which plugin version to use. Each project can have then its own settings -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
[build] remove shaded elasticsearch version The shaded version of elasticsearch was built at the very beginning to avoid dependency conflicts in a specific case where: * People use elasticsearch from Java * People needs to embed elasticsearch jar within their own application (as it's today the only way to get a `TransportClient`) * People also embed in their application another (most of the time older) version of dependency we are using for elasticsearch, such as: Guava, Joda, Jackson... This conflict issue can be solved within the projects themselves by either upgrade the dependency version and use the one provided by elasticsearch or by shading elasticsearch project and relocating some conflicting packages. Example ------- As an example, let's say you want to use within your project `Joda 2.1` but elasticsearch `2.0.0-beta1` provides `Joda 2.8`. Let's say you also want to run all that with shield plugin. Create a new maven project or module with: ```xml <groupId>fr.pilato.elasticsearch.test</groupId> <artifactId>es-shaded</artifactId> <version>1.0-SNAPSHOT</version> <properties> <elasticsearch.version>2.0.0-beta1</elasticsearch.version> </properties> <dependencies> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>${elasticsearch.version}</version> </dependency> <dependency> <groupId>org.elasticsearch.plugin</groupId> <artifactId>shield</artifactId> <version>${elasticsearch.version}</version> </dependency> </dependencies> ``` And now shade and relocate all packages which conflicts with your own application: ```xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <relocations> <relocation> <pattern>org.joda</pattern> <shadedPattern>fr.pilato.thirdparty.joda</shadedPattern> </relocation> </relocations> </configuration> </execution> </executions> </plugin> </plugins> </build> ``` You can create now a shaded version of elasticsearch + shield by running `mvn clean install`. In your project, you can now depend on: ```xml <dependency> <groupId>fr.pilato.elasticsearch.test</groupId> <artifactId>es-shaded</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.1</version> </dependency> ``` Build then your TransportClient as usual: ```java TransportClient client = TransportClient.builder() .settings(Settings.builder() .put("path.home", ".") .put("shield.user", "username:password") .put("plugin.types", "org.elasticsearch.shield.ShieldPlugin") ) .build(); client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("localhost", 9300))); // Index some data client.prepareIndex("test", "doc", "1").setSource("foo", "bar").setRefresh(true).get(); SearchResponse searchResponse = client.prepareSearch("test").get(); ``` If you want to use your own version of Joda, then import for example `org.joda.time.DateTime`. If you want to access to the shaded version (not recommended though), import `fr.pilato.thirdparty.joda.time.DateTime`. You can run a simple test to make sure that both classes can live together within the same JVM: ```java CodeSource codeSource = new org.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource(); System.out.println("unshaded = " + codeSource); codeSource = new fr.pilato.thirdparty.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource(); System.out.println("shaded = " + codeSource); ``` It will print: ``` unshaded = (file:/path/to/joda-time-2.1.jar <no signer certificates>) shaded = (file:/path/to/es-shaded-1.0-SNAPSHOT.jar <no signer certificates>) ``` This PR also removes fully-loaded module. By the way, the project can now build with Maven 3.3.3 so we can relax a bit our maven policy.
2015-09-01 12:54:52 -04:00
<!-- add some additional binary types to prevent maven from
2015-08-22 00:16:36 -04:00
screwing them up with resource filtering -->
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
<configuration>
<siteDirectory>${elasticsearch.tools.directory}/site</siteDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<!-- We just declare which plugin version to use. Each project can have then its own settings -->
<!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md -->
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
Packaging: mvn install renames artifacts when copying This PR: * renames all distribution artifacts to `elasticsearch` so maven plugins will pick up the correct finalName without needing any hack. * changes the groupId for every single distribution module as we can't have more than one module using the same groupId:artifactId * does not attach anymore empty jar files for tar/zip/... modules as they don't contain any `src/main/java` stuff. When you build it, you end up with: ``` $ tree ~/.m2/repository/org/elasticsearch/distribution distribution ├── deb │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── elasticsearch-distribution │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── fully-loaded │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── rpm │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm.sha1 ├── shaded │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── tar │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz.sha1 └── zip └── elasticsearch └── 2.0.0-beta1-SNAPSHOT    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip.md5    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip.sha1       └── ``` Closes #12536
2015-08-04 06:30:39 -04:00
<version>1.4</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.3</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
2015-05-23 08:37:50 -04:00
<manifestEntries>
<X-Build-Branch>${scmBranch}</X-Build-Branch>
<X-Build-Number>${buildNumber}</X-Build-Number>
<X-Build-Time>${timestamp}</X-Build-Time>
<X-Compile-Elasticsearch-Version>${elasticsearch.version}</X-Compile-Elasticsearch-Version>
<X-Compile-Lucene-Version>${lucene.version}</X-Compile-Lucene-Version>
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
2015-05-23 08:37:50 -04:00
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.8</version>
</plugin>
2011-12-08 03:48:00 -05:00
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.5</version>
<configuration>
<header>${elasticsearch.license.header}</header>
<headerDefinitions>
<headerDefinition>${elasticsearch.license.headerDefinition}</headerDefinition>
</headerDefinitions>
<includes>
<include>src/**/*.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>check-license-headers</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.10</version>
<configuration>
<buildOutputDirectory>eclipse-build</buildOutputDirectory>
<downloadSources>true</downloadSources>
<additionalConfig>
<file>
<name>.settings/org.eclipse.core.resources.prefs</name>
<content>
<![CDATA[eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
]]>
</content>
</file>
<file>
<name>.settings/org.eclipse.jdt.core.prefs</name>
<content>
<![CDATA[eclipse.preferences.version=1
# Shut down null analysis because we don't have all the required annotations (Nonnull and NonNullByDefault).
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.lineSplit=140
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
]]>
</content>
</file>
<file>
<name>.settings/org.eclipse.jdt.ui.prefs</name>
<content>
<![CDATA[eclipse.preferences.version=1
formatter_settings_version=12
# Intellij IDEA import order
org.eclipse.jdt.ui.importorder=;com;org;java;javax;\#;
# License header
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n *\n */</template><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n *\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n *\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n *\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/*\n *\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbo
]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
<!-- Quality plugins (was static plugins) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.5</version>
<configuration>
<rulesets>
<ruleset>${elasticsearch.tools.directory}/pmd/custom.xml</ruleset>
</rulesets>
<targetJdk>${maven.compiler.target}</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<xmlOutput>true</xmlOutput>
<xmlOutputDirectory>target/site</xmlOutputDirectory>
<fork>true</fork>
<maxHeap>2048</maxHeap>
<timeout>1800000</timeout>
<onlyAnalyze>org.elasticsearch.-</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<!-- remove this hack when maven works with java 9 properly -->
<execution>
<id>set-werror</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- if we are on java 1.9.* we turn off Werror or maven crushes! -->
<condition property="javac.werror" value="-Aboguskey=bogusvalue" else="-Werror" >
<matches pattern="1\.9\..+$" string="${java.runtime.version}" />
</condition>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
<execution>
<id>check-invalid-patterns</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target unless="${validate.skip}">
<pathconvert pathsep="${line.separator}" dirsep="/" property="validate.patternsFound" setonempty="false">
<fileset dir="${basedir}">
<include name="**/*.java"/>
<include name="**/*.py"/>
<include name="**/*.txt"/>
<include name="**/*.xml"/>
<include name="**/*.rb"/>
<include name="**/*.pl"/>
<exclude name="**/org/elasticsearch/cluster/routing/shard_routes.txt"/>
<exclude name="**/target/**/*"/>
<exclude name="**/.metadata/**/*"/>
<exclude name="**/.idea/**/*"/>
<exclude name="**/eclipse-build/**/*"/>
<or>
<containsregexp expression="\t" casesensitive="no"/>
<containsregexp expression="${no.commit.pattern}" casesensitive="no"/>
</or>
</fileset>
<map from="${basedir}${file.separator}" to="* "/>
</pathconvert>
<fail if="validate.patternsFound">The following files contain tabs or
nocommits:${line.separator}${validate.patternsFound}
</fail>
</target>
</configuration>
</execution>
<execution>
<phase>generate-test-resources</phase>
<id>create-heapdump-directory</id>
<configuration>
<target>
<echo taskname="heapdump" message="Creating heapdump directory"/>
<mkdir dir="${tests.heapdump.path}"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>tests-top-hints</id>
<phase>test</phase>
<configuration>
2015-07-03 02:12:01 -04:00
<skip>${skip.unit.tests}</skip>
<target>
<taskdef resource="com/carrotsearch/junit4/antlib.xml" classpathref="maven.plugin.classpath"/>
<tophints max="${tests.topn}">
<fileset dir="${basedir}" includes="${execution.hint.file}"/>
</tophints>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>integ-tests-top-hints</id>
<phase>integration-test</phase>
<configuration>
<skip>${skip.integ.tests}</skip>
<target>
<taskdef resource="com/carrotsearch/junit4/antlib.xml" classpathref="maven.plugin.classpath"/>
<tophints max="${tests.topn}">
<fileset dir="${basedir}" includes="${execution.hint.integ.file}"/>
</tophints>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>check-license</id>
<phase>verify</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<skip>${skip.integ.tests}</skip>
<target>
<echo taskName="license check">Running license check</echo>
<!-- don't run on windows, because everyone hates it -->
<exec failonerror="true" executable="perl" osfamily="unix"
dir="${elasticsearch.tools.directory}/license-check">
<arg value="check_license_and_sha.pl"/>
<arg value="--check"/>
<arg value="${project.licenses.dir}"/>
<arg value="${project.licenses.check_target}"/>
<arg value="${project.build.finalName}"/>
</exec>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-ant</artifactId>
<version>${testframework.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<!-- We just declare which plugin version to use. Each project can have then its own settings -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>2.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<!-- Doclint defaults to very strict. While it'd be great to have wonderful Javadocs we
prefer working Javadocs over total failure. -->
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<!-- We just declare which plugin version to use. Each project can have then its own settings -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-verifier-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.15</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<createChecksum>true</createChecksum>
</configuration>
</plugin>
</plugins>
</pluginManagement>
2011-12-05 18:05:44 -05:00
</build>
2014-02-07 19:18:31 -05:00
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<properties>
<package.rpm>true</package.rpm>
<no.commit.pattern>\bno(n|)(release|commit)\b</no.commit.pattern> <!-- check for no-commit / no-release -->
Deploy artifacts to S3 as well as sonatype when running a release This change allows when running a release build with: ``` mvn -Prelease deploy ``` To deploy all artifacts to S3 as well as to sonatype at the same time. Both sources will be consistent in terms of content and no further action is required to publish our artifacts including .rpm, .deb, .zip, .tar.gz, .jar etc. on to out S3 download service. Albeit this changes the structure of our downloads to pretty much matching the maven repository layout, this makes releaseing core as well as the plugins extremely simple. This will allow to remove most of our python script used for release and it will automatically allow to release and integrate new modules without further interaction. This also allows us to bascially streamline our release process on CI such that CI builds can simply run maven deploy which is all we do during a release. With this commit only the git related modifications like tagging, version bumping on our pom files and publishing RPM and .deb in their dedicated repository is left for the python script. With this change our artifact are available as follows: ``` http://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/elasticsearch/2.0.0-beta1/elasticsearch-2.0.0-beta1.deb http://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/elasticsearch/2.0.0-beta1/elasticsearch-2.0.0-beta1.zip http://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/elasticsearch/2.0.0-beta1/elasticsearch-2.0.0-beta1.rpm ``` Plugins are deployed to URLs like this: ``` http://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/plugin/elasticsearch-analysis-icu/2.0.0-beta1/elasticsearch-analysis-icu-2.0.0-beta1.zip ``` All artifacts like .jar as well as their checksums and gpg signatures are also available next to it.
2015-07-14 16:20:46 -04:00
<forbidden.test.signatures>org.apache.lucene.util.LuceneTestCase$AwaitsFix @ Please fix all bugs before release or mark them as ignored</forbidden.test.signatures>
</properties>
<build>
<!-- sign the artifacts with GPG -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphrase>${gpg.passphrase}</passphrase>
<defaultKeyring>${gpg.keyring}</defaultKeyring>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
2014-08-29 03:01:05 -04:00
<!-- license profile, to generate third party license file -->
<profile>
<id>license</id>
<activation>
<property>
<name>license.generation</name>
<value>true</value>
</property>
</activation>
<!-- not including license-maven-plugin is sufficent to expose default license -->
</profile>
<!-- omits noise -->
<profile>
<id>pom</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<missing>${basedir}/src/test/java</missing>
</file>
</activation>
<properties>
<skip.unit.tests>true</skip.unit.tests>
<skip.integ.tests>true</skip.integ.tests>
Refactor pluginservice Closes #12367 Squashed commit of the following: commit 9453c411798121aa5439c52e95301f60a022ba5f Merge: 3511a9c 828d8c7 Author: Robert Muir <rmuir@apache.org> Date: Wed Jul 22 08:22:41 2015 -0400 Merge branch 'master' into refactor_pluginservice commit 3511a9c616503c447de9f0df9b4e9db3e22abd58 Author: Ryan Ernst <ryan@iernst.net> Date: Tue Jul 21 21:50:15 2015 -0700 Remove duplicated constant commit 4a9b5b4621b0ef2e74c1e017d9c8cf624dd27713 Author: Ryan Ernst <ryan@iernst.net> Date: Tue Jul 21 21:01:57 2015 -0700 Add check that plugin must specify at least site or jvm commit 19aef2f0596153a549ef4b7f4483694de41e101b Author: Ryan Ernst <ryan@iernst.net> Date: Tue Jul 21 20:52:58 2015 -0700 Change plugin "plugin" property to "classname" commit 07ae396f30ed592b7499a086adca72d3f327fe4c Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 23:36:05 2015 -0400 remove test with no methods commit 550e73bf3d0f94562f4dde95239409dc5a24ce25 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 23:31:58 2015 -0400 fix loading to use classname commit 04463aed12046da0da5cac2a24c3ace51a79f799 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 23:24:19 2015 -0400 rename to classname commit 9f3afadd1caf89448c2eb913757036da48758b2d Author: Ryan Ernst <ryan@iernst.net> Date: Tue Jul 21 20:18:46 2015 -0700 moved PluginInfo and refactored parsing from properties file commit df63ccc1b8b7cc64d3e59d23f6c8e827825eba87 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 23:08:26 2015 -0400 fix test commit c7febd844be358707823186a8c7a2d21e37540c9 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 23:03:44 2015 -0400 remove test commit 017b3410cf9d2b7fca1b8653e6f1ebe2f2519257 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 22:58:31 2015 -0400 fix test commit c9922938df48041ad43bbb3ed6746f71bc846629 Merge: ad59af4 01ea89a Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 22:37:28 2015 -0400 Merge branch 'master' into refactor_pluginservice commit ad59af465e1f1ac58897e63e0c25fcce641148a7 Author: Areek Zillur <areek.zillur@elasticsearch.com> Date: Tue Jul 21 19:30:26 2015 -0400 [TEST] Verify expected number of nodes in cluster before issuing shardStores request commit f0f5a1e087255215b93656550fbc6bd89b8b3205 Author: Lee Hinman <lee@writequit.org> Date: Tue Jul 21 11:27:28 2015 -0600 Ignore EngineClosedException during translog fysnc When performing an operation on a primary, the state is captured and the operation is performed on the primary shard. The original request is then modified to increment the version of the operation as preparation for it to be sent to the replicas. If the request first fails on the primary during the translog sync (because the Engine is already closed due to shadow primaries closing the engine on relocation), then the operation is retried on the new primary after being modified for the replica shards. It will then fail due to the version being incorrect (the document does not yet exist but the request expects a version of "1"). Order of operations: - Request is executed against primary - Request is modified (version incremented) so it can be sent to replicas - Engine's translog is fsync'd if necessary (failing, and throwing an exception) - Modified request is retried against new primary This change ignores the exception where the engine is already closed when syncing the translog (similar to how we ignore exceptions when refreshing the shard if the ?refresh=true flag is used). commit 4ac68bb1658688550ced0c4f479dee6d8b617777 Author: Shay Banon <kimchy@gmail.com> Date: Tue Jul 21 22:37:29 2015 +0200 Replica allocator unit tests First batch of unit tests to verify the behavior of replica allocator commit 94609fc5943c8d85adc751b553847ab4cebe58a3 Author: Jason Tedor <jason@tedor.me> Date: Tue Jul 21 14:04:46 2015 -0400 Correctly list blobs in Azure storage to prevent snapshot corruption and do not unnecessarily duplicate Lucene segments in Azure Storage This commit addresses an issue that was leading to snapshot corruption for snapshots stored as blobs in Azure Storage. The underlying issue is that in cases when multiple snapshots of an index were taken and persisted into Azure Storage, snapshots subsequent to the first would repeatedly overwrite the snapshot files. This issue does render useless all snapshots except the final snapshot. The root cause of this is due to String concatenation involving null. In particular, to list all of the blobs in a snapshot directory in Azure the code would use the method listBlobsByPrefix where the prefix is null. In the listBlobsByPrefix method, the path keyPath + prefix is constructed. However, per 5.1.11, 5.4 and 15.18.1 of the Java Language Specification, the reference null is first converted to the string "null" before performing the concatenation. This leads to no blobs being returned and therefore the snapshot mechanism would operate as if it were writing the first snapshot of the index. The fix is simply to check if prefix is null and handle the concatenation accordingly. Upon fixing this issue so that subsequent snapshots would no longer overwrite earlier snapshots, it was discovered that the snapshot metadata returned by the listBlobsByPrefix method was not sufficient for the snapshot layer to detect whether or not the Lucene segments had already been copied to the Azure storage layer in an earlier snapshot. This led the snapshot layer to unnecessarily duplicate these Lucene segments in Azure Storage. The root cause of this is due to known behavior in the CloudBlobContainer.getBlockBlobReference method in the Azure API. Namely, this method does not fetch blob attributes from Azure. As such, the lengths of all the blobs appeared to the snapshot layer to be of length zero and therefore they would compare as not equal to any new blobs that the snapshot layer is going to persist. To remediate this, the method CloudBlockBlob.downloadAttributes must be invoked. This will fetch the attributes from Azure Storage so that a proper comparison of the blobs can be performed. Closes elastic/elasticsearch-cloud-azure#51, closes elastic/elasticsearch-cloud-azure#99 commit cf1d481ce5dda0a45805e42f3b2e0e1e5d028b9e Author: Lee Hinman <lee@writequit.org> Date: Mon Jul 20 08:41:55 2015 -0600 Unit tests for `nodesAndVersions` on shared filesystems With the `recover_on_any_node` setting, these unit tests check that the correct node list and versions are returned. commit 3c27cc32395c3624f7c794904d9ea4faf2eccbfb Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 14:15:59 2015 -0400 don't fail junit4 integration tests if there are no tests. instead fail the failsafe plugin, which means the external cluster will still get shut down commit 95d2756c5a8c21a157fa844273fc83dfa3c00aea Author: Alexander Reelsen <alexander@reelsen.net> Date: Tue Jul 21 17:16:53 2015 +0200 Testing: Fix help displaying tests under windows The help files are using a unix based file separator, where as the test relies on the help being based on the file system separator. This commit fixes the test to remove all `\r` characters before comparing strings. The test has also been moved into its own CliToolTestCase, as it does not need to be an integration test. commit 944f06ea36bd836f007f8eaade8f571d6140aad9 Author: Clinton Gormley <clint@traveljury.com> Date: Tue Jul 21 18:04:52 2015 +0200 Refactored check_license_and_sha.pl to accept a license dir and package path In preparation for the move to building the core zip, tar.gz, rpm, and deb as separate modules, refactored check_license_and_sha.pl to: * accept a license dir and path to the package to check on the command line * to be able to extract zip, tar.gz, deb, and rpm * all packages except rpm will work on Windows commit 2585431e8dfa5c82a2cc5b304cd03eee9bed7a4c Author: Chris Earle <pickypg@users.noreply.github.com> Date: Tue Jul 21 08:35:28 2015 -0700 Updating breaking changes - field names cannot be mapped with `.` in them - fixed asciidoc issue where the list was not recognized as a list commit de299b9d3f4615b12e2226a1e2eff5a38ecaf15f Author: Shay Banon <kimchy@gmail.com> Date: Tue Jul 21 13:27:52 2015 +0200 Replace primaryPostAllocated flag and use UnassignedInfo There is no need to maintain additional state as to if a primary was allocated post api creation on the index routing table, we hold all this information already in the UnassignedInfo class. closes #12374 commit 43080bff40f60bedce5bdbc92df302f73aeb9cae Author: Alexander Reelsen <alexander@reelsen.net> Date: Tue Jul 21 15:45:05 2015 +0200 PluginManager: Fix bin/plugin calls in scripts/bats test The release and smoke test python scripts used to install plugins in the old fashion. Also the BATS testing suite installed/removed plugins in that way. Here the marvel tests have been removed, as marvel currently does not work with the master branch. In addition documentation has been updated as well, where it was still missing. commit b81ccba48993bc13c7678e6d979fd96998499233 Author: Boaz Leskes <b.leskes@gmail.com> Date: Tue Jul 21 11:37:50 2015 +0200 Discovery: make sure NodeJoinController.ElectionCallback is always called from the update cluster state thread This is important for correct handling of the joining thread. This causes assertions to trip in our test runs. See http://build-us-00.elastic.co/job/es_g1gc_master_metal/11653/ as an example Closes #12372 commit 331853790bf29e34fb248ebc4c1ba585b44f5cab Author: Boaz Leskes <b.leskes@gmail.com> Date: Tue Jul 21 15:54:36 2015 +0200 Remove left over no commit from TransportReplicationAction It asks to double check thread pool rejection. I did and don't see problems with it. commit e5724931bbc1603e37faa977af4235507f4811f5 Author: Alexander Reelsen <alexander@reelsen.net> Date: Tue Jul 21 15:31:57 2015 +0200 CliTool: Various PluginManager fixes The new plugin manager parser was not called correctly in the scripts. In addition the plugin manager now creates a plugins/ directory in case it does not exist. Also the integration tests called the plugin manager in the deprecated way. commit 7a815a370f83ff12ffb12717ac2fe62571311279 Author: Alexander Reelsen <alexander@reelsen.net> Date: Tue Jul 21 13:54:18 2015 +0200 CLITool: Port PluginManager to use CLITool In order to unify the handling and reuse the CLITool infrastructure the plugin manager should make use of this as well. This obsolets the -i and --install options but requires the user to use `install` as the first argument of the CLI. This is basically just a port of the existing functionality, which is also the reason why this is not a refactoring of the plugin manager, which will come in a separate commit. commit 7f171eba7b71ac5682a355684b6da703ffbfccc7 Author: Martijn van Groningen <martijn.v.groningen@gmail.com> Date: Tue Jul 21 10:44:21 2015 +0200 Remove custom execute local logic in TransportSingleShardAction and TransportInstanceSingleOperationAction and rely on transport service to execute locally. (forking thread etc.) Change TransportInstanceSingleOperationAction to have shardActionHandler to, so we can execute locally without endless spinning. commit 0f38e3eca6b570f74b552e70b4673f47934442e1 Author: Ryan Ernst <ryan@iernst.net> Date: Tue Jul 21 17:36:12 2015 -0700 More readMetadata tests and pickiness commit 880b47281bd69bd37807e8252934321b089c9f8e Author: Ryan Ernst <ryan@iernst.net> Date: Tue Jul 21 14:42:09 2015 -0700 Started unit tests for plugin service commit cd7c8ddd7b8c4f3457824b493bffb19c156c7899 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 07:21:07 2015 -0400 fix tests commit 673454f0b14f072f66ed70e32110fae4f7aad642 Author: Robert Muir <rmuir@apache.org> Date: Tue Jul 21 06:58:25 2015 -0400 refactor pluginservice
2015-07-22 10:44:52 -04:00
<enforcer.skip>true</enforcer.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>create-heapdump-directory</id>
<phase>none</phase>
</execution>
<execution>
<id>tests-top-hints</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- skips validation checks -->
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<executions>
<execution>
<id>check-forbidden-apis</id>
<phase>none</phase>
</execution>
<execution>
<id>check-forbidden-test-apis</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<id>check-license-headers</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>check-invalid-patterns</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- code coverage build -->
<profile>
<id>coverage</id>
<activation>
<property>
<name>tests.coverage</name>
<value>true</value>
</property>
</activation>
<properties>
<!-- in case activated otherwise -->
<tests.coverage>true</tests.coverage>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<!-- static analysis -->
<profile>
<id>static</id>
<activation>
<property>
<name>tests.static</name>
<value>true</value>
</property>
</activation>
<properties>
<tests.security.manager>false</tests.security.manager> <!-- security policy doesn't have appropriate permissions for instrumentation -->
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>index</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</profile>
2014-02-07 19:18:31 -05:00
</profiles>
<modules>
<module>dev-tools</module>
<module>rest-api-spec</module>
2015-06-05 07:12:05 -04:00
<module>core</module>
<module>distribution</module>
<module>plugins</module>
<module>qa</module>
</modules>
</project>