Skip to main content

Fixing two problems with Maven + Mercurial + Hudson: second take

Posted by fabriziogiudici on November 9, 2009 at 11:46 AM PST

In the past weekend I've been able to improve the settings for
automated Maven releases that href="http://weblogs.java.net/blog/fabriziogiudici/archive/2009/10/29/fixing-two-problems-maven-mercurial-hudson">I've
blogged about about ten days ago. Peter Mount href="http://www.retep.org/2009/11/releasing-to-kenai-via-maven.html">complemented
the information with some practical examples on how to use
that stuff invoking Maven with the proper parameters. I've been able to
significantly clean up and improve the Maven configuration, so now a
staged release can be performed exclusively with a sequence of Maven
invocations, specifying profiles instead of a complicated set of
parameters. And I'll show you how to fit it better with a CI
environment such as Hudson.



I'm not repeating the concepts behind this stuff, that have been href="http://weblogs.java.net/blog/fabriziogiudici/archive/2009/10/29/fixing-two-problems-maven-mercurial-hudson">explained
in my previous post, but just showing you the relevant
sections of the POM.



First, the SCM URL is defined by means of a property, which is style="font-family: monospace;">hg.repo.url,
whose value has a default in the properties section:



<scm> style="font-family: monospace;">
   
<connection>scm:hg:http://kenai.com/hg/forceten~src</connection>
style="font-family: monospace;">
   
<developerConnection>scm:hg:${hg.repo.url}</developerConnection>
style="font-family: monospace;">
   
<url>http://kenai.com/projects/forceten/sources/src/show</url>
style="font-family: monospace;">
</scm> style="font-family: monospace;">
<properties> style="font-family: monospace;">
   
<hg.repo.url>https://kenai.com/hg/forceten~src</hg.repo.url>
style="font-family: monospace;">
   
<staging.mvn.repo.url>file://${project.build.directory}/target-maven-repo</staging.mvn.repo.url>
style="font-family: monospace;">
</properties>



Then you define a style="font-family: monospace; font-weight: bold;">

Related Topics >>