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?
Maven SCM supports Maven plugins (for example maven-release-plugin) and other tools by providing them with a common API for source code management operations. You can look at the list of SCMs for more information on using Maven SCM with your favorite SCM tool.
SCM stands for Source Code Management and the plugin provides integrations for different SCM systems like git or subversion.
As mentioned in POM Reference: SCM The connection requires read access for Maven to be able to find the source code (for example, an update), developerConnection requires a connection that will give write access .
The <execution> block is required to bind plugin execution to one of Maven's lifecycles. For surefire this is not necessary, since it is bound to the test phase by default. Note that the <execution> block can also contain a <configuration> block, so you can have multiple executions with different configurations.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With