Question

I have a big multimodules project and I want to specify SCM infos to Maven. But, each one of the modules and the parent project have a dedicated folder on SVN, so it seems that SCM infos are specific to each module.

Which value I need to use for the connection and developerConnection elements? Do I need to configure SCM per module or it can be configured once in the parent project?

Thanks

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top