gpt4 book ai didi

maven-3 - 无法在 IntelliJ14 中导入 Maven 项目

转载 作者:行者123 更新时间:2023-12-03 08:34:42 26 4
gpt4 key购买 nike

我正在尝试从 IntelliJ 按钮(带有圆圈箭头的按钮)导入 Maven 项目,但收到以下消息“无法导入 Maven 项目。查看日志了解详细信息”,如下图所示

enter image description here

如果我进入日志,我会看到:

2015-06-01 11:16:46,932 [  89176]  ERROR -      #org.jetbrains.idea.maven - org/apache/maven/execution/MavenExecutionRequestPopulationException 
java.lang.NoClassDefFoundError: org/apache/maven/execution/MavenExecutionRequestPopulationException
at org.jetbrains.idea.maven.server.Maven32ServerImpl.applyProfiles(Maven32ServerImpl.java:81)
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:606)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.maven.execution.MavenExecutionRequestPopulationException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 16 more
2015-06-01 11:16:46,933 [ 89177] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 14.1.3 Build #IU-141.1010.3
2015-06-01 11:16:46,933 [ 89177] ERROR - #org.jetbrains.idea.maven - JDK: 1.7.0_71
2015-06-01 11:16:46,933 [ 89177] ERROR - #org.jetbrains.idea.maven - VM: Java HotSpot(TM) 64-Bit Server VM
2015-06-01 11:16:46,933 [ 89177] ERROR - #org.jetbrains.idea.maven - Vendor: Oracle Corporation
2015-06-01 11:16:46,933 [ 89177] ERROR - #org.jetbrains.idea.maven - OS: Linux
2015-06-01 11:16:46,933 [ 89177] ERROR - #org.jetbrains.idea.maven - Last Action: Maven.Reimport

我在 64 位 Ubuntu 机器上使用 Maven 3.3.3 和 JDK 1.7.0_71。

奇怪的是,我可以通过命令行使用 Maven。任何的想法?

最佳答案

下面一个对我有用;

转到文件 > 设置 > 构建、执行、部署 > 构建工具 > Maven > 导入。

更改 导入器的 VM 选项 -Didea.maven3.use.compat.resolver

关于maven-3 - 无法在 IntelliJ14 中导入 Maven 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30569909/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com