OpenSearch/pom.xml

984 lines
45 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>
2013-04-29 07:51:09 -04:00
<version>1.0.0.Beta1-SNAPSHOT</version>
2011-12-05 18:05:44 -05:00
<packaging>jar</packaging>
<description>ElasticSearch - Open Source, Distributed, RESTful Search Engine</description>
<inceptionYear>2009</inceptionYear>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:elasticsearch/elasticsearch.git</connection>
<developerConnection>scm:git:git@github.com:elasticsearch/elasticsearch.git</developerConnection>
<url>http://github.com/elasticsearch/elasticsearch</url>
</scm>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<properties>
2013-07-16 09:41:23 -04:00
<lucene.version>4.4.0</lucene.version>
<tests.jvms>auto</tests.jvms>
<tests.shuffle>true</tests.shuffle>
<es.logger.level>INFO</es.logger.level>
2011-12-05 18:05:44 -05:00
</properties>
<repositories>
2011-12-05 19:42:25 -05:00
<repository>
<id>elasticsearch</id>
<name>elasticsearch repo</name>
<url>http://elasticsearch.googlecode.com/svn/maven</url>
</repository>
2011-12-05 18:05:44 -05:00
</repositories>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${lucene.version}</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.3</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.12</version>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</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>
2013-03-18 18:10:14 -04:00
<version>14.0.1</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
2011-12-07 12:42:07 -05:00
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
2012-06-09 17:01:51 -04:00
<version>3.0.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.mvel</groupId>
<artifactId>mvel2</artifactId>
2013-05-11 17:17:00 -04:00
<version>2.1.5.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.2.2</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.2.2</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.2.2</version>
2011-12-06 06:41:49 -05:00
<scope>compile</scope>
2011-12-05 19:42:25 -05:00
</dependency>
<dependency>
2012-01-19 16:32:59 -05:00
<groupId>io.netty</groupId>
2011-12-05 19:42:25 -05:00
<artifactId>netty</artifactId>
<version>3.6.6.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>
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>3.3.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>
</includes>
</testResource>
<testResource>
<directory>${basedir}/src/test/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</testResource>
</testResources>
2011-12-05 18:05:44 -05:00
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>
<version>2.0.10</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="onerror"
showStatusOk="false"
showStatusError="true"
showStatusFailure="true"
showStatusIgnored="true"
showSuiteSummary="true"
timestamps="false"/>
<report-execution-times file="${basedir}/.local-execution-hints.log"/>
</listeners>
<assertions>
<enable/>
</assertions>
<parallelism>${tests.jvms}</parallelism>
<balancers>
<execution-times>
<fileset dir="${basedir}" includes=".local-execution-hints.log"/>
</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>-Xmx512m</param>
<param>-Des.logger.prefix=</param>
</jvmArgs>
<shuffleOnSlave>${tests.shuffle}</shuffleOnSlave>
<sysouts>${tests.verbose}</sysouts>
<seed>${tests.seed}</seed>
<haltOnFailure>${tests.failfast}</haltOnFailure>
<systemProperties>
<!-- RandomizedTesting library system properties -->
<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>
<es.node.local>${env.ES_TEST_LOCAL}</es.node.local>
<es.transport.tcp.compress>${env.ES_TEST_COMPRESS}</es.transport.tcp.compress>
<es.action.wait_on_mapping_change>${env.ES_WAIT_ON_MAPPING_CHANGE}
</es.action.wait_on_mapping_change>
<es.logger.level>${es.logger.level}</es.logger.level>
<java.awt.headless>true</java.awt.headless>
</systemProperties>
</configuration>
</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.15</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.1.2</version>
<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.1</version>
2011-12-06 06:41:49 -05:00
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>com.google.guava:guava</include>
2011-12-07 12:42:07 -05:00
<include>net.sf.trove4j:trove4j</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>
2011-12-06 06:41:49 -05:00
<include>joda-time:joda-time</include>
2012-01-19 16:32:59 -05:00
<include>io.netty:netty</include>
<include>com.ning:compress-lzf</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>
<pattern>gnu.trove</pattern>
<shadedPattern>org.elasticsearch.common.trove</shadedPattern>
</relocation>
<relocation>
<pattern>jsr166y</pattern>
<shadedPattern>org.elasticsearch.common.util.concurrent.jsr166y</shadedPattern>
</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>
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.5</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>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
2011-12-06 06:41:49 -05:00
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
2012-02-26 14:07:55 -05:00
<version>2.3</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>
<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</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-2</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>/etc/systemd/system/</directory>
<filemode>755</filemode>
<configuration>true</configuration>
<sources>
<source>
<location>src/rpm/systemd</location>
<includes>
<include>elasticsearch.service</include>
</includes>
</source>
</sources>
2013-04-08 08:46:26 -04:00
</mapping>
<mapping>
<directory>/etc/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.3</version>
<executions>
<execution>
<id>check-forbidden-apis</id>
<configuration>
<targetVersion>1.6</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>
<exclude>jsr166y/**</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>
<!-- end excludes for valid system-out -->
</excludes>
<bundledSignatures>
<!-- This will automatically choose the right signatures based on 'maven.compiler.target': -->
<bundledSignature>jdk-unsafe</bundledSignature>
<bundledSignature>jdk-deprecated</bundledSignature>
<bundledSignaure>jdk-system-out</bundledSignaure>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>core-signatures.txt</signaturesFile>
</signaturesFiles>
</configuration>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
<execution>
<id>check-forbidden-test-apis</id>
<configuration>
<targetVersion>1.6</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 'maven.compiler.target': -->
<bundledSignature>jdk-unsafe</bundledSignature>
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
</configuration>
<phase>test-compile</phase>
<goals>
<goal>testCheck</goal>
</goals>
</execution>
</executions>
</plugin>
2011-12-05 18:05:44 -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>
2013-01-04 10:06:15 -05:00
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<buildOutputDirectory>eclipse-build</buildOutputDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
2011-12-05 18:05:44 -05:00
</build>
</project>