From 454bbb244103bb667ec90aec1522107367339bf5 Mon Sep 17 00:00:00 2001 From: Pascal Essiembre Date: Mon, 29 Aug 2016 14:02:49 -0400 Subject: [PATCH] Now ships with new install script that automates copying of dependent libraries, taking into account possible version conflicts. Upgraded to Elasticsearch 2.3.5, Norconex Committer Core 2.0.5, Norconex Commons Lang 1.12.0, Apache Commons Lang 2.6. --- norconex-committer-elasticsearch/pom.xml | 818 +++++++++--------- .../src/changes/changes.xml | 9 +- .../src/main/assembly/NOTICE.txt | 4 +- .../src/main/assembly/dist.xml | 9 +- .../src/main/javadoc/overview.html | 4 +- .../src/main/scripts/install.bat | 24 + .../src/main/scripts/install.sh | 22 + .../ElasticsearchCommitterTest.java | 9 +- 8 files changed, 486 insertions(+), 413 deletions(-) create mode 100644 norconex-committer-elasticsearch/src/main/scripts/install.bat create mode 100644 norconex-committer-elasticsearch/src/main/scripts/install.sh diff --git a/norconex-committer-elasticsearch/pom.xml b/norconex-committer-elasticsearch/pom.xml index d7a3165..d627154 100644 --- a/norconex-committer-elasticsearch/pom.xml +++ b/norconex-committer-elasticsearch/pom.xml @@ -14,420 +14,434 @@ limitations under the License. --> - 4.0.0 - com.norconex.collectors - norconex-committer-elasticsearch - 2.0.3-SNAPSHOT - Norconex Committer Elasticsearch + 4.0.0 + com.norconex.collectors + norconex-committer-elasticsearch + 2.1.0 + Norconex Committer Elasticsearch + Elasticsearch implementation of Norconex Committer. - - - UTF-8 + + UTF-8 UTF-8 - - - 2013 + + + 2013 - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + - - - sonatype.oss.snapshots - Sonatype OSS Snapshot Repository - http://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - + + + sonatype.oss.snapshots + Sonatype OSS Snapshot Repository + http://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + + + + junit + junit + 4.12 + + + org.elasticsearch + elasticsearch + 2.3.5 + + + com.norconex.collectors + norconex-committer-core + 2.0.5 + + + commons-codec + commons-codec + 1.10 + + - - - junit - junit - 4.12 - - - org.elasticsearch - elasticsearch - 2.1.0 - - - com.norconex.collectors - norconex-committer-core - 2.0.3 - - - commons-codec - commons-codec - 1.10 - - + + + + com.norconex.commons + norconex-commons-lang + 1.12.0 + + + commons-lang + commons-lang + 2.6 + + + - Elasticsearch implementation of Norconex Committer. - - - - ${project.build.testSourceDirectory} - - ** - - - - false - ${project.build.sourceDirectory} - - ** - - - **/*.java - - - - false - src/main/resources - - ** - - - - - - org.apache.maven.wagon - wagon-ssh - 1.0 - - - - - - org.codehaus.mojo - sonar-maven-plugin - 2.5 - - - org.apache.maven.plugins - maven-site-plugin - 3.3 - - true - UTF-8 - UTF-8 - - ${basedir}/src/site/skinless.vm - - - - - org.apache.velocity - velocity - 1.7 - - - org.apache.maven.doxia - doxia-site-renderer - 1.4 - - - org.apache.maven.doxia - doxia-module-markdown - 1.4 - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.2 - - 1.7 - 1.7 + + + + ${project.build.testSourceDirectory} + + ** + + + + false + ${project.build.sourceDirectory} + + ** + + + **/*.java + + + + false + src/main/resources + + ** + + + + + + org.apache.maven.wagon + wagon-ssh + 1.0 + + + + + + org.codehaus.mojo + sonar-maven-plugin + 2.5 + + + org.apache.maven.plugins + maven-site-plugin + 3.3 + + true + UTF-8 + UTF-8 + + ${basedir}/src/site/skinless.vm + + + + + org.apache.velocity + velocity + 1.7 + + + org.apache.maven.doxia + doxia-site-renderer + 1.4 + + + org.apache.maven.doxia + doxia-module-markdown + 1.4 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.2 + + 1.7 + 1.7 UTF-8 - - - - org.codehaus.mojo - license-maven-plugin - 1.7 - - - download-licenses - - download-licenses - - - - create-license-list - - add-third-party - - generate-resources - - - - - maven-assembly-plugin - - - src/main/assembly/dist.xml - - false - - - - make-assembly - package - - single - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.2 - - ${basedir}/src/main/javadoc/overview.html - protected - true - 1.7 - - - - make-javadoc - prepare-package - - javadoc - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.4 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - true - true - - - - - - - test-jar - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.7 - - - id.post-site - post-site - - run - - - - Remove useless site files - - - - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.3 - true - - ossrh - https://oss.sonatype.org/ - false - - - - + + + + org.codehaus.mojo + license-maven-plugin + 1.7 + + + download-licenses + + download-licenses + + + + create-license-list + + add-third-party + + generate-resources + + + + + maven-assembly-plugin + + + src/main/assembly/dist.xml + + false + + + + make-assembly + package + + single + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.2 + + ${basedir}/src/main/javadoc/overview.html + protected + false + 1.7 + false + + https://www.norconex.com/product/commons-lang/apidocs/ + https://www.norconex.com/collectors/committer-core/latest/apidocs/ + https://commons.apache.org/proper/commons-configuration/javadocs/v1.10/apidocs/ + + + + + make-javadoc + prepare-package + + javadoc + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + true + true + + + + + + + test-jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + id.post-site + post-site + + run + + + + Remove useless site files + + + + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + ossrh + https://oss.sonatype.org/ + false + + + + - - - norconex-site-deployment - ${site.baseurl}/collectors/committer-elasticsearch/latest - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + norconex-site-deployment + ${site.baseurl}/collectors/committer-elasticsearch/latest + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.6 - - false - - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - ${basedir}/src/main/javadoc/overview.html -
div.aboutLanguage .siteLink {font-size: 2em;} - - Norconex Elasticsearch Committer - - ]]> -
-
- var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-23162620-1']); - _gaq.push(['_setDomainName', 'norconex.com']); - _gaq.push(['_trackPageview']); - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - - Submit an Issue -   |   - www.norconex.com - ]]> -
- protected - false - 1.7 -
- - - default - - - - javadoc - - - -
-
-
+ + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.7 + + false + false + + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + ${basedir}/src/main/javadoc/overview.html +
div.aboutLanguage .siteLink {font-size: 2em;} + + Norconex Elasticsearch Committer + + ]]> +
+
+ var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-23162620-1']); + _gaq.push(['_setDomainName', 'norconex.com']); + _gaq.push(['_trackPageview']); + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + Submit an Issue +   |   + www.norconex.com + ]]> +
+ protected + false + 1.7 + false + + https://www.norconex.com/product/commons-lang/apidocs/ + https://www.norconex.com/collectors/committer-core/latest/apidocs/ + https://commons.apache.org/proper/commons-configuration/javadocs/v1.10/apidocs/ + +
+ + + default + + + + javadoc + + + +
+
+
- http://www.norconex.com/collectors/committer-elasticsearch - - Norconex Inc. - http://www.norconex.com - - - https://github.com/Norconex/committer-elasticsearch - scm:git:git@github.com:Norconex/committer-elasticsearch.git - scm:git:git@github.com:Norconex/committer-elasticsearch.git - - - https://github.com/Norconex/committer-elasticsearch/issues - GitHub - + https://www.norconex.com/collectors/committer-elasticsearch + + Norconex Inc. + https://www.norconex.com + + + https://github.com/Norconex/committer-elasticsearch + scm:git:git@github.com:Norconex/committer-elasticsearch.git + scm:git:git@github.com:Norconex/committer-elasticsearch.git + + + https://github.com/Norconex/committer-elasticsearch/issues + GitHub + - - - dimassip - Pascal Dimassimo - pascal.dimassimo@norconex.com - Norconex Inc. - http://www.norconex.com - - project leader - developer - - -4 - - - essiembre - Pascal Essiembre - pascal.essiembre@norconex.com - Norconex Inc. - http://www.norconex.com - - release manager - - -4 - - - - + + + essiembre + Pascal Essiembre + pascal.essiembre@norconex.com + Norconex Inc. + https://www.norconex.com + + release manager + + -4 + + + +
\ No newline at end of file diff --git a/norconex-committer-elasticsearch/src/changes/changes.xml b/norconex-committer-elasticsearch/src/changes/changes.xml index ebf790f..241e6e8 100644 --- a/norconex-committer-elasticsearch/src/changes/changes.xml +++ b/norconex-committer-elasticsearch/src/changes/changes.xml @@ -7,9 +7,14 @@ - + + + Now ships with new install script that automates copying of dependent + libraries, taking into account possible version conflicts. + - Upgraded to Elasticsearch 2.1.0 + Upgraded to Elasticsearch 2.3.5, Norconex Committer Core 2.0.5, + Norconex Commons Lang 1.12.0, Apache Commons Lang 2.6. diff --git a/norconex-committer-elasticsearch/src/main/assembly/NOTICE.txt b/norconex-committer-elasticsearch/src/main/assembly/NOTICE.txt index 2befa0a..592dde6 100644 --- a/norconex-committer-elasticsearch/src/main/assembly/NOTICE.txt +++ b/norconex-committer-elasticsearch/src/main/assembly/NOTICE.txt @@ -1,5 +1,5 @@ Norconex Elasticsearch Committer -Copyright 2013 Norconex Inc. +Copyright 2013-2016 Norconex Inc. General Information: ==================== @@ -8,7 +8,7 @@ For any inquiries about Norconex Elasticsearch Committer, please contact Norconex Inc. at info@norconex.com. This product website and documentation is located at: -http://www.norconex.com/collectors/committer-elasticsearch/ +https://www.norconex.com/collectors/committer-elasticsearch/ Norconex licenses: ================== diff --git a/norconex-committer-elasticsearch/src/main/assembly/dist.xml b/norconex-committer-elasticsearch/src/main/assembly/dist.xml index 30e9b31..9e69445 100644 --- a/norconex-committer-elasticsearch/src/main/assembly/dist.xml +++ b/norconex-committer-elasticsearch/src/main/assembly/dist.xml @@ -21,8 +21,15 @@ zip false - + + + ${basedir}/src/main/scripts + + ** + + / + ${basedir}/src/main/assembly/ diff --git a/norconex-committer-elasticsearch/src/main/javadoc/overview.html b/norconex-committer-elasticsearch/src/main/javadoc/overview.html index a172f53..133a1a7 100644 --- a/norconex-committer-elasticsearch/src/main/javadoc/overview.html +++ b/norconex-committer-elasticsearch/src/main/javadoc/overview.html @@ -2,9 +2,9 @@
     -Web Site +Web Site   |   -Support +Support   |   Issues
