如何在Intellij中定义导入的Maven项目

时间:2023-01-13 10:08:46

I have opened an existing Maven project in Intellij. Under "Project Structure -> Artifacts" the pane is empty. When I click the + sign to add one, it chooses "unnamed.war".

我在Intellij开了一个现有的Maven项目。在“项目结构 - >工件”下,窗格为空。当我点击+号添加一个时,它会选择“unnamed.war”。

How can I get it to generate the artifactId and version as defined in the pom? I must be missing a step here.

如何让它生成pom中定义的artifactId和version?我必须在这里错过一步。

如何在Intellij中定义导入的Maven项目

1 个解决方案

#1


0  

It is important to understand how you created the project. Did you choose "Import project from external model"? If you simply opened an IntelliJ project that someone else created, then I would suggest creating a new project using the "Import project from external model" as this should properly build your dependencies and outputs correctly.

了解您如何创建项目非常重要。您选择“从外部模型导入项目”吗?如果您只是打开了其他人创建的IntelliJ项目,那么我建议使用“从外部模型导入项目”创建一个新项目,因为这应该正确地构建您的依赖项和输出。

#1


0  

It is important to understand how you created the project. Did you choose "Import project from external model"? If you simply opened an IntelliJ project that someone else created, then I would suggest creating a new project using the "Import project from external model" as this should properly build your dependencies and outputs correctly.

了解您如何创建项目非常重要。您选择“从外部模型导入项目”吗?如果您只是打开了其他人创建的IntelliJ项目,那么我建议使用“从外部模型导入项目”创建一个新项目,因为这应该正确地构建您的依赖项和输出。