Why does IntelliJ think that I'm using Maven 2 in it's plugin

Hi all -

I had just set up my project in IntelliJ using the Maven plugin. However I can't build it (Ctrl + F9) because the IDE cannot pick up any external dependencies. I can build the project using the command line and also managed to modify some settings in the Maven plugin so that the compilation there worked as well. However, even forcing to re-import all maven modules doesn't work and neither does running a maven clean task within the IDE. I am attaching a screenshot of the IDE when I try and do this. I looked through the stack on the log file in ~/.IdeaIC11/system/log and I noticed that it doesn't register that I'm using Maven 3 - I definitely am. I am also copying the stack here if it would help for anyone.


EDIT: If you can't see the screenshot: http://tinypic.com/r/ns03t/6

Screenshot from 2012-08-27 23:32:39.png


2012-08-27 23:04:24,877 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 2012-08-27 23:04:24,881 [      4]   INFO -        #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IC-117.798, 25 Jul 2012 00:00) 2012-08-27 23:04:24,881 [      4]   INFO -        #com.intellij.idea.Main - JRE: 1.7.0_05-b06 (Oracle Corporation) 2012-08-27 23:04:24,881 [      4]   INFO -        #com.intellij.idea.Main - JVM: 23.1-b03 (Oracle Corporation) 2012-08-27 23:04:24,900 [     23]   INFO - .intellij.idea.IdeaApplication - WM detected: Mutter 2012-08-27 23:04:26,032 [   1155]   INFO - llij.ide.plugins.PluginManager - 28 plugins initialized in 1013 ms 2012-08-27 23:04:26,032 [   1155]   INFO - llij.ide.plugins.PluginManager - Loaded plugins:IDEA CORE, Eclipse Code Formatter (2.4.3), Commander (1.0.0), Inspection Gadgets (1.0), Properties Support, Plugin DevKit (1.0), Ant Support (1.0), Git Integration (8.1), Task Management (1.0), GitHub, hg4idea (10.0), Intention Power Pack (1.0), JUnit (1.0), Copyright (8.1), XPathView + XSLT Support (4), IntelliLang (8.0), Groovy (9.0), Maven Integration, I18n for Java, TestNG-J (8.0), Android Support (10.0), XSLT-Debugger (1.4), Subversion Integration (1.1), Gradle, Eclipse Integration (3.0), GenerateToString (5.0), UI Designer, CVS Integration (11) 2012-08-27 23:04:26,351 [   1474]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; mmap=true 2012-08-27 23:04:26,391 [   1514]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /opt/idea-community/bin/fsnotifier64 2012-08-27 23:04:26,393 [   1516]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational. 2012-08-27 23:04:27,128 [   2251]   INFO -                  TestNG Runner - Create TestNG Template Configuration 2012-08-27 23:04:27,136 [   2259]   INFO -                  TestNG Runner - Create TestNG Template Configuration 2012-08-27 23:04:27,223 [   2346]   INFO - ellij.project.impl.ProjectImpl - 23 project components initialized in 538 ms 2012-08-27 23:04:27,223 [   2346]   INFO - .module.impl.ModuleManagerImpl - 0 modules loaded in 0 ms 2012-08-27 23:04:27,234 [   2357]   INFO - .intellij.ide.XmlRpcServerImpl - XmlRpc server listening at /127.0.0.1:63342 2012-08-27 23:04:27,479 [   2602]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/macros.xml file is null 2012-08-27 23:04:27,479 [   2602]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/macros.xml 2012-08-27 23:04:27,485 [   2608]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml file is null 2012-08-27 23:04:27,485 [   2608]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml 2012-08-27 23:04:27,592 [   2715]   INFO - pl.stores.ApplicationStoreImpl - 77 application components initialized in 1535 ms 2012-08-27 23:04:27,611 [   2734]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/customization.xml file is null 2012-08-27 23:04:27,611 [   2734]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/customization.xml 2012-08-27 23:04:27,765 [   2888]   INFO - ij.openapi.wm.impl.IdeRootPane - App initialization took 3439 ms 2012-08-27 23:04:28,335 [   3458]   INFO -                  TestNG Runner - Create TestNG Template Configuration 2012-08-27 23:04:28,346 [   3469]   INFO -                  TestNG Runner - Create TestNG Template Configuration 2012-08-27 23:04:28,668 [   3791]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml file is null 2012-08-27 23:04:28,668 [   3791]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml 2012-08-27 23:04:28,702 [   3825]   INFO - api.vfs.impl.local.FileWatcher - 1 paths checked, 0 mapped, 385 mks 2012-08-27 23:04:28,744 [   3867]   INFO - ellij.project.impl.ProjectImpl - 139 project components initialized in 620 ms 2012-08-27 23:04:28,864 [   3987]   INFO - .module.impl.ModuleManagerImpl - 1 modules loaded in 120 ms 2012-08-27 23:04:28,912 [   4035]   INFO - api.vfs.impl.local.FileWatcher - 4 paths checked, 0 mapped, 406 mks 2012-08-27 23:04:29,488 [   4611]   INFO - .roots.impl.DirectoryIndexImpl - Directory index initialized in 257 ms, indexed 1162 directories 2012-08-27 23:04:29,494 [   4617]   INFO - pl.PushedFilePropertiesUpdater - File properties pushed in 3 ms 2012-08-27 23:04:29,631 [   4754]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/plainTextFiles.xml file is null 2012-08-27 23:04:29,631 [   4754]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/plainTextFiles.xml 2012-08-27 23:04:29,645 [   4768]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml file is null 2012-08-27 23:04:29,645 [   4768]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml 2012-08-27 23:04:29,654 [   4777]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gradle.xml file is null 2012-08-27 23:04:29,654 [   4777]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gradle.xml 2012-08-27 23:04:30,438 [   5561]   INFO - api.vfs.impl.local.FileWatcher - 6 paths checked, 0 mapped, 412 mks 2012-08-27 23:04:31,499 [   6622]   INFO - ution.rmi.RemoteProcessSupport - /usr/java/jdk1.7.0_05/jre/bin/java -Djava.awt.headless=true -Xmx512m -Dfile.encoding=UTF-8 -classpath /opt/idea-community/lib/resources_en.jar:/opt/idea-community/lib/annotations.jar:/opt/idea-community/lib/util.jar:/opt/idea-community/lib/trove4j.jar:/opt/idea-community/lib/jdom.jar:/opt/idea-community/plugins/maven/lib/lucene-core-2.4.1.jar:/opt/idea-community/plugins/maven/lib/activation-1.1.jar:/opt/idea-community/plugins/maven/lib/maven-2.2.1-uber.jar:/opt/idea-community/plugins/maven/lib/archetype-common-2.0-alpha-4-SNAPSHOT.jar:/opt/idea-community/plugins/maven/lib/nexus-indexer-1.2.3.jar:/opt/idea-community/plugins/maven/lib/maven2-server-impl.jar:/opt/idea-community/plugins/maven/lib/jaxb-api.jar:/opt/idea-community/plugins/maven/lib/jaxb-impl.jar:/opt/idea-community/plugins/maven/lib/wadl-core.jar:/opt/idea-community/plugins/maven/lib/mercury-artifact-1.0-alpha-6.jar:/opt/idea-community/plugins/maven/lib/commons-beanutils.jar:/opt/idea-community/plugins/maven/lib/resources_en.jar:/opt/idea-community/plugins/maven/lib/plexus-utils-1.5.5.jar:/opt/idea-community/plugins/maven/lib/maven-embedder-1.1-SNAPSHOT.jar:/opt/idea-community/plugins/maven/lib/maven-server-api.jar:/opt/idea-community/plugins/maven/lib/maven-dependency-tree-1.2.jar:/opt/idea-community/plugins/maven/lib/classworlds-1.1.jar org.jetbrains.idea.maven.server.RemoteMavenServer 2012-08-27 23:04:31,810 [   6933]   INFO - ution.rmi.RemoteProcessSupport - Port/ID: 51724/Maven2ServerImplce360d6a 2012-08-27 23:04:32,568 [   7691]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 2941 ms 2012-08-27 23:04:32,568 [   7691]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 2012-08-27 23:04:32,568 [   7691]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms 2012-08-27 23:04:33,792 [   8915]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null 2012-08-27 23:04:33,792 [   8915]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml 2012-08-27 23:04:33,793 [   8916]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null 2012-08-27 23:04:33,793 [   8916]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml 2012-08-27 23:04:33,822 [   8945]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null 2012-08-27 23:04:33,822 [   8945]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml 2012-08-27 23:04:34,190 [   9313]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null 2012-08-27 23:04:34,190 [   9313]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml 2012-08-27 23:04:34,955 [  10078]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 6905 ms 2012-08-27 23:04:36,141 [  11264]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml file is null 2012-08-27 23:04:36,141 [  11264]   INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml 2012-08-27 23:06:59,155 [ 154278]   INFO -      #org.jetbrains.idea.maven - org.apache.maven.lifecycle.LifecycleExecutionException: Error resolving version for 'org.apache.maven.plugins:maven-site-plugin': Plugin requires Maven version 3.0 java.lang.RuntimeException: org.apache.maven.lifecycle.LifecycleExecutionException: Error resolving version for 'org.apache.maven.plugins:maven-site-plugin': Plugin requires Maven version 3.0      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1549)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1503)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:1282)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:534)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)      at java.lang.reflect.Method.invoke(Method.java:601)      at org.jetbrains.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:298)      at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$5.execute(Maven2ServerEmbedderImpl.java:336)      at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$5.execute(Maven2ServerEmbedderImpl.java:334)      at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$6.run(Maven2ServerEmbedderImpl.java:521)      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) Caused by: java.lang.RuntimeException: org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for 'org.apache.maven.plugins:maven-site-plugin': Plugin requires Maven version 3.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.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)      ... 21 more 2012-08-27 23:07:20,202 [ 175325]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED 2012-08-27 23:07:20,255 [ 175378]   INFO - lij.compiler.impl.CompilerUtil - Initial VFS refresh took 43 ms: 0 min 0sec 2012-08-27 23:07:22,291 [ 177414]   INFO - lij.compiler.impl.CompilerUtil -      COMPILATION FINISHED; Errors: 100; warnings: 0 took 2088 ms: 0 min 2sec



Thanks!
Navin.

3 comments
Comment actions Permalink

By default, IDEA will use the maven installation that is defined in the M2_HOME environment variable. Is this set correctly? Go to File > Settings > Project Settings > Maven. On the settings dialog is a "Maven home directory" option. This will tell you where IDEA thinks your Maven install is based on the M2_HOME environment variable. You can also manually set the value by checking the "Override" option and entering the path to your maven installation. This is a per project setting. If you do override it and want that setting to be the default for all new projects you create in the future, go to File > Other Settings > Template Settings > Maven and make the setting there.

Reimport the project in the maven tool window after making any changes.

0
Comment actions Permalink

I had forced the M2_HOME directory to be where maven is installed locally (/opt/maven) and there hasn't been any change there either. Anyone else have suggestions?

-Navin.

0
Comment actions Permalink

To re-import project IDEA uses bundled Maven 2 so IDEA can not import your project. See http://youtrack.jetbrains.com/issue/IDEA-53501 . This will be fixed in IDEA 12.

0

Please sign in to leave a comment.