Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Dependency Management

Xiao Qi
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Xiao Qi
Front End Web Development Techdegree Graduate 25,627 Points

Cannot add Tika into my project

When I clicked the reimport button in the Maven Project tool window. IntelliJ didn't automatically download Tika into my project.

3 Answers

Kareem Jeiroudi
Kareem Jeiroudi
14,984 Points

Could you describe your problem a bit better? I think you've solved the problem by now. However, I just wanted to emphasise using tika-core as @Adam Fields said instead of tika. For me, I had a problem where the dependency wouldn't be added to the external libraries. I tried refreshing in the Maven Projects menu, but no new libraries are added. Then I tried using Tika-core, so I replaced

<!-- https://mvnrepository.com/artifact/org.apache.tika/tika -->
<dependency>
    <groupId>org.apache.tika</groupId>
    <artifactId>tika</artifactId>
    <version>1.18</version>
    <type>pom</type>
</dependency>

with

<!--Working-->

<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
<dependency>
    <groupId>org.apache.tika</groupId>
    <artifactId>tika-core</artifactId>
    <version>1.18</version>
</dependency>

and everything got working perfectly. In case this was your issue, I hope then that this fixes your problem. In case you were having a different issue, please describe it more clearly, as it'd be also helpful to know how you solved your problems.

Juneau Lim
Juneau Lim
13,362 Points

Thank you for this. I don't know why but in my case, I had to erase <type>bundle</type>.

Hi Xiao Qi ,

I had this problem as well. I was using the tika artifactId and not tika-core. Switching to tika-core resolved the issue.

my settings are this:

<dependency> <groupId>org.apache.tika</groupId> <artifactId>tika-core</artifactId> <version>1.18</version> <type>pom</type> </dependency>,

But I keep getting this error on my import line in App.java

"Cannot resolve symbol tika"

line looks like: import org.apache.tika.Tika;

Any suggestions?