diff --git a/core/pom.xml b/core/pom.xml index c9f8656eacb..4b55f93aa19 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -105,8 +105,6 @@ - - com.google.guava guava @@ -165,7 +163,6 @@ commons-cli commons-cli - org.codehaus.groovy diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index 68d531cd6af..9c8df5d4c8f 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -396,36 +396,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev-tools/src/main/resources/forbidden/core-signatures.txt b/dev-tools/src/main/resources/forbidden/core-signatures.txt index 7876306bb8f..f050ec4cf37 100644 --- a/dev-tools/src/main/resources/forbidden/core-signatures.txt +++ b/dev-tools/src/main/resources/forbidden/core-signatures.txt @@ -14,8 +14,7 @@ # either express or implied. See the License for the specific # language governing permissions and limitations under the License. -# For shaded dependencies, please put signatures in third-party-shaded.txt -# and third-party-unshaded.txt instead of here. +# For third-party dependencies, please put signatures in third-party.txt instead of here. @defaultMessage spawns threads with vague names; use a custom thread factory and name threads so that you can tell (by its name) which executor it is associated with @@ -47,7 +46,7 @@ org.apache.lucene.search.NumericRangeFilter#newFloatRange(java.lang.String,java. org.apache.lucene.search.NumericRangeFilter#newIntRange(java.lang.String,java.lang.Integer,java.lang.Integer,boolean,boolean) org.apache.lucene.search.NumericRangeFilter#newLongRange(java.lang.String,java.lang.Long,java.lang.Long,boolean,boolean) -@defaultMessage Only use wait / notify when really needed try to use concurrency primitives, latches or callbacks instead. +@defaultMessage Only use wait / notify when really needed try to use concurrency primitives, latches or callbacks instead. java.lang.Object#wait() java.lang.Object#wait(long) java.lang.Object#wait(long,int) diff --git a/dev-tools/src/main/resources/forbidden/third-party-shaded-signatures.txt b/dev-tools/src/main/resources/forbidden/third-party-shaded-signatures.txt deleted file mode 100644 index db1cd6f83be..00000000000 --- a/dev-tools/src/main/resources/forbidden/third-party-shaded-signatures.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed to Elasticsearch under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on -# an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the License for the specific -# language governing permissions and limitations under the License. - -@defaultMessage Use Long.compare instead we are on Java7 -org.elasticsearch.common.primitives.Longs#compare(long,long) - -@defaultMessage unsafe encoders/decoders have problems in the lzf compress library. Use variants of encode/decode functions which take Encoder/Decoder. -org.elasticsearch.common.compress.lzf.impl.UnsafeChunkDecoder#() -org.elasticsearch.common.compress.lzf.util.ChunkDecoderFactory#optimalInstance() - -@defaultMessage Constructing a DateTime without a time zone is dangerous -org.elasticsearch.joda.time.DateTime#() -org.elasticsearch.joda.time.DateTime#(long) -org.elasticsearch.joda.time.DateTime#(int, int, int, int, int) -org.elasticsearch.joda.time.DateTime#(int, int, int, int, int, int) -org.elasticsearch.joda.time.DateTime#(int, int, int, int, int, int, int) -org.elasticsearch.joda.time.DateTime#now() -org.elasticsearch.joda.time.DateTimeZone#getDefault() - -org.elasticsearch.common.collect.Iterators#emptyIterator() @ Use Collections.emptyIterator instead diff --git a/dev-tools/src/main/resources/forbidden/third-party-unshaded-signatures.txt b/dev-tools/src/main/resources/forbidden/third-party-signatures.txt similarity index 100% rename from dev-tools/src/main/resources/forbidden/third-party-unshaded-signatures.txt rename to dev-tools/src/main/resources/forbidden/third-party-signatures.txt diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml index a86fad9513d..aae6f6f4595 100644 --- a/distribution/deb/pom.xml +++ b/distribution/deb/pom.xml @@ -24,15 +24,6 @@ dpkg-sig - - - org.elasticsearch.distribution.fully-loaded - elasticsearch - ${elasticsearch.version} - pom - - - @@ -172,7 +163,7 @@ ${project.build.directory}/../target/lib - ${project.build.finalName}-shaded.jar,${project.build.finalName}-sources.jar,${project.build.finalName}-tests.jar,${project.build.finalName}-test-sources.jar,slf4j-api-*.jar + ${project.build.finalName}-sources.jar,${project.build.finalName}-tests.jar,${project.build.finalName}-test-sources.jar,slf4j-api-*.jar directory perm diff --git a/distribution/fully-loaded/pom.xml b/distribution/fully-loaded/pom.xml deleted file mode 100644 index 92772e9c866..00000000000 --- a/distribution/fully-loaded/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - 4.0.0 - - org.elasticsearch.distribution - distributions - 2.1.0-SNAPSHOT - - - org.elasticsearch.distribution.fully-loaded - elasticsearch - Distribution: with all optional dependencies - pom - - - - org.elasticsearch - elasticsearch - - - - org.apache.lucene - lucene-expressions - - - - com.spatial4j - spatial4j - - - - com.vividsolutions - jts - - - - - com.github.spullara.mustache.java - compiler - - - - org.codehaus.groovy - groovy-all - indy - - - - log4j - log4j - - - - log4j - apache-log4j-extras - - - - - - net.java.dev.jna - jna - - - - diff --git a/distribution/pom.xml b/distribution/pom.xml index 4a22d12f458..94cd8ad75e7 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -69,6 +69,61 @@ httpclient test + + + + org.elasticsearch + elasticsearch + + + + org.apache.lucene + lucene-expressions + + + + com.spatial4j + spatial4j + + + + com.vividsolutions + jts + + + + + com.github.spullara.mustache.java + compiler + + + + org.codehaus.groovy + groovy-all + indy + + + + log4j + log4j + + + + log4j + apache-log4j-extras + + + + + + net.java.dev.jna + jna + @@ -170,8 +225,6 @@ - fully-loaded - shaded tar zip deb diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml index 488ed97ac04..f0e22b64963 100644 --- a/distribution/rpm/pom.xml +++ b/distribution/rpm/pom.xml @@ -15,15 +15,6 @@ rpm The RPM distribution of Elasticsearch - - - org.elasticsearch.distribution.fully-loaded - elasticsearch - ${elasticsearch.version} - pom - - - true ${project.build.directory}/releases/ @@ -187,7 +178,6 @@ target/lib/ - ${project.build.finalName}-shaded.jar ${project.build.finalName}-sources.jar ${project.build.finalName}-tests.jar ${project.build.finalName}-test-sources.jar diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml deleted file mode 100644 index 6a4b54f7b18..00000000000 --- a/distribution/shaded/pom.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - 4.0.0 - - org.elasticsearch.distribution - distributions - 2.1.0-SNAPSHOT - - - org.elasticsearch.distribution.shaded - elasticsearch - Distribution: Shaded JAR - - - - org.elasticsearch - elasticsearch - ${elasticsearch.version} - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - false - true - - - - org.apache.maven.plugins - maven-shade-plugin - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - check-for-jar-hell - integration-test - - run - - - - - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - false - false - true - true - ${project.build.directory}/dependency-reduced-pom.xml - - - org.apache.lucene:* - com.spatial4j:* - - - - - - - true - - - - - - com.google.common - org.elasticsearch.common - - - com.google.thirdparty - org.elasticsearch.common.thirdparty - - - com.carrotsearch.hppc - org.elasticsearch.common.hppc - - - org.HdrHistogram - org.elasticsearch.common.HdrHistogram - - - org.yaml - org.elasticsearch.common.yaml - - - com.twitter.jsr166e - org.elasticsearch.common.util.concurrent.jsr166e - - - com.fasterxml.jackson - org.elasticsearch.common.jackson - - - org.joda.time - org.elasticsearch.common.joda.time - - - org.joda.convert - org.elasticsearch.common.joda.convert - - - org.jboss.netty - org.elasticsearch.common.netty - - - com.ning.compress - org.elasticsearch.common.compress - - - com.github.mustachejava - org.elasticsearch.common.mustache - - - com.tdunning.math.stats - org.elasticsearch.common.stats - - - org.apache.commons.lang - org.elasticsearch.common.lang - - - org.apache.commons.cli - org.elasticsearch.common.cli.commons - - - - - *:* - - META-INF/license/** - META-INF/* - META-INF/maven/** - LICENSE - NOTICE - /*.txt - build.properties - - - - - - - - - diff --git a/distribution/tar/pom.xml b/distribution/tar/pom.xml index 33181b281ab..744d7c924e7 100644 --- a/distribution/tar/pom.xml +++ b/distribution/tar/pom.xml @@ -19,15 +19,6 @@ The TAR distribution of Elasticsearch - - - org.elasticsearch.distribution.fully-loaded - elasticsearch - ${elasticsearch.version} - pom - - - ${project.basedir}/../src/main/packaging/packaging.properties diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml index 750944f60dc..6bb38fbb579 100644 --- a/distribution/zip/pom.xml +++ b/distribution/zip/pom.xml @@ -19,15 +19,6 @@ The ZIP distribution of Elasticsearch - - - org.elasticsearch.distribution.fully-loaded - elasticsearch - ${elasticsearch.version} - pom - - - ${project.basedir}/../src/main/packaging/packaging.properties diff --git a/docs/java-api/docs/index_.asciidoc b/docs/java-api/docs/index_.asciidoc index 152d76e4a8c..2b29f15fabd 100644 --- a/docs/java-api/docs/index_.asciidoc +++ b/docs/java-api/docs/index_.asciidoc @@ -60,24 +60,8 @@ json.put("message","trying out Elasticsearch"); [[java-docs-index-generate-beans]] ===== Serialize your beans -Elasticsearch already uses Jackson but shades it under -`org.elasticsearch.common.jackson` package. + - So, you can add your own Jackson version in your `pom.xml` file or in -your classpath. See http://wiki.fasterxml.com/JacksonDownload[Jackson -Download Page]. - -For example: - -[source,xml] --------------------------------------------------- - - com.fasterxml.jackson.core - jackson-databind - 2.1.3 - --------------------------------------------------- - -Then, you can start serializing your beans to JSON: +Elasticsearch already uses http://wiki.fasterxml.com/JacksonHome[Jackson]. +So you can use it to serialize your beans to JSON: [source,java] -------------------------------------------------- diff --git a/pom.xml b/pom.xml index c25d62f1fc8..0cc34ed578f 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ ${project.build.directory}/dev-tools - unshaded ${elasticsearch.tools.directory}/license-check/elasticsearch_license_header.txt ${elasticsearch.tools.directory}/license-check/license_header_definition.xml ${elasticsearch.tools.directory}/ant/integration-tests.xml @@ -336,7 +335,6 @@ ${lucene.maven.version} - com.google.guava guava @@ -416,8 +414,6 @@ 1.3.1 - - org.codehaus.groovy groovy-all @@ -551,7 +547,7 @@ - [3.1.0,3.3.0) + [3.1.0,) @@ -846,7 +842,7 @@ ${elasticsearch.tools.directory}/forbidden/core-signatures.txt ${elasticsearch.tools.directory}/forbidden/all-signatures.txt - ${elasticsearch.tools.directory}/forbidden/third-party-${elasticsearch.thirdparty.config}-signatures.txt + ${elasticsearch.tools.directory}/forbidden/third-party-signatures.txt ${forbidden.signatures} **.SuppressForbidden @@ -893,7 +889,7 @@ org.apache.maven.plugins maven-resources-plugin 2.7 - diff --git a/qa/pom.xml b/qa/pom.xml index d918de924ae..f8b1f38f6bd 100644 --- a/qa/pom.xml +++ b/qa/pom.xml @@ -146,7 +146,6 @@ smoke-test-plugins - smoke-test-shaded smoke-test-multinode diff --git a/qa/smoke-test-shaded/pom.xml b/qa/smoke-test-shaded/pom.xml deleted file mode 100644 index c1eb2e72e36..00000000000 --- a/qa/smoke-test-shaded/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - - org.elasticsearch.qa - elasticsearch-qa - 2.1.0-SNAPSHOT - - - smoke-test-shaded - QA: Smoke Test Shaded Jar - Runs a simple - - - shaded - true - - - - - org.elasticsearch.distribution.shaded - elasticsearch - ${elasticsearch.version} - - - org.hamcrest - hamcrest-all - test - - - org.apache.lucene - lucene-test-framework - test - - - diff --git a/qa/smoke-test-shaded/src/test/java/org/elasticsearch/shaded/test/ShadedIT.java b/qa/smoke-test-shaded/src/test/java/org/elasticsearch/shaded/test/ShadedIT.java deleted file mode 100644 index 9e8f022e715..00000000000 --- a/qa/smoke-test-shaded/src/test/java/org/elasticsearch/shaded/test/ShadedIT.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.elasticsearch.shaded.test; - -import org.apache.lucene.util.LuceneTestCase; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.logging.ESLoggerFactory; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.node.Node; -import org.elasticsearch.node.NodeBuilder; -import org.junit.Test; - -import java.nio.file.Path; - -/** - */ -public class ShadedIT extends LuceneTestCase { - - public void testStartShadedNode() { - ESLoggerFactory.getRootLogger().setLevel("ERROR"); - Path data = createTempDir(); - Settings settings = Settings.builder() - .put("path.home", data.toAbsolutePath().toString()) - .put("node.mode", "local") - .put("http.enabled", "false") - .build(); - NodeBuilder builder = NodeBuilder.nodeBuilder().data(true).settings(settings).loadConfigSettings(false).local(true); - try (Node node = builder.node()) { - Client client = node.client(); - client.admin().indices().prepareCreate("test").get(); - client.prepareIndex("test", "foo").setSource("{ \"field\" : \"value\" }").get(); - client.admin().indices().prepareRefresh().get(); - SearchResponse response = client.prepareSearch("test").get(); - assertEquals(response.getHits().getTotalHits(), 1l); - } - - } - - @Test - public void testLoadShadedClasses() throws ClassNotFoundException { - Class.forName("org.elasticsearch.common.cache.LoadingCache"); - Class.forName("org.elasticsearch.common.joda.time.DateTime"); - Class.forName("org.elasticsearch.common.util.concurrent.jsr166e.LongAdder"); - } - - @Test(expected = ClassNotFoundException.class) - public void testGuavaIsNotOnTheCP() throws ClassNotFoundException { - Class.forName("com.google.common.cache.LoadingCache"); - } - - @Test(expected = ClassNotFoundException.class) - public void testJodaIsNotOnTheCP() throws ClassNotFoundException { - Class.forName("org.joda.time.DateTime"); - } - - @Test(expected = ClassNotFoundException.class) - public void testjsr166eIsNotOnTheCP() throws ClassNotFoundException { - Class.forName("com.twitter.jsr166e.LongAdder"); - } -}