diff --git a/norconex-committer-elasticsearch/src/main/scripts/install.bat b/norconex-committer-elasticsearch/src/main/scripts/install.bat new file mode 100644 index 0000000..487426e --- /dev/null +++ b/norconex-committer-elasticsearch/src/main/scripts/install.bat @@ -0,0 +1,24 @@ +@echo off +cd %~dp0 + +echo. +echo PLEASE READ CAREFULLY +echo. +echo To install this component and its dependencies into another product, +echo please specify the target product directory where libraries (.jar files) +echo can be found. +echo. +echo This is often a "lib" directory. For example, to install this component +echo into the Norconex HTTP Collector, specify the full path to the Collector +echo "lib" directory, which may look somewhat like this: +echo. +echo C:\MyProject\norconex-collector-http-x.x.x\lib +echo. +echo If .jar duplicates are found, you will be asked how you wish to deal with +echo them. It is recommended to try keep most recent versions upon encountering +echo version conflicts. When in doubt, simply choose the default option. +echo. + +java -Dfile.encoding=UTF8 -cp "./lib/*" com.norconex.commons.lang.jar.JarCopier ./lib + +pause \ No newline at end of file diff --git a/norconex-committer-elasticsearch/src/main/scripts/install.sh b/norconex-committer-elasticsearch/src/main/scripts/install.sh new file mode 100644 index 0000000..ac71336 --- /dev/null +++ b/norconex-committer-elasticsearch/src/main/scripts/install.sh @@ -0,0 +1,22 @@ +#!/bin/sh +cd $(dirname $0) + +echo "" +echo "PLEASE READ CAREFULLY" +echo "" +echo "To install this component and its dependencies into another product," +echo "please specify the target product directory where libraries (.jar files)" +echo "can be found." +echo "" +echo "This is often a "lib" directory. For example, to install this component" +echo "into the Norconex HTTP Collector, specify the full path to the Collector" +echo "\"lib\" directory, which may look somewhat like this:" +echo "" +echo " /myProject/norconex-collector-http-x.x.x/lib" +echo "" +echo "If .jar duplicates are found, you will be asked how you wish to deal with" +echo "them. It is recommended to try keep most recent versions upon encountering" +echo "version conflicts. When in doubt, simply choose the default option." +echo "" + +java -Dfile.encoding=UTF8 -cp "./lib/*" com.norconex.commons.lang.jar.JarCopier "./lib" \ No newline at end of file diff --git a/norconex-committer-elasticsearch/src/test/java/com/norconex/committer/elasticsearch/ElasticsearchCommitterTest.java b/norconex-committer-elasticsearch/src/test/java/com/norconex/committer/elasticsearch/ElasticsearchCommitterTest.java index e27b8be..3dab47d 100644 --- a/norconex-committer-elasticsearch/src/test/java/com/norconex/committer/elasticsearch/ElasticsearchCommitterTest.java +++ b/norconex-committer-elasticsearch/src/test/java/com/norconex/committer/elasticsearch/ElasticsearchCommitterTest.java @@ -31,6 +31,7 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.io.input.NullInputStream; +import org.apache.commons.lang3.CharEncoding; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.client.Client; @@ -100,7 +101,7 @@ public void tearDown() throws Exception { @Test public void testCommitAdd() throws Exception { String content = "hello world!"; - InputStream is = IOUtils.toInputStream(content); + InputStream is = IOUtils.toInputStream(content, CharEncoding.UTF_8); // Add new doc to ES String id = "1"; @@ -200,7 +201,7 @@ public void testWriteRead() throws Exception { public void testSetSourceReferenceField() throws Exception { String content = "hello world!"; - InputStream is = IOUtils.toInputStream(content); + InputStream is = IOUtils.toInputStream(content, CharEncoding.UTF_8); // Force to use a reference field instead of the default // reference ID. @@ -236,7 +237,7 @@ public void testSetSourceReferenceField() throws Exception { public void testKeepIdSourceField() throws Exception { String content = "hello world!"; - InputStream is = IOUtils.toInputStream(content); + InputStream is = IOUtils.toInputStream(content, CharEncoding.UTF_8); // Force to use a reference field instead of the default // reference ID. @@ -328,7 +329,7 @@ public void testKeepCustomsourceContentField() throws Exception { public void testCustomtargetContentField() throws Exception { String content = "hello world!"; - InputStream is = IOUtils.toInputStream(content); + InputStream is = IOUtils.toInputStream(content, CharEncoding.UTF_8); String targetContentField = "customContent"; Properties metadata = new Properties();