Maven dependency
Hi
I read many threads about maven and IntelliJ but I cannot find solution for my problem. I have a maven project and I see that needed library was downloaded:
library - Maven:org.apache.httpcomponents - httpcore
In this library is package org.apache.http but the editor does not see it.
I can run "clean package" and package is created without any problems.
Project was imported from Eclipse.
Could someone help me?
请先登录再写评论。
Please try File | Invalidate Caches | Invalidate and Restart.
If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.
Thank you for answer. Cleaning resolve 90% problems with dependencies but I still have problem with org.apache.httpcomponents httpcore
This same pom works in Eclipse. Unfortunately I can attache only pom.xml - maybe the source of the problem is there
Attachment(s):
pom.xml
You have 2 different versions in the dependencies. Is that by design? Maybe you need only one?
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3.2</version>
</dependency>
I removed the second dependency - I added it when I was trying to solve the problem
Unfortunatelly the problem still exists.
When I use this pom in sample project I do not have problem with dependecy in the editor.
Try to remove .idea directory and .iml files from the project when IDEA is not running, then reimport the project from Maven.
Thank you very much - previously I imported project and next I added maven nature. This time I selected pom.xml during the import process and checked "Import Maven projects automatically".
Everything looks correct - thank you again for help. I can start using IntelliJ instead Eclipse :)