5

I have updated to IntelliJ 14.0.1 today. I imported the Maven project I was working on IntelliJ 13.1 and although the project is imported successfully the dependencies cannot be found when I try to Make or Compile the project from IntelliJ.

I need to say that when I do a Maven install, even from inside IntelliJ, that is successful. But when I Make the project errors occur indicating that libraries (dependencies) are missing.

It seems to me that somehow the compilation step from IntelliJ does not pick up the Maven dependencies or is not taking the pom.xml into consideration.

Has anyone faced something similar? Any ideas on how to fix that? I have already tried re importing the project but didn't help. Additionally I have created a dummy project with only JUnit as a dependency but even then IntelliJ is complaining that it cannot find org.junit.Test when I try to run my tests.

UPDATE:

I see the following in the IntelliJ logs, which might be related. Seems like the compilation is aborted.

2014-11-14 17:17:11,460 [ 247914] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: 17:17:11,445 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.groovy] at [jar:file:/C:/Program%20Files%20(x86)/JetBrains/IntelliJ%20IDEA%20Community%20Edition%2014.0.1/plugins/gradle/lib/gradle.jar!/logback.groovy]

2014-11-14 17:17:11,460 [ 247914]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: 17:17:11,446 |-ERROR in ch.qos.logback.classic.LoggerContext[default] - Groovy classes are not available on the class path. ABORTING INITIALIZATION.

2014-11-14 17:17:13,459 [ 249913]   INFO - lij.compiler.impl.CompilerUtil -              COMPILATION FINISHED (BUILD PROCESS); Errors: 5; warnings: 0 took 2652 ms: 0 min 2sec
Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
nikkatsa
  • 1,751
  • 4
  • 26
  • 43
  • Invalidate caches, if it does not help then report a bug. – Meo Nov 14 '14 at 16:59
  • Check your maven config. In particular, are the executable and settings.xml located in the same way as your 13.1 config. – vikingsteve Nov 14 '14 at 17:17
  • Hi @vikingsteve thanks for the reply. Indeed the maven settings are the same as IntelliJ 13.1. I have updated my question with the logs, which might be helpful. – nikkatsa Nov 14 '14 at 17:27
  • Have you tried right clicking on the pom.xml, `Maven > Reimport`? This will reimport the pom's dependencies into your project. (Maybe your "External Libraries" is empty, for example.) – kuporific Nov 14 '14 at 17:48
  • Hello @kuporific. Yes I have tried that but unfortunately didn't work. It's very strange as I don't get any errors in the editor. It just refuses to "Make" or "compile". I had to roll back to 13.1 again as no solution after 4-5 hours of fiddling around. – nikkatsa Nov 14 '14 at 20:52
  • I'm seeing the same issue after updating to Intellij 14 from 13. I tried following the instructions [here](http://stackoverflow.com/a/11467266/947286) but that didn't help. All my dependencies show up as invalid in the Maven Projects tool window, and references to symbols defined in those packages are marked as invalid in the editor. I'm still able to build within the IDE by double-clicking the package Lifecycle in the Maven Projects tool window. I have another project that I imported from 13 to 14 that is also maven (pom) based and it works fine. – Phil Shapiro Nov 18 '14 at 14:49
  • Same issue here... I have followed the usual steps to get rid of the issue, but I still have the import issue. – Guillaume Dec 05 '14 at 14:02

3 Answers3

1

For the sake of others, my problem had to do with the location of the Maven repository. My Maven repository was in a network drive and apparently IntelliJ cannot read from UNC paths.

The fact that it cannot read from the UNC path is not really obvious and requires careful examination of the IntelliJ logs.

The obvious solution was to move the Maven Repo to the C:\drive.

Christopher Bottoms
  • 11,218
  • 8
  • 50
  • 99
nikkatsa
  • 1,751
  • 4
  • 26
  • 43
1

I've had the same issue.

I've done "Reimport all Maven Projects" from Maven project window. That resolved the issue.

When ever you do a new pull or changes in to the project, you need to reimport from the Maven Prjoct window. It helps IntelliJ to get all the dependencies properly in place for building the project.

Hope this helps.

javaAnto
  • 193
  • 1
  • 1
  • 8
0

Disable the Maven 3 checkbox in "Settings | Maven | Importing". You may then need to change the POM by adding a blank line and reimport.

This advice was taken from a previous problems reported when upgrading from ver 12 to 13. Thanks to user SchraderMJ11

EssY
  • 1
  • 1