我有一个大的多模块项目,我想向maven指定scm信息。 但是,每个模块和父项目都有一个在SVN上的专用文件夹,因此SCM信息似乎是每个模块的特定于每个模块。

我需要用于连接和开发元素的值?是否需要每个模块配置SCM,或者可以在父项目中配置一次?

感谢

有帮助吗?

解决方案

I tested two scenarios:

  • Defining the configuration only at the parent-pom level;

  • Defining the configuration at both the parent-pom and submodule level.

If you try mvn -DdryRun=true release:prepare on your parent pom project, you will get a release.properties file that shows you the release configuration maven would have used if it had actually performed the prepare goal.

From there, you can see, when testing the first scenario that maven will not tag the child modules. You will only see one project.scm.[groupId]\:[artifactId].url property. Testing the second scenario, with scm configuration done also at the submodule level, you will get one property for each submodule.

My conclusion is that for flat multi-module project structure, you should define scm at both the parent-pom and module level, each one pointing to the scm directory where this pom is located.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top