简体   繁体   English

IntelliJ Maven项目导入

[英]IntelliJ Maven project import

Once i import the existing maven project into my IntelliJ IDE. 一旦将现有的maven项目导入到IntelliJ IDE中。 Why the project name is coming as "main" only. 为什么项目名称仅作为“ main”出现。

在此处输入图片说明

I am just simpling opening the existing maven project into IntelliJ. 我只是向IntelliJ开放现有的Maven项目。 Please help what can be done to fix this. 请帮助可以解决此问题的方法。

The problem is that main is the root your project. 问题在于main是您项目的根。 The root of project is the directory where the pom.xml is. 项目的根目录是pom.xml所在的目录。 You should consider Standard Directory Layout 您应该考虑标准目录布局

在此处输入图片说明

Your pom.xml file should be in a root directory, not in the main directory. 您的pom.xml文件应位于根目录中,而不应位于main目录中。

For now you have your pom.xml in the main directory so IntellijIDEA recognizes the main as a maven module. 现在你有你pom.xmlmain目录中,以便IntellijIDEA识别main作为Maven的模块。 Please move your pom.xml on the same level as src directory. 请在与src目录相同的级别上移动pom.xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM