Maven integration not working
Answered
When I run maven goals in the command line, those are working fine. But running them from inside IntelliJ's Maven Projects (Maven Projects->Lifecycle-(goal, e.g clean, install)). I get "Process finished with exit code 1" error. I also installed the Maven Helper plugin and ran the maven goals using that but the same this happens. Does anyone have an idea why this is happening?
I'm using IntelliJ Idea 12.1.8. For reference I have been using the same version of IntelliJ in another machine and have the maven integration working fine for the same project on that one.
Would appreciate any help.
Thanks!
Please sign in to leave a comment.
Could be an antivirus issue or you have configured IntelliJ IDEA to use some broken JDK to run your Maven.
See also http://stackoverflow.com/a/42427510/104891.
I see the following error in idea.log.
2017-08-16 10:38:33,806 [2275023] INFO - #org.jetbrains.idea.maven - org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for 'com.github.eirslett:frontend-maven-plugin': Plugin requires Maven version 3.1.0
java.lang.RuntimeException: org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for 'com.github.eirslett:frontend-maven-plugin': Plugin requires Maven version 3.1.0
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:286)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$4.execute(Maven2ServerEmbedderImpl.java:286)
at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$4.execute(Maven2ServerEmbedderImpl.java:278)
at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$6.run(Maven2ServerEmbedderImpl.java:527)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
I'm not sure why its saying plugin requires 3.1.0 when I'm using 3.5.0?
Does it work from the command line Maven?
What version is configured in IntelliJ IDEA?
Yes, it runs from the command line. Intellij is configured to use maven 3.5.0. And looks like that's is the version that is being picked up because this is what I'm seeing in error
"C:\Program Files\Java\jdk1.8.0_131\bin\java" "-Dmaven.home=C:\Program Files\apache-maven-3.5.0" "-Dclassworlds.conf=C:\Program Files\apache-maven-3.5.0\bin\m2.conf" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.8\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\apache-maven-3.5.0\boot\plexus-classworlds-2.5.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.8\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --fail-fast --strict-checksums -s C:\Users\dipti.a.sharma\.m2\settings_16.2-cod-web.xml install
Process finished with exit code 1
Please see if using IntelliJ IDEA 2017 from http://www.jetbrains.com/idea/download/index.html helps. IntelliJ IDEA 12 may be not fully compatible with Maven > 3.0.
I am facing a different issue. I am using Community 2020.2 version on mac with JDK 1.8_127. I installed maven on my mac and it returns the mvn -version as 3.6.3. I installed maven, maven helper, maven runner, maven test support plugin, maven dependency helper etc.,
But the problem is when I run mvn -version, it returns zsh: command not found: mvn and when I click on maven tab on the right side vertical bar to run maven life cycle commands, the tab simply vanishes from the IDE until I restart the IDE. I configured JDK 1.8 path.
What is going on ?
Please help.
@...
Thank you for creating the separate thread for your case.