gpt4 book ai didi

java - 无法在 IntelliJ 中导入 Maven 项目

转载 作者:行者123 更新时间:2023-12-02 10:43:17 25 4
gpt4 key购买 nike

当尝试通过pom.xml打开maven项目时,IntelliJ显示窗口:打开项目,当我单击“打开为项目”时,我可以看到该窗口: 扫描 Maven 项目。我无法访问在当前窗口或新窗口中打开的窗口。

当我尝试打开一个非 Maven 项目时,它会打开它。当我尝试将 Maven 项目作为普通项目打开时,它似乎没有执行任何操作。

我已经通过从 Git 克隆项目成功地将项目打开为 Maven 项目,但它给了我错误,指出它无法导入 Maven 依赖项。

我可以执行mvn --versionmvn cleancompile等。

我尝试打开不带 .idea 文件夹和带 .idea 文件夹的项目。那没有用。

我已经重新安装了 IntelliJ。

编辑:我正在使用 IntelliJ 版本:2018.2.4 Ultimate。

EDIT2:我刚刚注意到 pom.xlm 通常出现的蓝色是不同的,请参见屏幕截图。 other color?

最佳答案

要在 intellij Idea 中导入基于 Maven 的项目,请按照以下步骤操作:

Open intellij idea, Goto File menu, Click on New, Click on Project from existing sources, Select file or directory to import, Select POM file , Click on OK, Finalize the other steps, wait till the import loading gets completed(Sometime it takes much duration to complete) Your project will get loaded with files and folder on left side.

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

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