Idea运行maven启动失败
java.lang.RuntimeException: Cannot start maven service
at org.jetbrains.idea.maven.server.MavenServerConnector.connect(MavenServerConnector.java:159)
at org.jetbrains.idea.maven.server.MavenServerConnector.(MavenServerConnector.java:63)
at org.jetbrains.idea.maven.server.MavenServerManager.registerNewConnector(MavenServerManager.java:166)
at org.jetbrains.idea.maven.server.MavenServerManager.getConnector(MavenServerManager.java:154)
at org.jetbrains.idea.maven.server.MavenServerManager$2.create(MavenServerManager.java:396)
at org.jetbrains.idea.maven.server.MavenServerManager2. c r e a t e ( M a v e n S e r v e r M a n a g e r . j a v a : 385 ) a t o r g . j e t b r a i n s . i d e a . m a v e n . s e r v e r . R e m o t e O b j e c t W r a p p e r . g e t O r C r e a t e W r a p p e e ( R e m o t e O b j e c t W r a p p e r . j a v a : 41 ) a t o r g . j e t b r a i n s . i d e a . m a v e n . s e r v e r . M a v e n E m b e d d e r W r a p p e r . d o C u s t o m i z e ( M a v e n E m b e d d e r W r a p p e r . j a v a : 93 ) a t o r g . j e t b r a i n s . i d e a . m a v e n . s e r v e r . M a v e n E m b e d d e r W r a p p e r . l a m b d a 2.create(MavenServerManager.java:385) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:93) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda2.create(MavenServerManager.java:385)atorg.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)atorg.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:93)atorg.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambdacustomizeForResolve$1(MavenEmbedderWrapper.java:66)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:65)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:59)
at org.jetbrains.idea.maven.project.MavenProjectResolver.executeWithEmbedder(MavenProjectResolver.java:285)
at org.jetbrains.idea.maven.project.MavenProjectResolver.resolveFolders(MavenProjectResolver.java:216)
at org.jetbrains.idea.maven.project.MavenProjectsProcessorFoldersResolvingTask.perform(MavenProjectsProcessorFoldersResolvingTask.java:40)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:145)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:36)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor1. r u n ( M a v e n P r o j e c t s P r o c e s s o r . j a v a : 114 ) a t o r g . j e t b r a i n s . i d e a . m a v e n . u t i l s . M a v e n U t i l . l a m b d a 1.run(MavenProjectsProcessor.java:114) at org.jetbrains.idea.maven.utils.MavenUtil.lambda1.run(MavenProjectsProcessor.java:114)atorg.jetbrains.idea.maven.utils.MavenUtil.lambdarunInBackground$5(MavenUtil.java:500)
解决办法:VM options for importer 中添加参数 -Djava.net.preferIPv4Stack=true ,最后重新构建项目就好了