5

All the maven builds on idea are failing with the following error for each Maven dependency:

"Failed to read artifact dependency:coordinates" where "dependency:coordinates" could be any dependency in my pom.

When I go to the respective dependency inside the pom the part underlined in red reads...

"Dependency 'dependency:coordinates' not found."

The build works fine on the command-line (using cygwin).

I am using:

Intellij Idea 14.0.2 Maven 3.2.3 jdk 1.7.0_71

As I am working on a corporate network I have to access the outside world through a proxy server. I have configured Intellij Idea to use this proxy, so it should not have any trouble accessing the maven central repositories.

When I tail the idea log file as the builds fail I get the following:

2014-12-15 12:07:01,905 [2682540] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 2014-12-15 12:07:01,928 [2682563] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile C:\code_checkouts\idea_project 2014-12-15 12:07:03,056 [2683691] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 18; warnings: 0 took 1102 ms: 0 min 1sec 2014-12-15 12:07:03,890 [2684525] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: 12:07:03,852 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.groovy] at [jar:file:/C:/Program%20Files%20(x86)/JetBrains/IntelliJ%20IDEA%2014.0.2/plugins/gradle/lib/gradle.jar!/logback.groovy] 2014-12-15 12:07:03,890 [2684525] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: 12:07:03,854 |-ERROR in ch.qos.logback.classic.LoggerContext[default] - Groovy classes are not available on the class path. ABORTING INITIALIZATION. 2014-12-15 12:07:03,936 [2684571] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /C:/Program Files (x86)/JetBrains/IntelliJ IDEA 14.0.2/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.7.0_71/lib/tools.jar;/C:/Program Files (x86)/JetBrains/IntelliJ IDEA 14.0.2/lib/optimizedFileManager.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA 14.0.2/lib/ecj-4.4.jar

Can anyone suggest a solution???

The answer to the this question suggests that it is indeed a network connectivity issue however there is nothing in the snippet from the logs (above) to confirm this. Is there any way to increment the level of detail in the IDEA logs that would give more insight on the problem?? i.e. How does one configure debug logging in IDEA?

Failed to read artifact descriptor for maven-resources-plugin

Community
  • 1
  • 1
murungu
  • 2,090
  • 4
  • 21
  • 45
  • 1
    even though you wrote that, please make sure that Maven uses the same settings.xml both from cmd and from IDEA. in IDEA, maven has no logic, and it simply runs the commands that you give it – OhadR Dec 15 '14 at 11:35
  • 1
    Thanks @OhadR . Indeed they were using different settings files although this was not immediately obvious. Idea was using C:\/.m2/settings.xml whereas the command-line build was using C:\.m2/settings.xml -> I was oblivious to the fact that the cygwin $HOME directory is not the same as the Windows home directory and in my bash profile I defined M2_HOME as $HOME/.m2. If you put your comment as an answer I will credit you with supplying a solution. What bothers me most is that there not much in the Idea logs to show one that this is the real cause. – murungu Dec 15 '14 at 13:50
  • great news - problem solved :) i've put my comment as an answer; and i agree - IntelliJ does not show enough logs, and even if it does, you have to dig in order to find them. that is why when people ask me about problems with maven-build in IntelliJ, first I try to build it from command line ... – OhadR Dec 15 '14 at 15:04

3 Answers3

7

Even though you wrote that, please make sure that Maven uses the same settings.xml both from cmd and from IDEA. in IDEA, maven has no logic, and it simply runs the commands that you give it.

OhadR
  • 8,276
  • 3
  • 47
  • 53
0

I faced the same issue, got resolved after changing, settings.xml and maven home path in IntelliJ-->Settings-->Maven (Windows Environment)

By default, IntelliJ will be pointing to some other maven home inside its own IntelliJ directory(Program files), the same applies for settings.xml. Just change it to wherever your directories are available. Your Problem is resolved.

Divya Nayak
  • 67
  • 1
  • 7
0

Just faced with exactly the same issue. In my case two things helped. Settings.xml path was set correctly but Idea used built-in maven. I changed it to the maven I manually installed. And the second thing - I manually removed the jar from my local repo and clicked on "Reload maven project".

Alex
  • 65
  • 5