如何将 Tika 集成到我的 Lucene 项目中?
我想将 Apache Tika 集成到我的 java 项目中。我需要从不同的文件格式(excel、doc、ppt 等)获取文本 经过一番阅读后,我了解到构建 tika 的唯一方法是下载 src 文件并使用 Maven 构建它。我在 Tika src (apache-tika-0.9-src) 的根目录中执行“mvn install”,但出现此错误:
[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 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您在项目中使用 Maven,那么生活会简单得多
只需添加类似的内容
然后 Maven 将为您下载 Tika 及其依赖项
或者,如果您下载最新的 Tika OSGi Bundle Jar (例如 0.9)并解压它,然后你将获得 Tika 依赖项和代码
Assuming you're using Maven in your project, then life is much much simpler
Just add something like
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