<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>indiWiz.com &#187; build</title>
	<atom:link href="http://indiwiz.com/tag/build/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Wed, 03 Mar 2010 13:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Maven Profiles</title>
		<link>http://indiwiz.com/2009/09/01/maven-profiles/</link>
		<comments>http://indiwiz.com/2009/09/01/maven-profiles/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 10:16:54 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=453</guid>
		<description><![CDATA[Thanks to Arun Jeganath for making me understand Maven Profiles. Often we are forced to specify different build parameters in different environments. In the ages of Make, these parameters used to be specified as environment variables. In the world of Maven, we have profiles. Profiles: Introduction A sample profile information: &#60;profiles&#62; &#60;!-- DEV Profile (Default) [...]]]></description>
			<content:encoded><![CDATA[<p><i>Thanks to <a href="http://www.linkedin.com/in/arunjeganath">Arun Jeganath</a> for making me understand Maven Profiles.</i></p>
<p>Often we are forced to specify different build parameters in different environments. In the ages of <em>Make</em>, these parameters used to be specified as environment variables. In the world of Maven, we have profiles.</p>
<h4>Profiles: Introduction</h4>
<p>A sample profile information:</p>
<pre class="brush: xml;">
  &lt;profiles&gt;

    &lt;!-- DEV Profile (Default) --&gt;
    &lt;profile&gt;
      &lt;id&gt;dev-profile&lt;/id&gt;
      &lt;activation&gt;
        &lt;property&gt;
          &lt;name&gt;env&lt;/name&gt;
          &lt;value&gt;dev&lt;/value&gt;
        &lt;/property&gt;
        &lt;activeByDefault&gt;true&lt;/activeByDefault&gt; &lt;!-- Note this --&gt;
      &lt;/activation&gt;
      &lt;!-- Liferay Home in DEV --&gt;
      &lt;properties&gt;
        &lt;liferay-home&gt;${user.home}/apps/liferay-portal-tomcat-6.0-5.1.2&lt;/liferay-home&gt;
      &lt;/properties&gt;
    &lt;/profile&gt;

    &lt;!-- TEST Profile --&gt;
    &lt;profile&gt;
      &lt;id&gt;test-profile&lt;/id&gt;
      &lt;activation&gt;
        &lt;property&gt;
          &lt;name&gt;env&lt;/name&gt;
          &lt;value&gt;test&lt;/value&gt;
        &lt;/property&gt;
      &lt;/activation&gt;
      &lt;!-- Liferay Home in TEST --&gt;
      &lt;properties&gt;
        &lt;liferay-home&gt;/opt/apps/liferay-portal-tomcat-6.0-5.1.2&lt;/liferay-home&gt;
      &lt;/properties&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
</pre>
<p>Quick learning from the above example:</p>
<ul>
<li>There can be number of profiles defined.</li>
<li>A profile can be marked as <em>&lt;activeByDefault&gt;</em>. This will enforce the configuration defined in the activated profile to take effect during build.</li>
<li>To enable a specific profile during build, the value defined in XPath <em>/profiles/profile/activation/property</em> needs to be passed the Maven as System Property (in our case: <strong>-Denv=test</strong>).</li>
<li>The property defined in the profile (<em>liferay-home</em>) can be referenced elsewhere in the <em>pom.xml</em> as <em>${liferay-home}</em>.</li>
</ul>
<h4>Placing profile information</h4>
<p>Profile information is generally placed in:</p>
<ol>
<li>In the project POM itself.</li>
<li>Inside <em>{user.home}/.m2/settings.xml</em>.</li>
</ol>
<p>In the first case (in this particular example), the deployment information is placed in the project&#8217;s POM. This, some might feel improper because the module/project build has hardcoded environment dependencies which might not work in other systems. The second option externalizes the platform specific build information. But a new developer checking out the project will not be aware of this external dependency causing his build to fail. Both these problems might be addressed using documentation: some projects have README and BUILD files explaining environment setup for build.</p>
<p>As we saw, both methods have advantages and disadvantages. Choose the method appropriate to your situation.</p>
<h4>Parameters that can be overridden in profiles</h4>
<p><em>Note</em>: This list is shamelessly copied from the <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html">official Maven profiles guide</a>. Refer to this guide for detailed information.</p>
<ul>
<li><tt>&lt;repositories&gt;</tt></li>
<li><tt>&lt;pluginRepositories&gt;</tt></li>
<li><tt>&lt;dependencies&gt;</tt></li>
<li><tt>&lt;plugins&gt;</tt></li>
<li><tt>&lt;properties&gt;</tt> (not actually available in the main POM, but used behind the scenes)</li>
<li><tt>&lt;modules&gt;</tt></li>
<li><tt>&lt;reporting&gt;</tt></li>
<li><tt>&lt;dependencyManagement&gt;</tt></li>
<li><tt>&lt;distributionManagement&gt;</tt></li>
<li>a subset of the <tt>&lt;build&gt;</tt> element, which consists of:
<ul>
<li><tt>&lt;defaultGoal&gt;</tt></li>
<li><tt>&lt;resources&gt;</tt></li>
<li><tt>&lt;testResources&gt;</tt></li>
<li><tt>&lt;finalName&gt;</tt></li>
</ul>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/09/01/maven-profiles/&amp;title=Maven+Profiles" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/09/01/maven-profiles/&amp;title=Maven+Profiles" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/09/01/maven-profiles/&amp;title=Maven+Profiles&amp;desc=Thanks%20to%20Arun%20Jeganath%20for%20making%20me%20understand%20Maven%20Profiles.%0D%0A%0D%0AOften%20we%20are%20forced%20to%20specify%20different%20build%20parameters%20in%20different%20environments.%20In%20the%20ages%20of%20Make%2C%20these%20parameters%20used%20to%20be%20specified%20as%20environment%20variables.%20In%20the%20world%20of%20Maven%2C%20we%20have%20profiles.%0D%0A%0D%0AProfiles%3A%20Introduc" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/09/01/maven-profiles/&amp;t=Maven+Profiles" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/09/01/maven-profiles/&amp;title=Maven+Profiles&amp;summary=Thanks%20to%20Arun%20Jeganath%20for%20making%20me%20understand%20Maven%20Profiles.%0D%0A%0D%0AOften%20we%20are%20forced%20to%20specify%20different%20build%20parameters%20in%20different%20environments.%20In%20the%20ages%20of%20Make%2C%20these%20parameters%20used%20to%20be%20specified%20as%20environment%20variables.%20In%20the%20world%20of%20Maven%2C%20we%20have%20profiles.%0D%0A%0D%0AProfiles%3A%20Introduc&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/09/01/maven-profiles/&amp;title=Maven+Profiles" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/09/01/maven-profiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven 2.2.0 released</title>
		<link>http://indiwiz.com/2009/07/31/maven-2-2-0-released/</link>
		<comments>http://indiwiz.com/2009/07/31/maven-2-2-0-released/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 08:26:46 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[build]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=407</guid>
		<description><![CDATA[I was surprised to find a major new release of Maven. It seems that Maven 2.1.0 suffered from a major bug due to which releases could not be done. A quick overview of this bug and other feature improvements are discussed in this blog. Share this on del.icio.us Digg this! Post this on Diigo Share [...]]]></description>
			<content:encoded><![CDATA[<p>I was surprised to find a major new release of <a href="http://maven.apache.org/">Maven</a>. It seems that Maven 2.1.0 suffered from a major bug due to which releases could not be done. A quick overview of this bug and other feature improvements are <a href="http://www.sonatype.com/people/2009/06/maven-220-released/">discussed in this blog</a>.</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/07/31/maven-2-2-0-released/&amp;title=Maven+2.2.0+released" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/07/31/maven-2-2-0-released/&amp;title=Maven+2.2.0+released" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/07/31/maven-2-2-0-released/&amp;title=Maven+2.2.0+released&amp;desc=I%20was%20surprised%20to%20find%20a%20major%20new%20release%20of%20Maven.%20It%20seems%20that%20Maven%202.1.0%20suffered%20from%20a%20major%20bug%20due%20to%20which%20releases%20could%20not%20be%20done.%20A%20quick%20overview%20of%20this%20bug%20and%20other%20feature%20improvements%20are%20discussed%20in%20this%20blog." rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/07/31/maven-2-2-0-released/&amp;t=Maven+2.2.0+released" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/07/31/maven-2-2-0-released/&amp;title=Maven+2.2.0+released&amp;summary=I%20was%20surprised%20to%20find%20a%20major%20new%20release%20of%20Maven.%20It%20seems%20that%20Maven%202.1.0%20suffered%20from%20a%20major%20bug%20due%20to%20which%20releases%20could%20not%20be%20done.%20A%20quick%20overview%20of%20this%20bug%20and%20other%20feature%20improvements%20are%20discussed%20in%20this%20blog.&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/07/31/maven-2-2-0-released/&amp;title=Maven+2.2.0+released" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/07/31/maven-2-2-0-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Maven 2.1.0 Released</title>
		<link>http://indiwiz.com/2009/03/26/maven-210-released/</link>
		<comments>http://indiwiz.com/2009/03/26/maven-210-released/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 09:42:46 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=231</guid>
		<description><![CDATA[My favorite project and build management tool, Maven, has been updated. View release notes for the list of bug fixes and feature improvements. Share this on del.icio.us Digg this! Post this on Diigo Share this on Facebook Share this on LinkedIn Share this on Reddit]]></description>
			<content:encoded><![CDATA[<p>My favorite project and build management tool, <a href="http://maven.apache.org/">Maven</a>, has been updated. View <a href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10500&amp;styleName=Html&amp;version=14587">release notes</a> for the list of bug fixes and feature improvements.</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/03/26/maven-210-released/&amp;title=Maven+2.1.0+Released" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/03/26/maven-210-released/&amp;title=Maven+2.1.0+Released" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/03/26/maven-210-released/&amp;title=Maven+2.1.0+Released&amp;desc=My%20favorite%20project%20and%20build%20management%20tool%2C%20Maven%2C%20has%20been%20updated.%20View%20release%20notes%20for%20the%20list%20of%20bug%20fixes%20and%20feature%20improvements." rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/03/26/maven-210-released/&amp;t=Maven+2.1.0+Released" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/03/26/maven-210-released/&amp;title=Maven+2.1.0+Released&amp;summary=My%20favorite%20project%20and%20build%20management%20tool%2C%20Maven%2C%20has%20been%20updated.%20View%20release%20notes%20for%20the%20list%20of%20bug%20fixes%20and%20feature%20improvements.&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/03/26/maven-210-released/&amp;title=Maven+2.1.0+Released" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/03/26/maven-210-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buildr becomes Apache top level project</title>
		<link>http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/</link>
		<comments>http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 16:52:39 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=214</guid>
		<description><![CDATA[Apache Buildr is now a top-level Apache project. Buildr is a Java build tool which uses Ruby (and JRuby) and provides dependency management functionalities. Think Maven has got some real competition now! Share this on del.icio.us Digg this! Post this on Diigo Share this on Facebook Share this on LinkedIn Share this on Reddit]]></description>
			<content:encoded><![CDATA[<p><a href="http://buildr.apache.org/">Apache Buildr</a> is now a top-level Apache project. Buildr is a Java build tool which uses Ruby (and JRuby) and provides dependency management functionalities. Think Maven has got some real competition now!</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/&amp;title=Buildr+becomes+Apache+top+level+project" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/&amp;title=Buildr+becomes+Apache+top+level+project" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/&amp;title=Buildr+becomes+Apache+top+level+project&amp;desc=Apache%20Buildr%20is%20now%20a%20top-level%20Apache%20project.%20Buildr%20is%20a%20Java%20build%20tool%20which%20uses%20Ruby%20%28and%20JRuby%29%20and%20provides%20dependency%20management%20functionalities.%20Think%20Maven%20has%20got%20some%20real%20competition%20now%21" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/&amp;t=Buildr+becomes+Apache+top+level+project" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/&amp;title=Buildr+becomes+Apache+top+level+project&amp;summary=Apache%20Buildr%20is%20now%20a%20top-level%20Apache%20project.%20Buildr%20is%20a%20Java%20build%20tool%20which%20uses%20Ruby%20%28and%20JRuby%29%20and%20provides%20dependency%20management%20functionalities.%20Think%20Maven%20has%20got%20some%20real%20competition%20now%21&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/&amp;title=Buildr+becomes+Apache+top+level+project" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/02/25/buildr-becomes-apache-top-level-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
