<?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>Jworks.nl - Agile Software Development using Groovy and Grails</title>
	<atom:link href="http://www.jworks.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jworks.nl</link>
	<description>Effective Software Development using Effective Tools, People and Process</description>
	<lastBuildDate>Tue, 08 May 2012 13:45:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Grails in the cloud!</title>
		<link>http://www.jworks.nl/2012/05/08/grails-in-the-cloud/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=grails-in-the-cloud</link>
		<comments>http://www.jworks.nl/2012/05/08/grails-in-the-cloud/#comments</comments>
		<pubDate>Tue, 08 May 2012 13:45:25 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=418</guid>
		<description><![CDATA[bookorganizer]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F05%2F08%2Fgrails-in-the-cloud%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F05%2F08%2Fgrails-in-the-cloud%2F&amp;style=normal&amp;hashtags=jworks&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href='http://www.jworks.nl/wp-content/uploads/2012/05/bookorganizer.zip'>bookorganizer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2012/05/08/grails-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using GitHub begind a proxy</title>
		<link>http://www.jworks.nl/2012/04/20/using-github-begind-a-proxy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-github-begind-a-proxy</link>
		<comments>http://www.jworks.nl/2012/04/20/using-github-begind-a-proxy/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 10:55:03 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=414</guid>
		<description><![CDATA[At my customer, we are using a proxy server, and sometimes it&#8217;s handy to have access to GitHub, for example to the Grails repository, or my own Grails Fitnesse repo. I struggled a while to get this to work, but apparently, it couldn&#8217;t be easier: export HTTPS_PROXY='http://10.0.0.1:3128' git clone https://bodiam@github.com/bodiam/grails-fitnesse.git Mind the S at the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F20%2Fusing-github-begind-a-proxy%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F20%2Fusing-github-begind-a-proxy%2F&amp;style=normal&amp;hashtags=git,github&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>At my customer, we are using a proxy server, and sometimes it&#8217;s handy to have access to GitHub, for example to the Grails repository, or my own Grails Fitnesse repo. I struggled a while to get this to work, but apparently, it couldn&#8217;t be easier:</p>
<p><code><br />
export HTTPS_PROXY='http://10.0.0.1:3128'<br />
git clone https://bodiam@github.com/bodiam/grails-fitnesse.git<br />
</code></p>
<p>Mind the <b>S</b> at the export. Using the https protocol, you can commit your changes over https instead of using the git protocol, and it&#8217;s still really fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2012/04/20/using-github-begind-a-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails in the Cloud &#8211; NLGUG meetup</title>
		<link>http://www.jworks.nl/2012/04/19/grails-in-the-cloud-nlgug-meetup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=grails-in-the-cloud-nlgug-meetup</link>
		<comments>http://www.jworks.nl/2012/04/19/grails-in-the-cloud-nlgug-meetup/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 08:22:29 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=403</guid>
		<description><![CDATA[At Tuesday, May the 8th, The NLGUG is organizing a new meetup about Grails in the Cloud. The meetup will consist of a talk by Maikel Alderhout, who is an expert on the topic, and will be followed up by Pair Deploying, in which pairs will deploy an existing Grails application to a PaaS of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F19%2Fgrails-in-the-cloud-nlgug-meetup%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F19%2Fgrails-in-the-cloud-nlgug-meetup%2F&amp;style=normal&amp;hashtags=jworks&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://www.jworks.nl/wp-content/uploads/2012/04/Cloud-words.jpg" alt="" title="Cloud-words" width="500" height="325" class="aligncenter size-full wp-image-406" /></p>
<p>At Tuesday, May the 8th, The NLGUG is organizing a new meetup about <a href="http://www.meetup.com/nl-gug/events/59221612/" target="_blank">Grails in the Cloud</a>. </p>
<p>The meetup will consist of a talk by Maikel Alderhout, who is an expert on the topic, and will be followed up by Pair Deploying, in which pairs will deploy an existing Grails application to a PaaS of their choice, for example <a href="http://www.cloudbees.com" target="_blank">CloudBees</a>, <a href="http://www.cloudfoundry.com" target="_blank">CloudFoundry</a>, <a href="http://www.heroku.com" target="_blank">Heroku</a>, <a href="http://www.openshift.com" target="_blank">OpenShift</a> or <a href="http://www.jelastic.com" target="_blank">JElastic</a>.</p>
<p>The meetup is free, and will be kindly hosted by <a href="http://www.quince.nl" title="Quince.nl" target="_blank">Quince</a>, who will also be providing food and drinks! So if you want to join, checkout the <a href="http://www.meetup.com/nl-gug/events/59221612/" title="NLGUG Meetup page" target="_blank">meetup page</a> and join us!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2012/04/19/grails-in-the-cloud-nlgug-meetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printing output in Grails 2.0 ant scripts</title>
		<link>http://www.jworks.nl/2012/04/16/printing-output-in-grails-2-0-ant-scripts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=printing-output-in-grails-2-0-ant-scripts</link>
		<comments>http://www.jworks.nl/2012/04/16/printing-output-in-grails-2-0-ant-scripts/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 08:12:18 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=398</guid>
		<description><![CDATA[When developing plugins, in my case the Grails Fitnesse plugin, it&#8217;s sometimes handy to produce output to the user. In my case, I had a use case to give the user some information that Fitnesse had started up succesfully, and wanted to indicate the location Fitnesse was running on. In previous versions of Grails (1.3.x), [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F16%2Fprinting-output-in-grails-2-0-ant-scripts%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F16%2Fprinting-output-in-grails-2-0-ant-scripts%2F&amp;style=normal&amp;hashtags=jworks&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When developing plugins, in my case the <a href="http://grails.org/plugin/fitnesse" target="_blank">Grails Fitnesse</a> plugin, it&#8217;s sometimes handy to produce output to the user. In my case, I had a use case to give the user some information that Fitnesse had started up succesfully, and wanted to indicate the location Fitnesse was running on.</p>
<p>In previous versions of Grails (1.3.x), you could do ant ant.echo. However, as described in the <a href="http://grails.org/doc/latest/guide/gettingStarted.html#upgradingFromPreviousVersionsOfGrails" title="Upgrading from previous versions of Grails" target="_blank">Grails 2.0 release notes</a>, the ant.echo doesn&#8217;t work anymore, and you&#8217;ll have to use &#8216;alternative mechanisms for output&#8217;. </p>
<p>Well, <a href="grails.org/plugin/spring-security-core" title="Spring Security Core Plugin" target="_blank">Spring Security Core</a> had this already figured out. Just send a StatusUpdate event, which will be printed to the console automatically.</p>
<pre class="brush: groovy">
target('default': 'Starts Fitnesse Server') {
    printMessage "hello world!"
}

printMessage = { String message -> event('StatusUpdate', [message]) }
errorMessage = { String message -> event('StatusError', [message]) }
</pre>
<p>This be handy in the future for other plugin developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2012/04/16/printing-output-in-grails-2-0-ant-scripts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Testing Command Objects in Grails 2.0</title>
		<link>http://www.jworks.nl/2012/04/12/testing-command-objects-in-grails-2-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=testing-command-objects-in-grails-2-0</link>
		<comments>http://www.jworks.nl/2012/04/12/testing-command-objects-in-grails-2-0/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 14:24:35 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[command objects]]></category>
		<category><![CDATA[grails 2.0]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=391</guid>
		<description><![CDATA[In Grails 2.0, you need to use mockCommandObject to test command objects. However, what the Grails documentation doesn&#8217;t mention is how to use the mockCommandObject method. The mockCommandObject method is located in the ControllerUnitTestMixin. To use the method, you can use the following example: package nl.jworks.test import grails.test.mixin.TestMixin import grails.test.mixin.web.ControllerUnitTestMixin @TestMixin(ControllerUnitTestMixin) class CreatePersonCommandTests { void [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F12%2Ftesting-command-objects-in-grails-2-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2012%2F04%2F12%2Ftesting-command-objects-in-grails-2-0%2F&amp;style=normal&amp;hashtags=command+objects,grails+2.0,testing&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In Grails 2.0, you need to use mockCommandObject to test command objects. However, what the <a href="http://grails.org/doc/latest/guide/testing.html#unitTestingControllers" title="Unit testing controllers" target="_blank">Grails documentation</a> doesn&#8217;t mention is how to use the mockCommandObject method. The mockCommandObject method is located in the ControllerUnitTestMixin. To use the method, you can use the following example:</p>
<pre class="brush:groovy">
package nl.jworks.test

import grails.test.mixin.TestMixin
import grails.test.mixin.web.ControllerUnitTestMixin

@TestMixin(ControllerUnitTestMixin)
class CreatePersonCommandTests {

    void testInvalidConstraints() {
        CreatePersonCommand command = mockCommandObject CreatePersonCommand
        command.name = ''

        assert !command.validate()
    }
}
</pre>
<p>This is a little inconvenient if your class needs a lot of properties. To make things a little easier, you can mock the command object in the setup method (using JUnit&#8217;s @Before annotation), and use the default constructor (with Map support), as you would normally:</p>
<pre class="brush:groovy">
package nl.jworks.test

import grails.test.mixin.TestMixin
import grails.test.mixin.web.ControllerUnitTestMixin
import org.junit.Before

@TestMixin(ControllerUnitTestMixin)
class CreatePersonCommandTests {

    @Before
    void setup() {
        mockCommandObject CreatePersonCommand
    }

    void testInvalidConstraints() {
        CreatePersonCommand command = new CreatePersonCommand(name:  '')

        assert !command.validate()
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2012/04/12/testing-command-objects-in-grails-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This week in Discobot (45.2011)</title>
		<link>http://www.jworks.nl/2011/11/11/this-week-in-discobot-45-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=this-week-in-discobot-45-2011</link>
		<comments>http://www.jworks.nl/2011/11/11/this-week-in-discobot-45-2011/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 08:07:42 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Discobot]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=359</guid>
		<description><![CDATA[Another night of coding, another update on the Discobot project! For those unfamiliar with the Discobot project: it&#8217;s the project name for running Groovy on Android. We (Marcin Erdmann and Erik Pragt) are working towards an easy to use framework to run the newest version of Groovy on the newest version of Android. Currently, we&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F11%2F11%2Fthis-week-in-discobot-45-2011%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F11%2F11%2Fthis-week-in-discobot-45-2011%2F&amp;style=normal&amp;hashtags=jworks&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Another night of coding, another update on the Discobot project! For those unfamiliar with the Discobot project: it&#8217;s the project name for running Groovy on Android. We (Marcin Erdmann and Erik Pragt) are working towards an easy to use framework to run the newest version of Groovy on the newest version of Android. Currently, we&#8217;re not there yet, but we will demonstrate our progress at the next <a href="http://skillsmatter.com/event/groovy-grails/groovy-grails-exchange-2011" target="_blank">Groovy and Grails Exchange</a> in London.</p>
<p>A small update though on our current progress, since it has been a while since our last update, and we&#8217;ve gotten a few requests to update you all. To start with: the project is still very alive, and we are working hard to create a streamlined environment for developing Groovy Android applications, including <a href="http://www.gradle.org">Gradle</a> support, with some tasks to easily deploy your Groovy application on the Android emulator.</p>
<p>The last couple of weeks we&#8217;ve been struggling to work with the dynamics provided by Groovy. Groovy works a bit different compared to the standard Java runtime in Android. A small example:</p>
<pre class="brush: groovy">
class B {
  def pub() {'a'}
} 

def x = [pub: {'b'}] as B
</pre>
<p>This code dynamically creates a class at runtime. We have to make the Android environment aware of these classes, which is done by the DiscobotClassloader. This is quite tricky to accomplish, but the good news is, that after some days and nights of coding, it works now. Basic Groovy code, like </p>
<pre class='brush: groovy'>[1,2,3].each { println it }</pre>
<p> was already working for quite some time, but now we support a great deal of the features provided by Groovy already at the moment. Even though we haven&#8217;t measured yet how far we are exactly in terms of features, but we&#8217;re on the right way.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/NRiISubrnQg?hd=1" frameborder="0" allowfullscreen></iframe></p>
<p>What we&#8217;ll do now though, is to create an Android application which will run all Groovy unit tests. We&#8217;ve done it before, and around 30% of the unit tests worked on the Android emulator. Now, with the support for dynamically generating classes, which was one of the biggest problem, we should get far above this 30%. So, please bear with us and we&#8217;ll keep update you on the progress we&#8217;ll make. In the meantime, you can follow the progress we&#8217;re making in our <a href="https://github.com/disco-bot/disco-bot/tree/discobot-patches" target="_blank">Git repository</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2011/11/11/this-week-in-discobot-45-2011/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>This week in Discobot (40.2011)</title>
		<link>http://www.jworks.nl/2011/10/14/this-week-in-discobot-40-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=this-week-in-discobot-40-2011</link>
		<comments>http://www.jworks.nl/2011/10/14/this-week-in-discobot-40-2011/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 19:41:24 +0000</pubDate>
		<dc:creator>Marcin Erdmann</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Discobot]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=352</guid>
		<description><![CDATA[After some hectic times at work caused by very tight deadlines and me getting married in the beginning of September we finally managed with Erik to get back to working on Discobot last week. Some of you have probably already noticed that we have a talk on Discobot scheduled at Groovy &#038; Grails Exchange 2011 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F10%2F14%2Fthis-week-in-discobot-40-2011%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F10%2F14%2Fthis-week-in-discobot-40-2011%2F&amp;style=normal&amp;hashtags=jworks&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>After some hectic times at work caused by very tight deadlines and me getting married in the beginning of September we finally managed with Erik to get back to working on Discobot last week.</p>
<p>Some of you have probably already noticed that we have a <a href="http://skillsmatter.com/podcast/groovy-grails/groovy-android" target="_blank">talk</a> on Discobot scheduled at Groovy &#038; Grails Exchange 2011 in London which takes place in early December. Although the progress is good there is still quite a lot of work to be done on Discobot and we decided that probably one evening a week will not be enough. On the other hand knowing about the talk gives us an even stronger motivation to succeed!</p>
<p>Last week Erik continued his work on getting all Groovy tests running in the emulator. We found out that &#8216;on the fly generated&#8217; classes which are created by Groovy when you for example cast a map of closure into a class using &#8216;as&#8217; keyword cannot be loaded by the classloader. The reason is simple &#8211; classloader looks for class files but it should be looking for dex files. This is our main concern at the moment as it causes exceptions all over the place and breaks anything more complex than a &#8216;hello world&#8217;. From the code written by Hjalmar we&#8217;ve noticed that he also encountered the problem and we&#8217;re trying to apply his solution to see if it will work. So, it looks like there&#8217;s a lot of class loading fun ahead of us!</p>
<p>We&#8217;ve also got a response from guys behind Gradle plugin for Android about our pull request. They had several small remarks which I managed include in my second pull request. From what they said it looks like they should accept it in the coming days.</p>
<p>I&#8217;ve also looked for options regarding a repository in which to put our artefacts (Gradle plugin and the modyfied version of Groovy). I&#8217;ve found a nice blog about creating a a github based Maven repository and using it with Gradle. It seems easy and straightforward so probably we will go for this solution for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2011/10/14/this-week-in-discobot-40-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maximizing browser window for all Geb tests</title>
		<link>http://www.jworks.nl/2011/10/06/maximizing-browser-window-for-all-geb-tests/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=maximizing-browser-window-for-all-geb-tests</link>
		<comments>http://www.jworks.nl/2011/10/06/maximizing-browser-window-for-all-geb-tests/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 12:10:00 +0000</pubDate>
		<dc:creator>Marcin Erdmann</dc:creator>
				<category><![CDATA[Geb]]></category>
		<category><![CDATA[geb]]></category>
		<category><![CDATA[geb config]]></category>
		<category><![CDATA[maximizing browser]]></category>
		<category><![CDATA[webdriver]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=341</guid>
		<description><![CDATA[There might be different reasons for setting a browser window size for your Geb tests. For us it was simply the fact that some floating elements where overlapping with other elements rendering them unclickable when the browser window was set to occupy only the half of the screen and that&#8217;s the default size of a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F10%2F06%2Fmaximizing-browser-window-for-all-geb-tests%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F10%2F06%2Fmaximizing-browser-window-for-all-geb-tests%2F&amp;style=normal&amp;hashtags=geb,geb+config,maximizing+browser,webdriver&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There might be different reasons for setting a browser window size for your Geb tests. For us it was simply the fact that some floating elements where overlapping with other elements rendering them unclickable when the browser window was set to occupy only the half of the screen and that&#8217;s the default size of a Firefox window started by Webdriver.</p>
<p>There were two requirements for the solution &#8211; it had to work on every machine the tests were run without any configuration (so we had to discard all of the solutions involving changing the Firefox profile) and also the window had to be maximized for each of our tests. Unfortunately WebDriver doesn&#8217;t allow to easily control browser window size, at least as long as <a href="http://code.google.com/p/selenium/issues/detail?id=174" target="_blank">this issue</a> isn&#8217;t solved. Therefore we had to revert to resizing the window via Javascript which we don&#8217;t like, but it seems to be the only solution for now. Thanks to putting the code into our GebConfig.groovy we got the window maximized for every test. Following is the driver closure we needed to put in our Geb config:</p>
<pre class="brush: groovy">driver = {
    def driver = new FirefoxDriver()
    driver.executeScript("window.resizeTo(screen.width, screen.height)")
    return driver
}</pre>
<p>Note that you can use a similar technique to not only maximize but also set the window to a certain size and to do it on a per test basis if you put the resizing code into your test instead of the GebConfig.groovy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2011/10/06/maximizing-browser-window-for-all-geb-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friday Repost: Grails and Bamboo</title>
		<link>http://www.jworks.nl/2011/09/30/friday-repost-grails-and-bamboo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=friday-repost-grails-and-bamboo</link>
		<comments>http://www.jworks.nl/2011/09/30/friday-repost-grails-and-bamboo/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 08:00:34 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[bamboo]]></category>
		<category><![CDATA[friday repost]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=214</guid>
		<description><![CDATA[The Friday Repost series are copies from my earlier writings. Since I don&#8217;t want to loose them, and they might prove useful to others, I&#8217;m reposting them on this blog In our development environment, we use the complete Atlassian suite. We (or actually I) choose this environment because the products integrates so well together, but [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F09%2F30%2Ffriday-repost-grails-and-bamboo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F09%2F30%2Ffriday-repost-grails-and-bamboo%2F&amp;style=normal&amp;hashtags=atlassian,bamboo,friday+repost,grails,groovy&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><i>The Friday Repost series are copies from my earlier writings. Since I don&#8217;t want to loose them, and they might prove useful to others, I&#8217;m reposting them on this blog</i></p>
<p>In our development environment, we use the complete <a href="http://www.atlassian.com">Atlassian</a> suite. We (or actually I) choose this environment because the products integrates so well together, but also because it integrates good with other products, like SpringSource Tool Suite, or, in our case, <a href="http://www.jetbrains.com">IntelliJ IDEA</a>. And finally, the Atlassian suite has excellent support for building Grails projects, which, at the moment, is all we do. Simply put, we choose Atlassian because it rocks!</p>
<p>To integrate even better with the Atlassian Build Server (Bamboo), I&#8217;ve created a small script which will update the version number of the application with the Build Number. This way, we always know which build is running where. To do so, I created the following script.</p>
<pre class="brush: groovy">
includeTargets << grailsScript("_GrailsEvents")

target('default': "Sets the current application version") {
    def buildNumberFile = new File('build-number.txt')
    if (buildNumberFile.exists()) {
        def props = new Properties()
        buildNumberFile.withInputStream { stream ->
            props.load(stream)
        }

        def buildNumber = props["build.number"]

        metadata.'app.version' = metadata.'app.version' + ".${buildNumber}"
        metadata.persist()
        event("StatusFinal", ["Application build number updated to ${buildNumber}"])
    }
}
</pre>
<p>This script will look for a file called &#8216;build-number.txt&#8217;, which is produced by the <a href="http://confluence.atlassian.com/display/BAMBOO/Bamboo+Development+Hub">Build Number Stamper Plugin</a>, and put in the working directory. This file is read by the script, and it updates the version number in application.properties, which will result in a war file produced by the build in the following format &#8216;<name>-<version>.<buildnumber>.war&#8217;, for example &#8216;todolist.0.1.34.war&#8217;. This way you can easily relate each build which bugs you might find, and avoids confusion, for example between testers and developers.</p>
<p>As an extra, we&#8217;ve show the current version of the application in the source of our HTML. We do this by reading the version number from the application.properties with the following tag:</p>
<pre class="brush: groovy">
<g:meta name="app.version"/>
</pre>
<p>This will display the version number of the application, and will allow you to relate issues to a build number, to avoid miscommunication about the deployed application!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2011/09/30/friday-repost-grails-and-bamboo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friday Repost: Making Grails work behind an proxy server</title>
		<link>http://www.jworks.nl/2011/09/23/friday-repost-making-grails-work-behind-an-proxy-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=friday-repost-making-grails-work-behind-an-proxy-server</link>
		<comments>http://www.jworks.nl/2011/09/23/friday-repost-making-grails-work-behind-an-proxy-server/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 08:00:24 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[friday repost]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[nexus]]></category>
		<category><![CDATA[proxy server]]></category>

		<guid isPermaLink="false">http://www.jworks.nl/?p=218</guid>
		<description><![CDATA[The Friday Repost series are copies from my earlier writings. Since I don&#8217;t want to loose them, and they might prove useful to others, I&#8217;m reposting them on this blog. Making Grails work behind an NTLM firewall (or using Grails without Internet) Currently, I&#8217;m in the process of taking over an existing Grails project and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F09%2F23%2Ffriday-repost-making-grails-work-behind-an-proxy-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jworks.nl%2F2011%2F09%2F23%2Ffriday-repost-making-grails-work-behind-an-proxy-server%2F&amp;style=normal&amp;hashtags=friday+repost,grails,nexus,proxy+server&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><i>The Friday Repost series are copies from my earlier writings. Since I don&#8217;t want to loose them, and they might prove useful to others, I&#8217;m reposting them on this blog.</i></p>
<p>Making Grails work behind an NTLM firewall (or using Grails without Internet)</p>
<p>Currently, I&#8217;m in the process of taking over an existing Grails project and migrating it to a different location. This location has been setup by me, so I have full control over it, except for one tiny detail: the Proxy Server.</p>
<p>The application used to work great, and installing plugins was a breeze: just do a good old &#8216;grails install-plugin fitnesse&#8217;, and the plugin would be installed. However, since this Proxy Server is not just any Proxy Server, but a Microsoft NTLM Proxy Server, we tried quite hard to make Java work with it, but at the moment the score is 1-0 for the Proxy Server. This gives us the following problems:</p>
<p>
1) Our dependencies cannot be downloaded<br />
2) Our plugins cannot be be downloaded<br />
3) Some plugins cannot be installed anymore
</p>
<p>
<b>Downloading dependencies</b><br />
In our BuildConfig.groovy, we specified some dependencies like joda time and xstream. These dependencies are normally downloaded, but due to our Proxy issue, that doesn&#8217;t work.</p>
<p>Our solution to this is to use Nexus. Nexus is able to pass the firewall, and can download our dependencies. It serves as a transparent Maven proxy, which can also be used by Ivy, and solves our problem nicely. Besides, it&#8217;s a good idea to install a local Maven proxy anyway, mostly because of reliability, but also because of speed and making sure everyone uses the same dependencies.</p>
<p>
<b>Downloading plugins</b><br />
Unfortunately, the Grails plugins are not in a Maven repository. However, a solution to this is to download the plugin zip (eg grails-fitnesse-0.2.zip), rename it (to fitnesse-0.2.zip), put it in the lib directory (even though I&#8217;m really not a fan of putting binaries in version control systems), and register it in the application.properties and BuildConfig.groovy.
</p>
<p>The BuildConfig.groovy should look like this:</p>
<pre class="brush: groovy">
grails.project.dependency.resolution = {
    inherits "global" // inherit Grails' default dependencies
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    repositories {
        mavenRepo "http://172.30.60.106:8081/nexus/content/repositories/central" // nexus repo
    }
    dependencies {
        compile ('com.thoughtworks.xstream:xstream:1.3.1') {
            excludes "stax","stax-api"
        }
    }

    plugins {
        runtime ':hibernate:1.3.2'
        runtime ':tomcat:1.3.2'
        runtime ':fitnesse:0.2'
    }
</pre>
<p>As you can see, everything is configured here: the dependencies are here, the location to nexus is configured, and there&#8217;s a plugin closure. This &#8220;plugins&#8221; closure defines the plugins, and allows you to place them in the &#8216;lib&#8217; directory. Be sure to rename the plugin zip to remove the &#8216;grails&#8217; part, else it doesn&#8217;t work. Maybe these zips are also available from a Maven repository, which would solve the issue of putting binaries in our source control system, but I haven&#8217;t been able to find them yet. </p>
<p><b>Plugin installation</b><br />
Some plugins, like the jQuery plugin, but also like my own plugin, the <a href="http://www.grails.org/plugin/syntax-highlighter">syntax-highlighter</a>, download resources from the Internet when installing them. I haven&#8217;t been able to work around that yet, but my current solution is to just not use those plugins. I downloaded the jQuery javascript libraries and attached them to the project myself, and since we only use jQuery which does that, this solution is also an adequate fix.</p>
<p><b>Conclusion</b><br />
So, as you can see, with some effort, it&#8217;s possible to make Grails work behind a Proxy Server, or without internet at all. This is a good solution for build servers, so you can have reproducible builds without the need for an Internet connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jworks.nl/2011/09/23/friday-repost-making-grails-work-behind-an-proxy-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

