Comments (6)
In fact, tika-app is included but some transitives dependencies are excluded:
- tika-parsers
- tika-xmp
- slf4j-log4j12
- gson
But as you wrote, tika-app.jar contains too much libraries and we can not exclude it with Maven.
Here is the dependency tree before change proposal:
[INFO] org.elasticsearch:elasticsearch-mapper-attachments:jar:1.6.0-SNAPSHOT
[INFO] +- org.elasticsearch:elasticsearch:jar:0.19.0:compile
[INFO] | +- org.apache.lucene:lucene-core:jar:3.5.0:compile
[INFO] | +- org.apache.lucene:lucene-analyzers:jar:3.5.0:compile
[INFO] | +- org.apache.lucene:lucene-queries:jar:3.5.0:compile
[INFO] | +- org.apache.lucene:lucene-memory:jar:3.5.0:compile
[INFO] | \- org.apache.lucene:lucene-highlighter:jar:3.5.0:compile
[INFO] +- org.apache.tika:tika-app:jar:1.2:compile
[INFO] +- log4j:log4j:jar:1.2.17:runtime
[INFO] +- org.testng:testng:jar:6.8:test
[INFO] | +- org.beanshell:bsh:jar:2.0b4:test
[INFO] | +- com.beust:jcommander:jar:1.27:test
[INFO] | \- org.yaml:snakeyaml:jar:1.6:test
[INFO] \- org.hamcrest:hamcrest-all:jar:1.3:test
This generates a 22.1Mb ZIP plugin.
Here is the dependency tree after changing pom.xml with tika-parsers :
[INFO] +- org.elasticsearch:elasticsearch:jar:0.19.0:compile
[INFO] | +- org.apache.lucene:lucene-core:jar:3.5.0:compile
[INFO] | +- org.apache.lucene:lucene-analyzers:jar:3.5.0:compile
[INFO] | +- org.apache.lucene:lucene-queries:jar:3.5.0:compile
[INFO] | +- org.apache.lucene:lucene-memory:jar:3.5.0:compile
[INFO] | \- org.apache.lucene:lucene-highlighter:jar:3.5.0:compile
[INFO] +- org.apache.tika:tika-parsers:jar:1.2:compile
[INFO] | +- org.apache.tika:tika-core:jar:1.2:compile
[INFO] | +- org.gagravarr:vorbis-java-tika:jar:0.1:compile
[INFO] | | \- org.gagravarr:vorbis-java-core:jar:tests:0.1:runtime
[INFO] | +- edu.ucar:netcdf:jar:4.2-min:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.5.6:compile
[INFO] | +- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] | +- org.apache.james:apache-mime4j-dom:jar:0.7.2:compile
[INFO] | +- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO] | | \- org.tukaani:xz:jar:1.0:compile
[INFO] | +- commons-codec:commons-codec:jar:1.5:compile
[INFO] | +- org.apache.pdfbox:pdfbox:jar:1.7.0:compile
[INFO] | | +- org.apache.pdfbox:fontbox:jar:1.7.0:compile
[INFO] | | +- org.apache.pdfbox:jempbox:jar:1.7.0:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- org.bouncycastle:bcmail-jdk15:jar:1.45:compile
[INFO] | +- org.bouncycastle:bcprov-jdk15:jar:1.45:compile
[INFO] | +- org.apache.poi:poi:jar:3.8:compile
[INFO] | +- org.apache.poi:poi-scratchpad:jar:3.8:compile
[INFO] | +- org.apache.poi:poi-ooxml:jar:3.8:compile
[INFO] | | +- org.apache.poi:poi-ooxml-schemas:jar:3.8:compile
[INFO] | | | \- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile
[INFO] | | \- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] | +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] | +- asm:asm:jar:3.1:compile
[INFO] | +- com.googlecode.mp4parser:isoparser:jar:1.0-RC-1:compile
[INFO] | | \- org.aspectj:aspectjrt:jar:1.6.11:compile
[INFO] | +- com.drewnoakes:metadata-extractor:jar:2.4.0-beta-1:compile
[INFO] | +- de.l3s.boilerpipe:boilerpipe:jar:1.1.0:compile
[INFO] | +- rome:rome:jar:0.9:compile
[INFO] | | \- jdom:jdom:jar:1.0:compile
[INFO] | +- org.gagravarr:vorbis-java-core:jar:0.1:compile
[INFO] | \- com.googlecode.juniversalchardet:juniversalchardet:jar:1.0.3:compile
[INFO] +- log4j:log4j:jar:1.2.17:runtime
[INFO] +- org.testng:testng:jar:6.8:test
[INFO] | +- org.beanshell:bsh:jar:2.0b4:test
[INFO] | +- com.beust:jcommander:jar:1.27:test
[INFO] | \- org.yaml:snakeyaml:jar:1.6:test
[INFO] \- org.hamcrest:hamcrest-all:jar:1.3:test
This generates a 21.7Mb ZIP plugin.
New dependency is now:
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
Tests already works. Sounds good to me.
I will send a pull request with it and see if it makes sense for @elasticsearch team too.
from elasticsearch-mapper-attachments.
@dadoonet The change in your pull request looks good.
Seems like the tika-core dependency needs to be changed to tika-parsers dependency. Only downside I see now is that the ES plugin directory gets a bit pollute with jar files when users install this plugin.
from elasticsearch-mapper-attachments.
I am still confuse as to the difference between tike-app and including all the relevant jars on their own? We end up including the same ones, no?
from elasticsearch-mapper-attachments.
Problem with tika-app is it is a "fatjar" dependency.
I spent almost half a day this week debugging my project because of this : I'm using slf4j 1.6 and tika-app embeds slf4j 1.5 classes in it's fatjar.
And a dependency tree doesn't provide any relevant information in that case (in addition to the fact dependency eviction mecanism is not applied on fatjars).
The only solution was to play with dependency ordering to ensure my slf4j is declared before elastic-search-mapper-attachment dependency. I now have knowledge in this, but I think someone else will be trapped like I did if tika-app dep is kept,
from elasticsearch-mapper-attachments.
I see, so thats what I was missing, I did not understand that you were embedding the plugin in your own Java app, in this case, the change make sense, @martijnvg up for getting it in?
from elasticsearch-mapper-attachments.
Thanks for raising this issue!
Pushed and released a new version.
from elasticsearch-mapper-attachments.
Related Issues (20)
- Update to elasticsearch 2.1.2
- This plugin is incompatible with elasticsearch 2.2.0 HOT 5
- Loosing file.content on _update HOT 5
- Searching iWork files HOT 1
- Failed to index docx file with mapper-attachments plugin that comes with Elasticsearch 2.3.1 HOT 2
- Support for Elasticsearch 2.2.1 HOT 1
- Extracting "subject" and "page count" out of a pdf document HOT 2
- Filtered Query Match on Document Contents Not Working
- Unable to build HOT 1
- copy_to not working as expected HOT 1
- build it with gradle error HOT 1
- Plugin doesn't work with embedded elasticsearch in spring boot app's uber JAR HOT 1
- the txt file can't be search HOT 1
- mapper-attachments (documentation) link is broken HOT 1
- NodeJS example HOT 2
- ERROR: Plugin [mapper-attachments] is incompatible with Elasticsearch [2.4.4]. Was designed for version [2.1.2] HOT 3
- pdfbox error HOT 1
- Make the plugin available for ES6 HOT 1
- Please update Bouncy Castle HOT 1
- Support Elasticsearch 7.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-mapper-attachments.