OpenSearch/pom.xml

1457 lines
67 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">
<name>elasticsearch</name>
<modelVersion>4.0.0</modelVersion>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
2014-01-21 11:07:39 -05:00
<version>2.0.0-SNAPSHOT</version>
2011-12-05 18:05:44 -05:00
<packaging>jar</packaging>
<description>Elasticsearch - Open Source, Distributed, RESTful Search Engine</description>
2011-12-05 18:05:44 -05:00
<inceptionYear>2009</inceptionYear>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
2011-12-05 18:05:44 -05:00
<scm>
<connection>scm:git:git@github.com:elasticsearch/elasticsearch.git</connection>
<developerConnection>scm:git:git@github.com:elasticsearch/elasticsearch.git</developerConnection>
<url>http://github.com/elasticsearch/elasticsearch</url>
</scm>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<properties>
<lucene.version>4.8.1</lucene.version>
<tests.jvms>auto</tests.jvms>
<tests.shuffle>true</tests.shuffle>
<tests.output>onerror</tests.output>
<tests.client.ratio></tests.client.ratio>
<es.logger.level>INFO</es.logger.level>
<tests.heap.size>512m</tests.heap.size>
<tests.topn>5</tests.topn>
<execution.hint.file>.local-${project.version}-execution-hints.log</execution.hint.file>
2011-12-05 18:05:44 -05:00
</properties>
<repositories>
<repository>
<id>Codehaus Snapshots</id>
<url>http://repository.codehaus.org/</url>
</repository>
</repositories>
2011-12-05 18:05:44 -05:00
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
<version>2.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${lucene.version}</version>
<scope>test</scope>
</dependency>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.1</version>
<scope>test</scope>
</dependency>
2011-12-05 18:05:44 -05:00
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
2012-10-25 15:51:34 -04:00
<artifactId>lucene-analyzers-common</artifactId>
2011-12-05 18:05:44 -05:00
<version>${lucene.version}</version>
2012-10-25 16:43:32 -04:00
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-codecs</artifactId>
<version>${lucene.version}</version>
2011-12-05 18:05:44 -05:00
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
2011-12-06 06:41:49 -05:00
<exclusions>
<exclusion>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
</exclusion>
</exclusions>
2011-12-05 18:05:44 -05:00
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-memory</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
2012-12-02 16:29:49 -05:00
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
2013-02-23 04:52:30 -05:00
<exclusions>
<exclusion>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
</exclusion>
</exclusions>
</dependency>
Added suggest api. # Suggest feature The suggest feature suggests similar looking terms based on a provided text by using a suggester. At the moment there the only supported suggester is `fuzzy`. The suggest feature is available since version `0.21.0`. # Fuzzy suggester The `fuzzy` suggester suggests terms based on edit distance. The provided suggest text is analyzed before terms are suggested. The suggested terms are provided per analyzed suggest text token. The `fuzzy` suggester doesn't take the query into account that is part of request. # Suggest API The suggest request part is defined along side the query part as top field in the json request. ``` curl -s -XPOST 'localhost:9200/_search' -d '{ "query" : { ... }, "suggest" : { ... } }' ``` Several suggestions can be specified per request. Each suggestion is identified with an arbitary name. In the example below two suggestions are requested. The `my-suggest-1` suggestion uses the `body` field and `my-suggest-2` uses the `title` field. The `type` field is a required field and defines what suggester to use for a suggestion. ``` "suggest" : { "suggestions" : { "my-suggest-1" : { "type" : "fuzzy", "field" : "body", "text" : "the amsterdma meetpu" }, "my-suggest-2" : { "type" : "fuzzy", "field" : "title", "text" : "the rottredam meetpu" } } } ``` The below suggest response example includes the suggestions part for `my-suggest-1` and `my-suggest-2`. Each suggestion part contains a terms array, that contains all terms outputted by the analyzed suggest text. Each term object includes the term itself, the original start and end offset in the suggest text and if found an arbitary number of suggestions. ``` { ... "suggest": { "my-suggest-1": { "terms" : [ { "term" : "amsterdma", "start_offset": 5, "end_offset": 14, "suggestions": [ ... ] } ... ] }, "my-suggest-2" : { "terms" : [ ... ] } } ``` Each suggestions array contains a suggestion object that includes the suggested term, its document frequency and score compared to the suggest text term. The meaning of the score depends on the used suggester. The fuzzy suggester's score is based on the edit distance. ``` "suggestions": [ { "term": "amsterdam", "frequency": 77, "score": 0.8888889 }, ... ] ``` # Global suggest text To avoid repitition of the suggest text, it is possible to define a global text. In the example below the suggest text is a global option and applies to the `my-suggest-1` and `my-suggest-2` suggestions. ``` "suggest" : { "suggestions" : { "text" : "the amsterdma meetpu", "my-suggest-1" : { "type" : "fuzzy", "field" : "title" }, "my-suggest-2" : { "type" : "fuzzy", "field" : "body" } } } ``` The suggest text can be specied as global option or as suggestion specific option. The suggest text specified on suggestion level override the suggest text on the global level. # Other suggest example. In the below example we request suggestions for the following suggest text: `devloping distibutd saerch engies` on the `title` field with a maximum of 3 suggestions per term inside the suggest text. Note that in this example we use the `count` search type. This isn't required, but a nice optimalization. The suggestions are gather in the `query` phase and in the case that we only care about suggestions (so no hits) we don't need to execute the `fetch` phase. ``` curl -s -XPOST 'localhost:9200/_search?search_type=count' -d '{ "suggest" : { "suggestions" : { "my-title-suggestions" : { "suggester" : "fuzzy", "field" : "title", "text" : "devloping distibutd saerch engies", "size" : 3 } } } }' ``` The above request could yield the response as stated in the code example below. As you can see if we take the first suggested term of each suggest text term we get `developing distributed search engines` as result. ``` { ... "suggest": { "my-title-suggestions": { "terms": [ { "term": "devloping", "start_offset": 0, "end_offset": 9, "suggestions": [ { "term": "developing", "frequency": 77, "score": 0.8888889 }, { "term": "deloping", "frequency": 1, "score": 0.875 }, { "term": "deploying", "frequency": 2, "score": 0.7777778 } ] }, { "term": "distibutd", "start_offset": 10, "end_offset": 19, "suggestions": [ { "term": "distributed", "frequency": 217, "score": 0.7777778 }, { "term": "disributed", "frequency": 1, "score": 0.7777778 }, { "term": "distribute", "frequency": 1, "score": 0.7777778 } ] }, { "term": "saerch", "start_offset": 20, "end_offset": 26, "suggestions": [ { "term": "search", "frequency": 1038, "score": 0.8333333 }, { "term": "smerch", "frequency": 3, "score": 0.8333333 }, { "term": "serch", "frequency": 2, "score": 0.8 } ] }, { "term": "engies", "start_offset": 27, "end_offset": 33, "suggestions": [ { "term": "engines", "frequency": 568, "score": 0.8333333 }, { "term": "engles", "frequency": 3, "score": 0.8333333 }, { "term": "eggies", "frequency": 1, "score": 0.8333333 } ] } ] } } ... } ``` # Common suggest options: * `suggester` - The suggester implementation type. The only supported value is 'fuzzy'. This is a required option. * `text` - The suggest text. The suggest text is a required option that needs to be set globally or per suggestion. # Common fuzzy suggest options * `field` - The field to fetch the candidate suggestions from. This is an required option that either needs to be set globally or per suggestion. * `analyzer` - The analyzer to analyse the suggest text with. Defaults to the search analyzer of the suggest field. * `size` - The maximum corrections to be returned per suggest text token. * `sort` - Defines how suggestions should be sorted per suggest text term. Two possible value: ** `score` - Sort by sore first, then document frequency and then the term itself. ** `frequency` - Sort by document frequency first, then simlarity score and then the term itself. * `suggest_mode` - The suggest mode controls what suggestions are included or controls for what suggest text terms, suggestions should be suggested. Three possible values can be specified: ** `missing` - Only suggest terms in the suggest text that aren't in the index. This is the default. ** `popular` - Only suggest suggestions that occur in more docs then the original suggest text term. ** `always` - Suggest any matching suggestions based on terms in the suggest text. # Other fuzzy suggest options: * `lowercase_terms` - Lower cases the suggest text terms after text analyzation. * `max_edits` - The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. Can only be a value between 1 and 2. Any other value result in an bad request error being thrown. Defaults to 2. * `min_prefix` - The number of minimal prefix characters that must match in order be a candidate suggestions. Defaults to 1. Increasing this number improves spellcheck performance. Usually misspellings don't occur in the beginning of terms. * `min_query_length` - The minimum length a suggest text term must have in order to be included. Defaults to 4. * `shard_size` - Sets the maximum number of suggestions to be retrieved from each individual shard. During the reduce phase only the top N suggestions are returned based on the `size` option. Defaults to the `size` option. Setting this to a value higher than the `size` can be useful in order to get a more accurate document frequency for spelling corrections at the cost of performance. Due to the fact that terms are partitioned amongst shards, the shard level document frequencies of spelling corrections may not be precise. Increasing this will make these document frequencies more precise. * `max_inspections` - A factor that is used to multiply with the `shards_size` in order to inspect more candidate spell corrections on the shard level. Can improve accuracy at the cost of performance. Defaults to 5. * `threshold_frequency` - The minimal threshold in number of documents a suggestion should appear in. This can be specified as an absolute number or as a relative percentage of number of documents. This can improve quality by only suggesting high frequency terms. Defaults to 0f and is not enabled. If a value higher than 1 is specified then the number cannot be fractional. The shard level document frequencies are used for this option. * `max_query_frequency` - The maximum threshold in number of documents a sugges text token can exist in order to be included. Can be a relative percentage number (e.g 0.4) or an absolute number to represent document frequencies. If an value higher than 1 is specified then fractional can not be specified. Defaults to 0.01f. This can be used to exclude high frequency terms from being spellchecked. High frequency terms are usually spelled correctly on top of this this also improves the spellcheck performance. The shard level document frequencies are used for this option. Closes #2585
2013-01-24 09:38:35 -05:00
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-suggest</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
Remove scope support in query and facet dsl. Remove support for the `scope` field in facets and `_scope` field in the nested and parent/child queries. The scope support for nested queries will be replaced by the `nested` facet option and a facet filter with a nested filter. The nested filters will now support the a `join` option. Which controls whether to perform the block join. By default this enabled, but when disabled it returns the nested documents as hits instead of the joined root document. Search request with the current scope support. ``` curl -s -XPOST 'localhost:9200/products/_search' -d '{ "query" : { "nested" : { "path" : "offers", "query" : { "match" : { "offers.color" : "blue" } }, "_scope" : "my_scope" } }, "facets" : { "size" : { "terms" : { "field" : "offers.size" }, "scope" : "my_scope" } } }' ``` The following will be functional equivalent of using the scope support: ``` curl -s -XPOST 'localhost:9200/products/_search?search_type=count' -d '{ "query" : { "nested" : { "path" : "offers", "query" : { "match" : { "offers.color" : "blue" } } } }, "facets" : { "size" : { "terms" : { "field" : "offers.size" }, "facet_filter" : { "nested" : { "path" : "offers", "query" : { "match" : { "offers.color" : "blue" } }, "join" : false } }, "nested" : "offers" } } }' ``` The scope support for parent/child queries will be replaced by running the child query as filter in a global facet. Search request with the current scope support: ``` curl -s -XPOST 'localhost:9200/products/_search' -d '{ "query" : { "has_child" : { "type" : "offer", "query" : { "match" : { "color" : "blue" } }, "_scope" : "my_scope" } }, "facets" : { "size" : { "terms" : { "field" : "size" }, "scope" : "my_scope" } } }' ``` The following is the functional equivalent of using the scope support with parent/child queries: ``` curl -s -XPOST 'localhost:9200/products/_search' -d '{ "query" : { "has_child" : { "type" : "offer", "query" : { "match" : { "color" : "blue" } } } }, "facets" : { "size" : { "terms" : { "field" : "size" }, "global" : true, "facet_filter" : { "term" : { "color" : "blue" } } } } }' ``` Closes #2606
2013-01-31 09:09:57 -05:00
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-join</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
2013-02-23 04:52:30 -05:00
<!-- 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.version}</version>
<scope>compile</scope>
</dependency>
2013-02-23 04:52:30 -05:00
<dependency>
<groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
<version>0.4.1</version>
2013-02-23 04:52:30 -05:00
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.13</version>
2013-02-23 04:52:30 -05:00
<scope>compile</scope>
<optional>true</optional>
<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>
<optional>true</optional>
</dependency>
<!-- Lucene spatial -->
2012-12-02 16:29:49 -05:00
2011-12-05 18:05:44 -05:00
2011-12-05 19:42:25 -05:00
<!-- START: dependencies that are shaded -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
2014-04-27 11:18:31 -04:00
<version>17.0</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
2013-09-13 17:54:04 -04:00
<groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId>
2013-11-10 14:38:24 -05:00
<version>0.5.3</version>
2011-12-05 19:42:25 -05:00
</dependency>
<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 -->
2013-08-23 18:07:57 -04:00
<version>2.3</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<version>2.2.0.Final</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
2012-07-10 17:44:02 -04:00
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.3.3</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
2012-07-10 17:44:02 -04:00
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<version>2.3.3</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
2012-08-20 11:40:19 -04:00
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.3.3</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
2014-03-23 03:56:45 -04:00
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>
<version>2.3.3</version>
2014-03-23 03:56:45 -04:00
<scope>compile</scope>
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
2012-01-19 16:32:59 -05:00
<groupId>io.netty</groupId>
2011-12-05 19:42:25 -05:00
<artifactId>netty</artifactId>
2013-12-23 14:06:35 -05:00
<version>3.9.0.Final</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
<groupId>com.ning</groupId>
<artifactId>compress-lzf</artifactId>
2012-09-06 08:55:01 -04:00
<version>0.9.6</version>
<scope>compile</scope>
</dependency>
2014-05-13 18:42:48 -04:00
<dependency>
<groupId>com.tdunning</groupId>
<artifactId>t-digest</artifactId>
<version>3.0</version>
<scope>compile</scope>
</dependency>
2011-12-05 19:42:25 -05:00
<!-- END: dependencies that are shaded -->
2011-12-05 18:05:44 -05:00
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
2012-09-15 04:16:18 -04:00
<version>1.2.17</version>
<scope>compile</scope>
<optional>true</optional>
2011-12-05 18:05:44 -05:00
</dependency>
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
<optional>true</optional>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.1.0</version>
<scope>compile</scope>
<optional>true</optional>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
<groupId>org.fusesource</groupId>
<artifactId>sigar</artifactId>
<version>1.6.4</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- We don't use this since the publish pom is then messed up -->
<!--
2011-12-05 19:42:25 -05:00
<dependency>
<groupId>sigar</groupId>
<artifactId>sigar</artifactId>
<version>1.6.4</version>
<scope>system</scope>
<systemPath>${basedir}/lib/sigar/sigar-1.6.4.jar</systemPath>
2011-12-13 12:03:32 -05:00
<optional>true</optional>
2011-12-05 19:42:25 -05:00
</dependency>
-->
2011-12-05 18:05:44 -05:00
</dependencies>
<build>
2011-12-05 19:42:25 -05:00
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
<includes>
<include>**/*.json</include>
<include>**/*.yml</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>true</filtering>
2011-12-05 19:42:25 -05:00
</resource>
</resources>
<testResources>
<testResource>
<directory>${basedir}/src/test/java</directory>
<includes>
<include>**/*.json</include>
<include>**/*.yml</include>
<include>**/*.txt</include>
<include>**/*.properties</include>
2011-12-05 19:42:25 -05:00
</includes>
<filtering>true</filtering>
2011-12-05 19:42:25 -05:00
</testResource>
2014-05-16 09:21:23 -04:00
<testResource>
<directory>${basedir}/src/test/java</directory>
<includes>
<include>**/*.gz</include>
</includes>
</testResource>
2011-12-05 19:42:25 -05:00
<testResource>
<directory>${basedir}/src/test/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</testResource>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<testResource>
<directory>${basedir}/rest-api-spec</directory>
<targetPath>rest-api-spec</targetPath>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<includes>
<include>api/*.json</include>
<include>test/**/*.yaml</include>
</includes>
</testResource>
2011-12-05 19:42:25 -05:00
</testResources>
2011-12-05 18:05:44 -05:00
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[1.7,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
2011-12-05 18:05:44 -05:00
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
2011-12-05 18:05:44 -05:00
<configuration>
2014-02-26 14:33:27 -05:00
<source>1.7</source>
<target>1.7</target>
<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>
2011-12-05 18:05:44 -05:00
</configuration>
</plugin>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>tests</id>
<phase>test</phase>
<goals>
<goal>junit4</goal>
</goals>
<configuration>
<heartbeat>20</heartbeat>
<jvmOutputAction>pipe,warn</jvmOutputAction>
<leaveTemporary>true</leaveTemporary>
<listeners>
<report-ant-xml mavenExtensions="true"
dir="${project.build.directory}/surefire-reports"/>
<report-text
showThrowable="true"
showStackTraces="true"
showOutput="${tests.output}"
showStatusOk="false"
showStatusError="true"
showStatusFailure="true"
showStatusIgnored="true"
showSuiteSummary="true"
timestamps="false"/>
<report-execution-times historyLength="20" file="${basedir}/${execution.hint.file}"/>
</listeners>
<assertions>
2014-01-11 18:26:34 -05:00
<enable/>
<disable package="${tests.assertion.disabled}"/>
<!-- pass org.elasticsearch to run without assertions -->
</assertions>
<parallelism>${tests.jvms}</parallelism>
<balancers>
<execution-times>
<fileset dir="${basedir}" includes="${execution.hint.file}"/>
</execution-times>
</balancers>
<includes>
<include>**/*Tests.class</include>
<include>**/*Test.class</include>
</includes>
<excludes>
<exclude>**/Abstract*.class</exclude>
<exclude>**/*StressTest.class</exclude>
</excludes>
<jvmArgs>
<param>-Xmx${tests.heap.size}</param>
<param>-Xms${tests.heap.size}</param>
<param>-Xss256k</param>
2013-12-30 03:56:47 -05:00
<param>-XX:MaxPermSize=128m</param>
<param>-XX:MaxDirectMemorySize=512m</param>
<param>-Des.logger.prefix=</param>
</jvmArgs>
<shuffleOnSlave>${tests.shuffle}</shuffleOnSlave>
<sysouts>${tests.verbose}</sysouts>
<seed>${tests.seed}</seed>
<haltOnFailure>${tests.failfast}</haltOnFailure>
<uniqueSuiteNames>false</uniqueSuiteNames>
<systemProperties>
<java.io.tmpdir>.</java.io.tmpdir> <!-- we use '.' since this is different per JVM-->
<!-- RandomizedTesting library system properties -->
2013-11-25 08:35:12 -05:00
<tests.jvm.argline>${tests.jvm.argline}</tests.jvm.argline>
<tests.processors>${tests.processors}</tests.processors>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<tests.appendseed>${tests.appendseed}</tests.appendseed>
<tests.iters>${tests.iters}</tests.iters>
<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.badapples>${tests.badapples}</tests.badapples>
<tests.weekly>${tests.weekly}</tests.weekly>
<tests.slow>${tests.slow}</tests.slow>
<tests.awaitsfix>${tests.awaitsfix}</tests.awaitsfix>
<tests.slow>${tests.slow}</tests.slow>
<tests.timeoutSuite>${tests.timeoutSuite}</tests.timeoutSuite>
<tests.showSuccess>${tests.showSuccess}</tests.showSuccess>
<tests.integration>${tests.integration}</tests.integration>
<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>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<tests.rest>${tests.rest}</tests.rest>
<tests.rest.suite>${tests.rest.suite}</tests.rest.suite>
<tests.rest.blacklist>${tests.rest.blacklist}</tests.rest.blacklist>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<tests.rest.spec>${tests.rest.spec}</tests.rest.spec>
<tests.network>${tests.network}</tests.network>
<tests.cluster>${tests.cluster}</tests.cluster>
<tests.heap.size>${tests.heap.size}</tests.heap.size>
<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>
<!-- everything below is for security manager / test.policy -->
<junit4.tempDir>${project.build.directory}</junit4.tempDir>
<java.security.policy>${basedir}/dev-tools/tests.policy</java.security.policy>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>tests</id>
<phase>test</phase>
<configuration>
<skip>${skipTests}</skip> <!-- don't run if we skip the tests -->
<failOnError>false</failOnError>
<target>
<property name="runtime_classpath" refid="maven.runtime.classpath"/>
<property name="test_classpath" refid="maven.test.classpath"/>
<property name="plugin_classpath" refid="maven.plugin.classpath"/>
<taskdef resource="com/carrotsearch/junit4/antlib.xml">
<classpath>
<pathelement path="${plugin_classpath}"/>
<pathelement path="${runtime_classpath}"/>
<pathelement path="${test_classpath}"/>
</classpath>
</taskdef>
<tophints max="${tests.topn}">
<file file="${basedir}/${execution.hint.file}" />
</tophints>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- we skip surefire to work with randomized testing above -->
2011-12-05 18:05:44 -05:00
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
2011-12-05 18:05:44 -05:00
<configuration>
<skipTests>true</skipTests>
2011-12-05 18:05:44 -05:00
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
2011-12-05 18:05:44 -05:00
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
2011-12-06 06:41:49 -05:00
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
2011-12-06 06:41:49 -05:00
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<shadeTestJar>true</shadeTestJar>
2011-12-06 06:41:49 -05:00
<minimizeJar>true</minimizeJar>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
2011-12-06 06:41:49 -05:00
<artifactSet>
<includes>
<include>com.google.guava:guava</include>
2013-09-13 17:54:04 -04:00
<include>com.carrotsearch:hppc</include>
2011-12-06 06:41:49 -05:00
<include>org.mvel:mvel2</include>
<include>com.fasterxml.jackson.core:jackson-core</include>
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-smile</include>
2012-08-20 11:40:19 -04:00
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</include>
2014-03-23 03:56:45 -04:00
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-cbor</include>
2011-12-06 06:41:49 -05:00
<include>joda-time:joda-time</include>
<include>org.joda:joda-convert</include>
2012-01-19 16:32:59 -05:00
<include>io.netty:netty</include>
<include>com.ning:compress-lzf</include>
<include>com.github.spullara.mustache.java:compiler</include>
2014-05-13 18:42:48 -04:00
<include>com.tdunning:t-digest</include>
2011-12-06 06:41:49 -05:00
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>org.elasticsearch.common</shadedPattern>
</relocation>
<relocation>
2013-09-13 17:54:04 -04:00
<pattern>com.carrotsearch.hppc</pattern>
<shadedPattern>org.elasticsearch.common.hppc</shadedPattern>
2011-12-06 06:41:49 -05:00
</relocation>
<relocation>
<pattern>jsr166e</pattern>
<shadedPattern>org.elasticsearch.common.util.concurrent.jsr166e</shadedPattern>
</relocation>
<relocation>
<pattern>org.mvel2</pattern>
<shadedPattern>org.elasticsearch.common.mvel2</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
2011-12-06 06:41:49 -05:00
<shadedPattern>org.elasticsearch.common.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>org.joda</pattern>
<shadedPattern>org.elasticsearch.common.joda</shadedPattern>
</relocation>
<relocation>
<pattern>org.jboss.netty</pattern>
<shadedPattern>org.elasticsearch.common.netty</shadedPattern>
</relocation>
<relocation>
<pattern>com.ning.compress</pattern>
<shadedPattern>org.elasticsearch.common.compress</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.mustachejava</pattern>
<shadedPattern>org.elasticsearch.common.mustache</shadedPattern>
</relocation>
2014-05-13 18:42:48 -04:00
<relocation>
<pattern>com.tdunning.math.stats</pattern>
<shadedPattern>org.elasticsearch.common.stats</shadedPattern>
</relocation>
2011-12-06 06:41:49 -05:00
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/license/**</exclude>
<exclude>META-INF/*</exclude>
<exclude>META-INF/maven/**</exclude>
2011-12-06 06:41:49 -05:00
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
<exclude>/*.txt</exclude>
<exclude>build.properties</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<resources>
<resource>
<directory>${basedir}/bin</directory>
<filtering>true</filtering>
<excludes>
<exclude>*.exe</exclude>
</excludes>
</resource>
<resource>
<directory>${basedir}/bin</directory>
<filtering>false</filtering>
<includes>
<include>*.exe</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
2011-12-06 06:41:49 -05:00
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
2011-12-06 06:41:49 -05:00
<configuration>
<appendAssemblyId>false</appendAssemblyId>
2012-02-08 02:45:40 -05:00
<outputDirectory>${project.build.directory}/releases/</outputDirectory>
2011-12-06 06:41:49 -05:00
<descriptors>
<descriptor>${basedir}/src/main/assemblies/targz-bin.xml</descriptor>
<descriptor>${basedir}/src/main/assemblies/zip-bin.xml</descriptor>
2012-02-08 02:45:40 -05:00
</descriptors>
2011-12-06 06:41:49 -05:00
</configuration>
<executions>
2011-12-08 06:40:09 -05:00
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
2011-12-08 06:40:09 -05:00
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
2011-12-08 03:48:00 -05:00
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
2011-12-08 03:48:00 -05:00
<executions>
<execution>
<phase>prepare-package</phase>
2011-12-08 03:48:00 -05:00
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<includeScope>runtime</includeScope>
2011-12-08 06:40:09 -05:00
</configuration>
2011-12-08 03:48:00 -05:00
</execution>
</executions>
</plugin>
2012-02-08 02:45:40 -05:00
<plugin>
2012-02-08 02:31:41 -05:00
<!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md
2012-02-08 02:45:40 -05:00
-->
2011-12-08 03:48:00 -05:00
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.0.1</version>
<configuration>
2011-12-08 06:40:09 -05:00
<deb>${project.build.directory}/releases/${project.artifactId}-${project.version}.deb</deb>
</configuration>
2011-12-08 03:48:00 -05:00
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
2011-12-08 06:40:09 -05:00
<dataSet>
<data>
2011-12-08 03:48:00 -05:00
<src>${project.basedir}/</src>
<includes>*.txt, *.textile</includes>
<excludes>LICENSE.txt, .DS_Store</excludes>
2011-12-08 03:48:00 -05:00
<type>directory</type>
<mapper>
<type>perm</type>
2011-12-08 06:40:09 -05:00
<prefix>/usr/share/elasticsearch</prefix>
2011-12-08 03:48:00 -05:00
<user>root</user>
<group>root</group>
</mapper>
2011-12-08 06:40:09 -05:00
</data>
<data>
<!-- use the filtered one from the resources plugin -->
<src>${project.build.directory}/bin</src>
2011-12-08 03:48:00 -05:00
<type>directory</type>
<excludes>*.bat, .DS_Store, *.exe</excludes>
2011-12-08 03:48:00 -05:00
<mapper>
<type>perm</type>
2011-12-08 06:40:09 -05:00
<prefix>/usr/share/elasticsearch/bin</prefix>
2011-12-08 03:48:00 -05:00
<filemode>755</filemode>
<user>root</user>
<group>root</group>
2011-12-08 06:40:09 -05:00
</mapper>
</data>
<data>
2011-12-08 03:48:00 -05:00
<src>${project.build.directory}/</src>
2011-12-08 06:40:09 -05:00
<includes>${project.build.finalName}.jar</includes>
2011-12-08 03:48:00 -05:00
<type>directory</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/elasticsearch/lib</prefix>
<user>root</user>
<group>root</group>
</mapper>
2011-12-08 06:40:09 -05:00
</data>
<data>
2011-12-08 06:40:09 -05:00
<src>${project.basedir}/lib/sigar/</src>
<includes>sigar-*.jar, libsigar-*-linux.*</includes>
<type>directory</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/elasticsearch/lib/sigar</prefix>
<user>root</user>
<group>root</group>
</mapper>
</data>
<data>
2011-12-08 06:40:09 -05:00
<src>${project.build.directory}/lib</src>
2012-12-03 06:30:13 -05:00
<includes>lucene*, log4j*, jna*, spatial4j*, jts*</includes>
2011-12-08 03:48:00 -05:00
<type>directory</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/elasticsearch/lib</prefix>
<user>root</user>
<group>root</group>
</mapper>
</data>
2011-12-08 06:40:09 -05:00
<data>
2011-12-08 03:48:00 -05:00
<src>${project.basedir}/src/deb/default/</src>
<type>directory</type>
<excludes>.DS_Store</excludes>
2011-12-08 03:48:00 -05:00
<mapper>
<type>perm</type>
2011-12-08 06:40:09 -05:00
<prefix>/etc/default</prefix>
2011-12-08 03:48:00 -05:00
<user>root</user>
<group>root</group>
</mapper>
</data>
2011-12-08 06:40:09 -05:00
<data>
2011-12-08 03:48:00 -05:00
<src>${project.basedir}/src/deb/init.d/</src>
<type>directory</type>
<excludes>.DS_Store</excludes>
2011-12-08 03:48:00 -05:00
<mapper>
<type>perm</type>
<prefix>/etc/init.d</prefix>
<filemode>755</filemode>
<user>root</user>
<group>root</group>
</mapper>
</data>
2011-12-08 06:40:09 -05:00
<data>
2011-12-08 03:48:00 -05:00
<src>${project.basedir}/config</src>
<type>directory</type>
<excludes>.DS_Store</excludes>
2011-12-08 03:48:00 -05:00
<mapper>
<type>perm</type>
2011-12-08 06:40:09 -05:00
<prefix>/etc/elasticsearch</prefix>
2011-12-08 03:48:00 -05:00
<user>root</user>
<group>root</group>
</mapper>
2011-12-08 06:40:09 -05:00
</data>
<data>
<src>${project.basedir}/src/deb/lintian</src>
<type>directory</type>
<excludes>.DS_Store</excludes>
<mapper>
<type>perm</type>
<prefix>/usr/share/lintian/overrides</prefix>
<user>root</user>
<group>root</group>
</mapper>
</data>
<data>
<src>${project.basedir}/src/deb/copyright</src>
<dst>/usr/share/doc/elasticsearch/copyright</dst>
<type>file</type>
</data>
2011-12-08 06:40:09 -05:00
</dataSet>
2011-12-08 03:48:00 -05:00
</configuration>
</execution>
</executions>
2012-02-08 02:45:40 -05:00
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.1-alpha-3</version>
<configuration>
<copyright>2013, Elasticsearch</copyright>
<distribution>Elasticsearch</distribution>
<group>Application/Internet</group>
<packager>Elasticsearch</packager>
<prefix>/usr</prefix>
<changelogFile>src/changelog</changelogFile>
<defineStatements>
2013-04-08 08:46:26 -04:00
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
<defineStatement>_binaries_in_noarch_packages_terminate_build 0</defineStatement>
</defineStatements>
<defaultFilemode>644</defaultFilemode>
<defaultDirmode>755</defaultDirmode>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
<mappings>
2013-04-08 08:46:26 -04:00
<mapping>
<directory>/etc/elasticsearch/</directory>
<configuration>noreplace</configuration>
<sources>
<source>
<location>config/</location>
<includes>
<include>*.yml</include>
</includes>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/etc/sysconfig/</directory>
<configuration>noreplace</configuration>
<sources>
<source>
<location>src/rpm/sysconfig</location>
<includes>
<include>elasticsearch</include>
</includes>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/etc/rc.d/init.d/</directory>
<filemode>755</filemode>
<configuration>true</configuration>
<sources>
<source>
<location>src/rpm/init.d/elasticsearch</location>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/usr/lib/systemd/system/</directory>
<filemode>755</filemode>
<configuration>true</configuration>
<sources>
<source>
<location>src/rpm/systemd</location>
<includes>
<include>elasticsearch.service</include>
</includes>
</source>
</sources>
</mapping>
2014-01-11 18:26:34 -05:00
<mapping>
<directory>/usr/lib/sysctl.d/</directory>
<filemode>755</filemode>
<configuration>true</configuration>
<sources>
<source>
<location>src/rpm/systemd/sysctl.d</location>
<includes>
<include>elasticsearch.conf</include>
</includes>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/usr/lib/tmpfiles.d/</directory>
<configuration>true</configuration>
<sources>
<source>
<location>src/rpm/systemd/</location>
<includes>
<include>elasticsearch.conf</include>
</includes>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/var/run/elasticsearch/</directory>
<filemode>755</filemode>
<username>elasticsearch</username>
<groupname>elasticsearch</groupname>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/var/lib/elasticsearch/</directory>
<filemode>755</filemode>
<username>elasticsearch</username>
<groupname>elasticsearch</groupname>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/var/log/elasticsearch/</directory>
<filemode>755</filemode>
<username>elasticsearch</username>
<groupname>elasticsearch</groupname>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/usr/share/elasticsearch/bin/</directory>
<filemode>755</filemode>
<sources>
2013-04-08 08:46:26 -04:00
<source>
<location>target/bin</location>
<includes>
<include>elasticsearch</include>
<include>elasticsearch.in.sh</include>
<include>plugin</include>
</includes>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/share/elasticsearch/lib</directory>
<sources>
<source>
<location>target/lib/</location>
<includes>
<include>lucene*</include>
<include>log4j*</include>
<include>jna*</include>
<include>spatial4j*</include>
<include>jts*</include>
</includes>
</source>
<source>
<location>${project.build.directory}/</location>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/usr/share/elasticsearch/lib/sigar</directory>
<sources>
<source>
<location>lib/sigar</location>
<includes>
2013-04-08 08:46:26 -04:00
<include>sigar*.jar</include>
<include>libsigar-*-linux.*</include>
</includes>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/share/elasticsearch/</directory>
<sources>
<source>
<location>.</location>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
<include>README.textile</include>
</includes>
</source>
</sources>
</mapping>
</mappings>
<preinstallScriptlet>
<scriptFile>src/rpm/scripts/preinstall</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</preinstallScriptlet>
<postinstallScriptlet>
<scriptFile>src/rpm/scripts/postinstall</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postinstallScriptlet>
<preremoveScriptlet>
<scriptFile>src/rpm/scripts/preremove</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</preremoveScriptlet>
<postremoveScriptlet>
<scriptFile>src/rpm/scripts/postremove</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postremoveScriptlet>
</configuration>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>check-forbidden-apis</id>
<configuration>
2014-02-26 14:33:27 -05:00
<targetVersion>1.7</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>
<excludes>
<exclude>jsr166e/**</exclude>
<!-- start excludes for valid system-out -->
<exclude>org/elasticsearch/common/logging/log4j/ConsoleAppender*</exclude>
<exclude>org/elasticsearch/plugins/PluginManager.class</exclude>
<exclude>org/elasticsearch/bootstrap/Bootstrap.class</exclude>
<exclude>org/elasticsearch/Version.class</exclude>
<exclude>org/elasticsearch/common/lucene/search/Queries$QueryWrapperFilterFactory.class</exclude>
<!-- end excludes for valid system-out -->
<!-- start excludes for Unsafe -->
<exclude>org/elasticsearch/common/util/UnsafeUtils.class</exclude>
<!-- end excludes for Unsafe -->
<!-- start excludes for Math.abs -->
<exclude>org/elasticsearch/common/util/MathUtils.class</exclude>
<exclude>org/elasticsearch/common/math/UnboxedMathUtils.class</exclude>
<!-- end excludes for Math.abs -->
<!-- start exclude for FilteredQuery -->
<exclude>org/elasticsearch/common/lucene/search/XFilteredQuery.class</exclude>
<!-- end exclude for FilteredQuery -->
</excludes>
<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>core-signatures.txt</signaturesFile>
2014-04-27 16:45:20 -04:00
<signaturesFile>all-signatures.txt</signaturesFile>
</signaturesFiles>
<signatures>${forbidden.signatures}</signatures>
</configuration>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
<execution>
<id>check-forbidden-test-apis</id>
<configuration>
2014-02-26 14:33:27 -05:00
<targetVersion>1.7</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>
2014-04-27 16:45:20 -04:00
<signaturesFiles>
<signaturesFile>test-signatures.txt</signaturesFile>
<signaturesFile>all-signatures.txt</signaturesFile>
</signaturesFiles>
<signatures>${forbidden.test.signatures}</signatures>
</configuration>
<phase>test-compile</phase>
<goals>
<goal>testCheck</goal>
</goals>
</execution>
</executions>
</plugin>
2013-09-27 08:38:50 -04:00
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>1.2.1</version>
<executions>
<execution>
<id>Java Version</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<configuration>
<executable>java</executable>
<arguments>
<argument>-version</argument>
</arguments>
</configuration>
2013-09-27 08:38:50 -04:00
</execution>
</executions>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
2013-09-27 08:38:50 -04:00
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>org/elasticsearch/test/**/*</include>
<include>org/elasticsearch/cache/recycler/MockPageCacheRecycler.class</include>
<include>org/apache/lucene/util/AbstractRandomizedTest.class</include>
2014-01-11 18:26:34 -05:00
<include>org/apache/lucene/util/AbstractRandomizedTest$*.class</include>
</includes>
added REST test suites runner The REST layer can now be tested through tests that are shared between all the elasticsearch official clients. The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested. REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase). The REST runner and the needed classes are distributed within the test artifact. The following are the options supported by the REST tests runner: - tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default) - tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id - tests.rest.spec: REST spec path (default /rest-spec/api from classpath) - tests.iters: runs multiple iterations - tests.seed: seed to base the random behaviours on - tests.appendseed[true|false]: enables adding the seed to each test section's description (default false) - tests.cluster_seed: seed used to create the test cluster (if enabled) Closes #4469
2013-12-07 09:41:51 -05:00
<excludes>
<!-- unit tests for yaml suite parser & rest spec parser need to be excluded -->
<exclude>org/elasticsearch/test/rest/test/**/*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
2014-01-11 18:26:34 -05:00
</plugins>
<pluginManagement>
<plugins>
<!-- make m2e stfu -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<!-- copy-dependency plugin -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
2014-01-11 18:26:34 -05:00
<execute/>
</action>
</pluginExecution>
<!-- forbidden-apis plugin -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>testCheck</goal>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
2014-01-11 18:26:34 -05:00
<execute/>
</action>
</pluginExecution>
<!-- exec-maven plugin -->
<pluginExecution>
<pluginExecutionFilter>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>exec</goal>
</goals>
</pluginExecutionFilter>
<action>
2014-01-11 18:26:34 -05:00
<execute/>
</action>
</pluginExecution>
<!-- copy-dependency plugin -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
2014-01-11 18:26:34 -05:00
<execute/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
2013-09-16 03:13:42 -04:00
<buildOutputDirectory>eclipse-build</buildOutputDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
2011-12-05 18:05:44 -05:00
</build>
2014-02-07 19:18:31 -05:00
<profiles>
<!-- default profile, with randomization setting kicks in -->
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>
<configuration>
<argLine>${tests.jvm.argline}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.5</version>
<configuration>
<header>dev-tools/elasticsearch_license_header.txt</header>
<headerDefinitions>
<headerDefinition>dev-tools/license_header_definition.xml</headerDefinition>
</headerDefinitions>
<includes>
<include>src/main/java/org/elasticsearch/**/*.java</include>
<include>src/test/java/org/elasticsearch/**/*.java</include>
</includes>
<excludes>
<exclude>src/main/java/org/elasticsearch/common/inject/**</exclude>
<!-- Guice -->
<exclude>src/main/java/org/elasticsearch/common/geo/GeoHashUtils.java</exclude>
<exclude>src/main/java/org/elasticsearch/common/lucene/search/XBooleanFilter.java</exclude>
<exclude>src/main/java/org/elasticsearch/common/lucene/search/XFilteredQuery.java</exclude>
<exclude>src/main/java/org/apache/lucene/queryparser/XSimpleQueryParser.java</exclude>
<exclude>src/main/java/org/apache/lucene/**/X*.java</exclude>
<!-- t-digest -->
<exclude>src/main/java/org/elasticsearch/search/aggregations/metrics/percentiles/tdigest/TDigestState.java</exclude>
<exclude>src/test/java/org/elasticsearch/search/aggregations/metrics/GroupTree.java</exclude>
</excludes>
</configuration>
2014-02-26 14:33:27 -05:00
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
2014-02-07 19:18:31 -05:00
</plugins>
</build>
</profile>
<!-- 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>
2014-02-07 19:18:31 -05:00
<!-- jacoco coverage profile. This will insert -jagent -->
<profile>
<id>coverage</id>
<activation>
<property>
<name>tests.coverage</name>
<value>true</value>
</property>
</activation>
<dependencies>
<dependency>
<!-- must be on the classpath -->
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<classifier>runtime</classifier>
<version>0.6.4.201312101107</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.4.201312101107</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>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>jsr166e/**</exclude>
<exclude>org/apache/lucene/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>static</id>
<activation>
<property>
<name>tests.static</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<rulesets>
<ruleset>${basedir}/dev-tools/pmd/custom.xml</ruleset>
</rulesets>
<targetJdk>1.7</targetJdk>
<excludes>
<exclude>**/jsr166e/**</exclude>
<exclude>**/org/apache/lucene/**</exclude>
<exclude>**/org/apache/elasticsearch/common/Base64.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</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>
<reportSets>
<reportSet>
<reports>
<report>index</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</profile>
2014-02-07 19:18:31 -05:00
</profiles>
</project>