What is the purpose of adding scm information to a maven pom?

耗尽温柔 提交于 2019-12-21 03:22:10

问题


I understand why you would want to add archive information to a pom. But why SCM info? Is it possible to materialize a project completely from a pom?

The way I've always stored maven projects in svn, is I add everything (including the eclipse project, maven pom), to a repository. Any time I make a change to anything (including the pom), I do a SVN commit.

Is there a way to perform SVN operations directly through maven? Is this a best practice?


回答1:


The SCM plugin among other features such as site generation use the SCM configuration in the POM. The M2Eclipse plugin will materialize your Maven project from SCM using the configuration found in the POM.




回答2:


Another thing is important to know about Maven in this relationship, because if you are doing releases via the maven-release-plugin for which you need the SCM information, maven will automatically create SCM Tags for you etc.

Furthermore it's interesting to know where a project comes from if you are using an artifact in particularly in a commercial environment. (It's good to produce maven sites for that case).

It's also possible to do operations via the maven-release-plugin (create a branch) via Maven not via SVN directly.



来源:https://stackoverflow.com/questions/8124204/what-is-the-purpose-of-adding-scm-information-to-a-maven-pom

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!