【问题标题】:Add another intellij project from diffrent repository to main project将另一个来自不同存储库的 intellij 项目添加到主项目
【发布时间】:2020-11-06 11:35:34
【问题描述】:

我想将另一个 intellij 项目作为 intellij 模块添加到现有的主项目中。 项目在主项目以外的其他 github 存储库中可用。 我想向主项目添加一些配置,在下载最新更改时将其克隆,并自动将第二个项目添加到主项目。

有没有可能,怎么做?

我不希望我的团队中的每个开发人员都必须克隆 repo。

【问题讨论】:

    标签: git maven intellij-idea dependency-management


    【解决方案1】:

    您只需在当前项目中添加您想要的项目的依赖项。您需要在当前项目的pom.xml 文件中执行此操作。

    假设您要导入项目组 ID 为 com.abc,工件 ID 为 sample.artifact.id,版本为 1.0.0,那么您应该在 pom.xml 中添加的依赖项将如下所示.

    <dependencies>
            <dependency>
            <groupId>com.abc</groupId>
            <artifactId>sample.artifact.id</artifactId>
            <version>1.0.0</version>
            </dependency>
    </dependencies>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多