-1

I need to use apache-tika for my project but cannot use tika-app jar as the internal dependencies conflict with current jars versions.

So I need to download and import each and every dependency in Eclipse. My question is - which all dependencies do I need? Do I always need "provided Dependencies" or only the "Compile dependencies" and "runtime dependencies" would suffice?

PS: Already downloaded over 100 jars from maven tika-parser repository https://mvnrepository.com/artifact/org.apache.tika/tika-parsers/1.14

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](https://meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Jun 08 '17 at 07:47
  • This was the first time and I wasn't aware of it. Can you please remove your downvote to encourage beginners please? Though it was genuinely urgent, but still will not mark it as urgent again – mystic.coder Jun 08 '17 at 08:32
  • 1
    I should make it clear this is not a Stack Overflow rule. Unless there is a cultural difference in your geography that I am not aware of, people do not approach **volunteers** and tell them that they need to do something urgently. I would expect most volunteers would feel justified in saying something rather rude in reply. Why is it different on the internet? – halfer Jun 08 '17 at 08:42
  • 1
    I don't know sir but I was just **politely** asking for help as I couldn't find any answer to the aforementioned question - I was not asking volunteers to reply urgently, rather intimating that been spent hours looking for answer and downloading over a 100 jars....work has urgency...nevertheless I respect your viewpoint sir and took note not to repeat that in future – mystic.coder Jun 08 '17 at 08:49
  • Regarding question: we are using ANT (not maven), so need to download individual dependecies separately as mentioned here [link] https://tika.apache.org/1.14/gettingstarted.html – mystic.coder Jun 08 '17 at 08:53
  • 1
    Grab the Tika OSGi bundle, and get the dependencies from inside that? – Gagravarr Jun 08 '17 at 13:41

1 Answers1

2

Reusing this answer:

Using Maven to download dependencies to a directory on the command line

The following commands will download and run the stand-alone client for Apache Ivy.

curl -L -O http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar

java -jar ivy-2.4.0.jar \
     -dependency org.apache.tika tika-parsers 1.14 \
     -retrieve "lib/[artifact]-[revision](-[classifier]).[ext]" \
     -confs default

Results in the following files:

├── ivy-2.4.0.jar
└── lib
    ├── apache-mime4j-core-0.7.2.jar
    ├── apache-mime4j-dom-0.7.2.jar
    ├── asm-5.0.4.jar
    ├── bcmail-jdk15on-1.54.jar
    ├── bcpkix-jdk15on-1.54.jar
    ├── bcprov-jdk15on-1.54.jar
    ├── boilerpipe-1.1.0.jar
    ├── bzip2-0.9.1.jar
    ├── c3p0-0.9.1.1.jar
    ├── cdm-4.5.5.jar
    ├── commons-codec-1.10.jar
    ├── commons-collections4-4.1.jar
    ├── commons-compress-1.12.jar
    ├── commons-csv-1.0.jar
    ├── commons-exec-1.3.jar
    ├── commons-io-2.5.jar
    ├── commons-lang-2.6.jar
    ├── commons-logging-1.2.jar
    ├── commons-logging-api-1.1.jar
    ├── commons-vfs2-2.0.jar
    ├── curvesapi-1.04.jar
    ├── cxf-core-3.0.3.jar
    ├── cxf-rt-frontend-jaxrs-3.0.3.jar
    ├── cxf-rt-rs-client-3.0.3.jar
    ├── cxf-rt-transports-http-3.0.3.jar
    ├── ehcache-core-2.6.2.jar
    ├── fontbox-2.0.3.jar
    ├── geoapi-3.0.0.jar
    ├── grib-4.5.5.jar
    ├── gson-2.2.4.jar
    ├── guava-17.0.jar
    ├── httpclient-4.2.6.jar
    ├── httpcore-4.2.5.jar
    ├── httpmime-4.2.6.jar
    ├── httpservices-4.5.5.jar
    ├── isoparser-1.1.18.jar
    ├── jackcess-2.1.4.jar
    ├── jackcess-encrypt-2.1.1.jar
    ├── jackson-core-2.8.1.jar
    ├── java-libpst-0.8.1.jar
    ├── javax.annotation-api-1.2.jar
    ├── javax.ws.rs-api-2.0.1.jar
    ├── jcip-annotations-1.0.jar
    ├── jcommander-1.35.jar
    ├── jdom2-2.0.4.jar
    ├── jempbox-1.8.12.jar
    ├── jhighlight-1.0.2.jar
    ├── jj2000-5.2.jar
    ├── jmatio-1.2.jar
    ├── jna-4.1.0.jar
    ├── joda-time-2.2.jar
    ├── json-20140107.jar
    ├── json-simple-1.1.1.jar
    ├── jsoup-1.7.2.jar
    ├── jsr-275-0.9.3.jar
    ├── juniversalchardet-1.0.3.jar
    ├── junrar-0.7.jar
    ├── jwnl-1.3.3.jar
    ├── maven-scm-api-1.4.jar
    ├── maven-scm-provider-svn-commons-1.4.jar
    ├── maven-scm-provider-svnexe-1.4.jar
    ├── metadata-extractor-2.9.1.jar
    ├── netcdf4-4.5.5.jar
    ├── opennlp-maxent-3.0.3.jar
    ├── opennlp-tools-1.5.3.jar
    ├── pdfbox-2.0.3.jar
    ├── pdfbox-debugger-2.0.3.jar
    ├── pdfbox-tools-2.0.3.jar
    ├── plexus-utils-1.5.6.jar
    ├── poi-3.15.jar
    ├── poi-ooxml-3.15.jar
    ├── poi-ooxml-schemas-3.15.jar
    ├── poi-scratchpad-3.15.jar
    ├── protobuf-java-2.5.0.jar
    ├── quartz-2.2.0.jar
    ├── regexp-1.3.jar
    ├── rome-1.5.1.jar
    ├── rome-utils-1.5.1.jar
    ├── sis-metadata-0.6.jar
    ├── sis-netcdf-0.6.jar
    ├── sis-referencing-0.6.jar
    ├── sis-storage-0.6.jar
    ├── sis-utility-0.6.jar
    ├── slf4j-api-1.7.12.jar
    ├── stax2-api-3.1.4.jar
    ├── tagsoup-1.2.1.jar
    ├── tika-core-1.14.jar
    ├── tika-parsers-1.14.jar
    ├── udunits-4.5.5.jar
    ├── vorbis-java-core-0.8.jar
    ├── vorbis-java-tika-0.8.jar
    ├── woodstox-core-asl-4.4.1.jar
    ├── xmlbeans-2.6.0.jar
    ├── xmlschema-core-2.1.0.jar
    ├── xmpcore-5.1.2.jar
    └── xz-1.5.jar

Update

If you want the compile and provided dependencies, you just specify them as ivy configurations. For example

java -jar ivy-2.4.0.jar \
     -dependency org.apache.tika tika-parsers 1.14 \     
     -retrieve "lib/[artifact]-[revision](-[classifier]).[ext]" \
     -confs compile,provided

If you want to understand the relationship between Maven scopes and ivy configurations I can recommend the following:

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • Thanks for this but please clarify that both "compile dependencies" and "provided dependencies" are required of each of the sub compile dependencies of the main Tika 1.14 [link] https://mvnrepository.com/artifact/org.apache.tika/tika-parsers/1.14 ? Let me repeat that I am not using maven but using separate jars to compile separately with other needful for the bigger project – mystic.coder Jun 13 '17 at 06:46
  • 1
    @mystic.coder I have updated my answer to demonstrate how the compile and provided dependencies can be retrieved, but I suspect this is still not addressing the problem you're trying to solve. Retrieving Maven dependencies is a non-trivial problem, considering that dependencies can have dependencies and sometimes versions don't match up. – Mark O'Connor Jun 18 '17 at 15:26