Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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?