Skip to content

Commit

Permalink
Now ships with new install script that automates copying of dependent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
essiembre committed Aug 29, 2016
1 parent 891cdb8 commit 454bbb2
Show file tree
Hide file tree
Showing 8 changed files with 486 additions and 413 deletions.
818 changes: 416 additions & 402 deletions norconex-committer-elasticsearch/pom.xml

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions norconex-committer-elasticsearch/src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
</properties>
<body>

<release version="2.0.3-SNAPSHOT" date="2016-??-??" description="Maintenance release">
<release version="2.1.0" date="2016-08-29" description="Feature release">
<action dev="essiembre" type="add">
Now ships with new install script that automates copying of dependent
libraries, taking into account possible version conflicts.
</action>
<action dev="dimassip" type="update">
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.
</action>
</release>

Expand Down
4 changes: 2 additions & 2 deletions norconex-committer-elasticsearch/src/main/assembly/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Norconex Elasticsearch Committer
Copyright 2013 Norconex Inc.
Copyright 2013-2016 Norconex Inc.

General Information:
====================
Expand All @@ -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:
==================
Expand Down
9 changes: 8 additions & 1 deletion norconex-committer-elasticsearch/src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@
<format>zip</format>
</formats>
<includeSiteDirectory>false</includeSiteDirectory>
<!-- -->

<fileSets>
<fileSet>
<directory>${basedir}/src/main/scripts</directory>
<includes>
<include>**</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/assembly/</directory>
<includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<div style="text-align: center; font-weight: bold;">
&nbsp;&nbsp;&nbsp;&nbsp;
<a target="_top" href="http://www.norconex.com/collectors/committer-elasticsearch/">Web Site</a>
<a target="_top" href="https://www.norconex.com/collectors/committer-elasticsearch/">Web Site</a>
&nbsp;&nbsp;|&nbsp;&nbsp;
<a target="_top" href="http://www.norconex.com/collectors/committer-elasticsearch/support">Support</a>
<a target="_top" href="https://www.norconex.com/collectors/committer-elasticsearch/support">Support</a>
&nbsp;&nbsp;|&nbsp;&nbsp;
<a target="_top" href="https://github.com/norconex/committer-elasticsearch/issues">Issues</a>
</div>
Expand Down
24 changes: 24 additions & 0 deletions norconex-committer-elasticsearch/src/main/scripts/install.bat
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions norconex-committer-elasticsearch/src/main/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 454bbb2

Please sign in to comment.