How to split up git repo and apply Maven submodules and Maven parent?

后端 未结 1 1930
难免孤独
难免孤独 2021-01-15 05:31

I need some advice on how to configure multiple repo\'s such that they share a Maven parent and also are configured as submodules in a Maven root project.

I\'m maint

1条回答
  •  -上瘾入骨i
    2021-01-15 06:17

    The term module is a bit overloaded here.

    Yes, you can define in one repo a parent pom, declaring a multi-module maven project, each module referring to a subfolder.

    Those subfolders can be created through git submodule add command, referencing each a remote repository where the sub-project is versioned.
    The subfolders are relative to the root folder of the parent directory, but should not need ../.

    Each submodule repo can have its own pom.xml, which would reference the main project pom as a parent pom.

    0 讨论(0)
提交回复
热议问题