I want to integrate Apache Tika in my java project. I need to get text from different file formats (excel, doc, ppt, and more..) After some reading I understand that the only way to build tika is by downloading the src file and build it with Maven. I execute "mvn install" in the root directory of Tika src (apache-tika-0.9-src) , but i get this error:

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/apache/6/apache-6.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.apache.tika:tika:0.9 (C:\Users\vexler\Documents\Instal
ls\apache-tika-0.9-src\apache-tika-0.9\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.apache.tika:tika-parent:0.9: Could
 not transfer artifact org.apache:apache:pom:6 from/to central (http://repo1.mav
en.org/maven2): Error transferring file: Connection timed out: connect and 'pare
nt.relativePath' points at no local POM @ org.apache.tika:tika-parent:0.9, C:\Us
ers\vexler\Documents\Installs\apache-tika-0.9-src\apache-tika-0.9\tika-parent\po
m.xml, line 25, column 11 -> [Help 2]

I really appriciate any help with this error. Thanks :-) Reuth

有帮助吗?

解决方案

Assuming you're using Maven in your project, then life is much much simpler

Just add something like

<dependency>
   <groupId>org.apache.tika</groupId>
   <artifactId>tika-parsers</artifactId>
   <version>0.9</version>
   <scope>provided</scope>
 </dependency>

And Maven will then download Tika and it's dependencies for you

Alternately, if you download the latest Tika OSGi Bundle Jar (eg 0.9) and unpack that, then you'll get the Tika dependencies and code in that

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top