I think one of the nicer things about Maven is pluggability ( apart from ability to have mulptiple profiles).
Maven release plugin abstracts a bunch of task to be performed pre-release. This plugin comes default with maven 2.x.
This simple command does all the hard work for you:
mvn release:clean release:prepare release:perform
This cleans any previous release config, tags the release, increments the snapshot version , commits themand finally sends artefacts to proxy maven repository(like archiva).
Gotchas:
1. This happened when I tried using release feature for the first time.
It would fail saying cannot tag the release.. inspite of able to commit the code with version changes.
Solution:
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
</plugin>
Also check the scm config in your pom
<scm>
<connection>scm:svn:svn://svn.company.com/my_project/trunk</connection>
<developerConnection>scm:svn:svn://svn.company.com/my_project/trunk</developerConnection>
<url>http://svn.company.com/my_project/trunk</url>
</scm>
Maven release plugin abstracts a bunch of task to be performed pre-release. This plugin comes default with maven 2.x.
This simple command does all the hard work for you:
mvn release:clean release:prepare release:perform
This cleans any previous release config, tags the release, increments the snapshot version , commits themand finally sends artefacts to proxy maven repository(like archiva).
Gotchas:
1. This happened when I tried using release feature for the first time.
It would fail saying cannot tag the release.. inspite of able to commit the code with version changes.
Solution:
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
</plugin>
Also check the scm config in your pom
<scm>
<connection>scm:svn:svn://svn.company.com/my_project/trunk</connection>
<developerConnection>scm:svn:svn://svn.company.com/my_project/trunk</developerConnection>
<url>http://svn.company.com/my_project/trunk</url>
</scm>
1 comment:
http://maven.apache.org/guides/MavenQuickReferenceCard.pdf
Post a Comment