<?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>Piraguablog</title>
	<atom:link href="http://www.piragua.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piragua.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 22 Jun 2010 22:03:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Grails pageScope variable in GSPs and TagLibraries</title>
		<link>http://www.piragua.com/2010/06/22/grails-pagescope-variable-in-gsps-and-taglibraries/</link>
		<comments>http://www.piragua.com/2010/06/22/grails-pagescope-variable-in-gsps-and-taglibraries/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 21:55:42 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[quicktip]]></category>

		<guid isPermaLink="false">http://www.piragua.com/?p=69</guid>
		<description><![CDATA[Grails pageScope variable is available to you in Tag Libraries and GSPs and contains a wealth of state information.  For instance, you can set an attribute in the model in a controller and then reference it in a TagLibrary through the pageScope variable without having to pass it through the tag attributes
Controller:

def myAction = [...]]]></description>
			<content:encoded><![CDATA[<p>Grails pageScope variable is available to you in Tag Libraries and GSPs and contains a wealth of state information.  For instance, you can set an attribute in the model in a controller and then reference it in a TagLibrary through the pageScope variable without having to pass it through the tag attributes</p>
<p>Controller:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy"><span style="color: #000000; font-weight: bold;">def</span> myAction <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">//...</span>
    <span style="color: #993333;">boolean</span> readOnly <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">true</span>
    render<span style="color: #66cc66;">&#40;</span>view: <span style="color: #ff0000;">'edit'</span>, model: <span style="color: #66cc66;">&#91;</span>bookInstance:book, readOnly:readOnly<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>GSP:</p>

<div class="wp_syntax"><div class="code"><pre>    &lt;g:myInputFieldTag name=&quot;title&quot; value=&quot;${bookInstance.title}&quot;/&gt;</pre></div></div>

<p>TagLibrary</p>

<div class="wp_syntax"><div class="code"><pre class="groovy"><span style="color: #000000; font-weight: bold;">def</span> myInputFieldTag <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span> attrs-<span style="color: #66cc66;">&gt;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>pageScope.<span style="color: #006600;">readOnly</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        out <span style="color: #b1b100;">&lt;&lt;</span> attrs.<span style="color: #006600;">value</span>
    <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
        out <span style="color: #b1b100;">&lt;&lt;</span> <span style="color: #808080; font-style: italic;">//...</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>You can also use it within a GSP or to get access to variables you have set in a GSP or to store variables in page scope in a tag library.<br />
Docs:<br />
<a href="http://grails.org/doc/latest/ref/Tag%20Libraries/pageScope.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">http://grails.org/doc/latest/ref/Tag%20Libraries/pageScope.html</a><br />
and<br />
<a href="http://grails.org/1.0-RC1+Release+Notes#Improved%20support%20for%20scopes" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">http://grails.org/1.0-RC1+Release+Notes#Improved%20support%20for%20scopes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.piragua.com/2010/06/22/grails-pagescope-variable-in-gsps-and-taglibraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails Dependency Management – Setting the Ivy Proxy</title>
		<link>http://www.piragua.com/2010/06/18/grails-dependency-management-%e2%80%93-setting-the-ivy-proxy/</link>
		<comments>http://www.piragua.com/2010/06/18/grails-dependency-management-%e2%80%93-setting-the-ivy-proxy/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 17:07:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[quicktip]]></category>

		<guid isPermaLink="false">http://www.piragua.com/?p=63</guid>
		<description><![CDATA[When dealing with corporate firewalls and proxy servers, dependency management can be a pain.  With Grails 1.3.1 I recently encountered an issue resolving dependencies that were not in a maven central repository.  I had already done &#8216;grails set-proxy&#8217; and that seemed to do the trick for the majority of the dependencies I needed, [...]]]></description>
			<content:encoded><![CDATA[<p>When dealing with corporate firewalls and proxy servers, dependency management can be a pain.  With Grails 1.3.1 I recently encountered an issue resolving dependencies that were not in a maven central repository.  I had already done &#8216;grails set-proxy&#8217; and that seemed to do the trick for the majority of the dependencies I needed, but these few turned out to be very elusive.</p>
<p>After some quick searching, I stumbled across a <a href="http://stackoverflow.com/questions/2921364/proxy-settings-with-ivy" onclick="javascript:pageTracker._trackPageview('/outbound/article/stackoverflow.com');">way to set the Ivy proxy through the ANT_OPTS environment variable</a>.  That didn&#8217;t do the trick, but passing those parameters to grails directly DID.  </p>
<p>If you&#8217;re running Grails from the command line, you can do the following:<br />
<code><br />
grails -Dhttp.proxyHost=your.proxyserver.com -Dhttp.proxyPort=80 clean<br />
</code></p>
<p>If you&#8217;re using Hudson (as I was), you can add two additional lines into the &#8220;Properties&#8221; box of your &#8220;Build with Grails&#8221; configuration<br />
<code><br />
http.proxyHost=your.proxyserver.com<br />
http.proxyPort=80 clean<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.piragua.com/2010/06/18/grails-dependency-management-%e2%80%93-setting-the-ivy-proxy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grails Dependency Management &#8211; Excluding dependencies</title>
		<link>http://www.piragua.com/2010/05/28/grails-dependency-management-excluding-dependencies/</link>
		<comments>http://www.piragua.com/2010/05/28/grails-dependency-management-excluding-dependencies/#comments</comments>
		<pubDate>Fri, 28 May 2010 15:36:34 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[quicktip]]></category>

		<guid isPermaLink="false">http://www.piragua.com/?p=59</guid>
		<description><![CDATA[Sometimes you need finer control over the dependencies included in your build. In BuildConfig.groovy you can exclude dependent dependencies by using the &#8216;excludes&#8217; keyword &#8211; for example:

dependencies &#123;
        runtime &#40;group:'org.apache.tika', name:'tika-parsers', version:'0.7'&#41;&#123;
            excludes 'commons-compress'
    [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need finer control over the dependencies included in your build. In BuildConfig.groovy you can exclude dependent dependencies by using the &#8216;excludes&#8217; keyword &#8211; for example:</p>

<div class="wp_syntax"><div class="code"><pre class="java">dependencies <span style="color: #66cc66;">&#123;</span>
        runtime <span style="color: #66cc66;">&#40;</span>group:<span style="color: #ff0000;">'org.apache.tika'</span>, name:<span style="color: #ff0000;">'tika-parsers'</span>, version:<span style="color: #ff0000;">'0.7'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            excludes <span style="color: #ff0000;">'commons-compress'</span>
        <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.piragua.com/2010/05/28/grails-dependency-management-excluding-dependencies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Grails Apps with SVN and Hudson and fighting with application.properties</title>
		<link>http://www.piragua.com/2010/01/27/building-grails-apps-with-svn-and-hudson-and-fighting-with-application-properties/</link>
		<comments>http://www.piragua.com/2010/01/27/building-grails-apps-with-svn-and-hudson-and-fighting-with-application-properties/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 23:24:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.piragua.com/?p=40</guid>
		<description><![CDATA[It&#8217;s incredibly easy to set up a Hudson project to build a Grails application with the available Grails plugin for Hudson.  Every once in a while, however, there&#8217;s a little problem that&#8217;s been nagging me &#8211; merge conflicts within that pesky little application.properties file.
There are several things that cause application.properties to get re-written by Grails, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s <a href="http://today.java.net/pub/a/today/2009/06/23/Grails-and-Continuous-Integration.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/today.java.net');">incredibly easy</a> to set up a <a href="http://hudson-ci.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/hudson-ci.org');">Hudson</a> project to build a Grails application with the available Grails plugin for Hudson.  Every once in a while, however, there&#8217;s a little problem that&#8217;s been nagging me &#8211; merge conflicts within that pesky little application.properties file.</p>
<p>There are several things that cause application.properties to get re-written by Grails, the most common of which for me is installing / uninstalling plugins.  Since this is a properties file, the order of the lines is unimportant (they&#8217;re just key value pairs, after all), until your build machine does an &#8217;svn up&#8217; and encounters all sorts of conflicts that can&#8217;t be resolved automagically.<img class="alignright size-medium wp-image-42" title="Option #1 - uncheck that use update box" src="http://www.piragua.com/wp-content/uploads/2010/01/hudsonUseUpdate1-300x205.png" alt="hudsonUseUpdate" width="300" height="205" /></p>
<p>There are two (well, OK, three) ways to workaround this:</p>
<ol>
<li>Tell hudson do to a clean checkout with each build.  To do this just make sure the &#8220;Use update&#8221; box is NOT checked under the subversion modules section of your build configuration.  This works well if your project is relatively small and you have a fast connection to your source code repository.</li>
<li>Revert the application.properties file before the build happens.</li>
<li>Stop using SVN.  Well, I don&#8217;t actually know if other SCMs handle this better, but it wouldn&#8217;t surprise me.  I certainly know of a few that handle it worse!</li>
</ol>
<p>For the most part I&#8217;ve been using option #1 &#8211; until I recently added a very large project to the Hudson build&#8230;  The build time more than doubled &#8211; and that&#8217;s just unacceptable.</p>
<p>Enter Option #2.  In your build configuration, add an &#8220;Execute Shell&#8221; Build Step that happens BEFORE your Grails build that reverts the file so that the workspace always has the latest and greatest &#8211; without conflicts.</p>
<p style="text-align: center;"><img class="aligncenter size-full  wp-image-45" title="buildStep" src="http://www.piragua.com/wp-content/uploads/2010/01/buildStep1.png" alt="buildStep" width="415" height="218" /></p>
<p>Note that depending on how your checkout works, you may need to add the checkout path in front of application.properties, for example:</p>
<blockquote><p>svn revert yourGrailsApp/application.properties</p></blockquote>
<p>If there&#8217;s a better way, I&#8217;d love to hear it.  In the mean time, this extra little build step works great!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piragua.com/2010/01/27/building-grails-apps-with-svn-and-hudson-and-fighting-with-application-properties/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>One week with WhenWorksForYou.com</title>
		<link>http://www.piragua.com/2009/07/13/one-week-with-whenworksforyoucom/</link>
		<comments>http://www.piragua.com/2009/07/13/one-week-with-whenworksforyoucom/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 11:25:07 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.piragua.com/?p=37</guid>
		<description><![CDATA[Last week I launched http://www.whenworksforyou.com, a new Grails website that lets you coordinate schedules with other people to find the best date for your next event.  Our first week provided lots of great feedback from users.  One of the biggest gripes was not being able to subscribe to updates on an event.  [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I launched <a href="http://www.whenworksforyou.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.whenworksforyou.com');">http://www.whenworksforyou.com</a>, a new Grails website that lets you coordinate schedules with other people to find the best date for your next event.  Our first week provided lots of great feedback from users.  One of the biggest gripes was not being able to subscribe to updates on an event.  Well, thanks to the <a href="http://grails.org/plugin/feeds" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">feeds</a> and <a href="http://grails.org/plugin/mail" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">mail</a> plugins, now you can!  It was dead simple to implement, and now I can focus my attention on the next feature rather than having to re-invent the wheel on RSS and email.</p>
<p>The site also takes advantage of several other plugins, including</p>
<ul>
<li><a href="http://grails.org/plugin/acegi" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">Spring Security</a></li>
<li><a href="http://grails.org/plugin/ui-performance" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">UI Performance</a></li>
<li><a href="http://grails.org/plugin/recaptcha" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">Recaptcha</a></li>
<li><a href="http://grails.org/plugin/build-test-data" onclick="javascript:pageTracker._trackPageview('/outbound/article/grails.org');">Build Test Data</a></li>
<li>Test Code Coverage (of course)</li>
</ul>
<p>Thanks to all the plugin developers who took the time to build and document plugins for the Grails framework!</p>
<p>I also wrote one other plugin that wraps GreenMail and acts as a transient &#8220;Inbox&#8221; for sending emails during development.  I&#8217;m putting the finishing touches on that now, stay tuned for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piragua.com/2009/07/13/one-week-with-whenworksforyoucom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
