I'm new to Intellij Idea, i just import a project with pom.xml
, but the ide didn't resolve anything in maven dependencies.
Anything defined in pom.xml
dependencies when import in code raise an error cannot resolve symbol xxxxx
But mvn install
will work, i try import the dependencies in Project Settings/Libraries
in .jar
files, then it works, but could the ide resolve libraries defined in pom.xml
? i don't want to do that everytime.
Additionnal info:
IDEA version: 12.0.3, OS : windows 7, reimport does not work, maven version : 3.0.4, maven dependencies does not exists under Exernal Libraries.
there is no exceptions in idea.log...
I was getting this error because my project was not setup correctly. It had imported main and test folders as modules. When I deleted the 2 modules (but retained them as source and test folders), my code started compiling correctly.
I have encountered this problem,idea cannot download all dependent jar packages using maven,i just tried the following operations:
then all the dependent jar packages are download from the maven repository
I ran into this issue when using IntelliJ 14's bundled Maven 3 instance.
I switched to using my own local Maven instance, via:
Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Maven Home Directory
Then added the path to my locally installed instance.
This got the dependencies to magically appear.
With intelliJ 16.1.4 I had the same issue. You should have a look at the Event Log, because it told me "Non-managed pom.xml file found:..." I then clicked on it and the problem was solved.
<option name="workOffline" value="true" />
inworkspace.xml
is not your friend. Advise to check this before deleting your.idea
(which has a lot of useful settings you probably don't want to lose)It's a maven
workspace.xml
settingI had empty settings.xml file in Users/.../.m2/settings.xml. When i added
all dependicies were loaded