Sim*_*Sim 1 git intellij-idea maven
我有一个外部托管的空存储库。我现在想在本地创建一个由该源控制的 Intellij/maven 管理的 Java 项目。
我试过:
1>check out from source control
2>"would you like to create an IDEA proect for the sources you have checked out?" - YES
3>import from external model
4>configure stuff
5>select maven projects to import
Run Code Online (Sandbox Code Playgroud)
现在我被卡住了,因为列表是空的。
我也试过
1> setting up the maven project manually
2> initializing the git repository in root directory
3> adding origin
4> importing project into intellij
5> configuring the root directory, as suggested by intellij, for git
6> committing changes
7> selecting push (cvs -> git -> push) -> "no changes to push"
Run Code Online (Sandbox Code Playgroud)
我不明白,因为原点仍然是一个空的存储库。
因此,我如何告诉 intellij 在版本控制的文件夹中创建/使用 Maven 项目?
关键是IDEA在检出代码后如何提示你。有两条类似的消息:
如果显示了第一个(看起来是给你的),那么 IDEA 将从源而不是从 maven POM创建一个项目。在第二个事件中,它将从 pom 创建它,并且您的 IDEA 项目将链接到 maven POM。尽管如此,我个人还是喜欢在自动创建对话框中选择“否”。原因是在选择是时,它会立即打开项目。执行以下操作会贯穿几个配置对话框,让我在如何设置方面具有更大的灵活性。
通常,以下顺序适用于上述任一情况:
pom.xml从步骤 1 的检出位置选择根POM如果您的初始 checkout 没有 POM, 您需要执行以下操作来创建一个 maven 链接的 IDEA 项目:
| 归档时间: |
|
| 查看次数: |
5113 次 |
| 最近记录: |