<?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>Armbruster IT Blog</title>
	<atom:link href="http://blog.armbruster-it.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.armbruster-it.de</link>
	<description>Real world fun with Java, Grails, Groovy, Zope, Plone, Linux and much others.</description>
	<lastBuildDate>Thu, 08 Mar 2012 10:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>update on Grails Neo4j GORM plugin</title>
		<link>http://blog.armbruster-it.de/2012/03/update-on-grails-neo4j-gorm-plugin/</link>
		<comments>http://blog.armbruster-it.de/2012/03/update-on-grails-neo4j-gorm-plugin/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 10:55:51 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[neo4j]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=265</guid>
		<description><![CDATA[The milestone release 1.0.0.M2 of the  Neo4j Grails GORM plugin was published a couple of days ago. The plugin provides a GORM compliant implementation backed by a Neo4j datastore. This means you can switch any Grails application to use Neo4j by simply exchanging the GORM plugin used. Plugin documentation can be found at http://springsource.github.com/grails-data-mapping/neo4j/manual/index.html. There [...]]]></description>
			<content:encoded><![CDATA[<p>The milestone release 1.0.0.M2 of the <a href="http://www.grails.org/plugin/neo4j"> Neo4j Grails GORM plugin</a> was published a couple of days ago. The plugin provides a GORM compliant implementation backed by a Neo4j datastore. This means you can switch any Grails application to use Neo4j by simply exchanging the GORM plugin used.</p>
<p>Plugin documentation can be found at <a href="http://springsource.github.com/grails-data-mapping/neo4j/manual/index.html">http://springsource.github.com/grails-data-mapping/neo4j/manual/index.html</a>. There is also a very minimal demo application available at <a href="http://neo4j-grails-demo.herokuapp.com/">http://neo4j-grails-demo.herokuapp.com/</a>, see <a href="https://github.com/sarmbruster/neo4jsample">https://github.com/sarmbruster/neo4jsample</a> for the source code. The demo app consists of three trivial domain classes with scaffolding controllers &#8211; nothing more for now.</p>
<p>Since there is currently the <a href="http://neo4j-challenge.herokuapp.com/">Neo4j Challange</a> in progress, I&#8217;ve decided to participate there. As already stated the neo4jsample demo application is very minimal but it its intention is to serve as a starting point for your own Grails application using Neo4j as datastore backend. If you want support this project in the neo4j challenge, please <a href="http://twitter.com/home?status=using%20%23grails%20w%20%23neo4j%3A%20I'm%20voting%20for%20https%3A%2F%2Fgithub.com%2Fsarmbruster%2Fneo4jsample%20%23neo4jchallenge%20%2C%20please%20RT">send a tweet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2012/03/update-on-grails-neo4j-gorm-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>project setup for Grails with customized plugins using git submodules</title>
		<link>http://blog.armbruster-it.de/2011/10/project-setup-for-grails-with-customized-plugins-using-git-submodules/</link>
		<comments>http://blog.armbruster-it.de/2011/10/project-setup-for-grails-with-customized-plugins-using-git-submodules/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 11:42:29 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[grails]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=237</guid>
		<description><![CDATA[Starting with it&#8217;s initial version a couple of years ago, Grails comes with a very nice predefined project structure, e.g. domain classes go into grails-app/domain. Every artefact has its well defined location. Almost every Grails application doing a little more than a simple &#8220;Hello world&#8221; will use at some extend one or more of the [...]]]></description>
			<content:encoded><![CDATA[<p>Starting with it&#8217;s initial version a couple of years ago, <a href="http://www.grails.org">Grails</a> comes with a very nice predefined project structure, e.g. domain classes go into <code>grails-app/domain</code>. Every artefact has its well defined location. Almost every Grails application doing a little more than a simple &#8220;Hello world&#8221; will use at some extend one or more of the <a href="http://www.grails.org/plugins/">500+ available plugins</a>. The easiest way is to add plugins by using</p>
<pre escaped="true" lang="groovy" title="">grails install-plugin &lt;pluginname&gt;</pre>
<p>The plugin gets downloaded from the central repository and added into your application, either in <code>application.properties</code> or into <code>grails-app/conf/BuildConfig.groovy</code> (default for Grails 2.0). In both cases the application contains only a reference to the installed version number.</p>
<p>This approach works very nice as long as you don&#8217;t have to change anything inside the plugin. I&#8217;ve had multiple times the necessity to modify external plugins, due to fixing bugs or due to some special requirements that are not yet covered by the existing released version. To deal with this, there are a couple of approaches:</p>
<h4>1) most naive:</h4>
<p>The most simple thing to do is just opening the plugin&#8217;s source files using your IDE and make your modifications. This has some real downsides:</p>
<ul>
<li>your changes will be lost whenever you install a new upstream version of the plugin</li>
<li>since Grails unpacks installed plugins by default into <code>$HOME/.grails/&lt;grailsversion&gt;/projects/bullseye2/plugins/&lt;pluginname&gt;</code>, your changes are not part of any SCM and only reside locally.</li>
</ul>
<p><strong>I&#8217;ve warned you! Don&#8217;t do this!</strong></p>
<h4>2) build customized plugins in a seperated location</h4>
<ul>
<li>download the sources of the desired plugin, unpack it outside your main application</li>
<li>modify the plugins</li>
<li>create &#8216;your&#8217; version: <code>grails package-plugin</code></li>
<li>switch to your application and install the generated plugin: <code>grails install-plugin &lt;zipfile&gt;</code></li>
</ul>
<p>This approach annoys me, since you need to repeat the &#8216;package-plugin&#8217;/'install-plugin&#8217; cycle for each an every change in the plugin. So inline-plugins to the rescue&#8230;</p>
<h4>3) use inline plugins and copy the plugin&#8217;s sources into your application&#8217;s repo</h4>
<p>Grails has the ability to use &#8216;inline plugin&#8217;. There are a couple of nice blog posts covering this, so I&#8217;m just using <a href="http://www.slideshare.net/gr8conf/grails-pluggingin-burtbeckwith2011">Burt Beckwith&#8217;s slides</a> as a reference. You basically unzip the plugin&#8217;s zip artefact into some folder inside your application (e.g. plugins folder), reference it in <code>grails-app/conf/BuildConfig.groovy</code> and add the extracted files to your application&#8217;s repo.<br />
 In that case you&#8217;ve basically created a diverging copy of the plugin. Whenever there&#8217;s a new release of the plugin, integrating this back into your app might become a pita. You need to reapply your changes on top of the version of the plugin. That&#8217;s doable, but requires some advanced git technique, is error prone and can consume a lot of time &#8211; I know what I&#8217;m talking about here, trust me! Another major downside is that your local fixes and improvements are not easy to contribute back to upstream.</p>
<h4>4) use inline plugins with git submodule</h4>
<p>At that point, I&#8217;m expecting that you&#8217;re already using git for your project. If not, NOW is the time to do this and familiarize yourself with git. It&#8217;s worth it, promised!</p>
<ul>
<li>create a distinct folder inside your project, e.g. &#8216;plugins&#8217; that will contain all customized plugins</li>
<li>Find out the location of the plugin&#8217;s scm. A lot of plugins host their sources now on github. If so, fork this repository on github. If it&#8217;s using svn, you could mirror it to github, see <a href="How%20to%20mirror%20a%20SVN%20repository%20on%20GitHub">a nice blog post for this</a>. Basically you have now a forked plugin available on github.</li>
<li>clone the forded repo into your project, I&#8217;m using the spring-security-ui plugin here as example:
<pre escaped="true" lang="bash" title="">$ git submodule add git://github.com/sarmbruster/grails-spring-security-ui.git plugins/grails-spring-security-ui
Cloning into plugins/grails-spring-security-ui...
done.

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
#	new file:   .gitmodules
#	new file:   plugins/grails-spring-security-ui
#

git add .gitmodules plugins/
git commit -m "added submodule"</pre>
<p>The nice thing is that your application&#8217;s repo contains now a reference to the plugin&#8217;s repo and it even remembers the sha-id of the plugin you&#8217;re currently using.</li>
<li>now add plugins/grails-spring-security-ui as a inline plugin by adding to <code>grails-app/conf/BuildConfig.groovy</code>
<pre escaped="true" lang="groovy" title="">grails.plugin.location.'spring-security-ui'="plugins/grails-spring-security-ui"</pre>
</li>
<li>push your changes</li>
<li>last but not least ask your collaborators on the project to pull your changes, let them do <code>git submodule update --init</code>. This command is only required once for each working copy.</li>
</ul>
<p>The really nice thing about this setup is that you can easily share your plugin changes to the upstream repository by a pullrequest. And the other way is also pretty easy: when the upstream author accepts your pullrequest and/or adds a some new functionality you can directly consume this by going to your plugin&#8217;s directory and use</p>
<pre escaped="true" lang="bash" title="">$ git fetch upstream
$ git merge upstream/master</pre>
<p>NB: this results in a to-be-committed change in the upstream repo since the sha-id of the referenced repo has changed.</p>
<h5>some notes</h5>
<ul>
<li>whenever you commit something to a submodule the parent repo will have a non-empty status since your copy now references another another sha-id.</li>
<li>choose the URL of the custom plugin repo carefully. If you&#8217;re the only developer make changes in the plugin, you might use the repo&#8217;s public address and override locally the push url to your private URL by
<pre escaped="true" lang="bash" title="">$ git remote set-url --push git@github.com:sarmbruster/grails-spring-security-ui.git</pre>
<p>Now there&#8217;s a difference in fetch and push URLs:</p>
<pre escaped="true" lang="bash" title="">$ git remote -v
origin    git://github.com/sarmbruster/grails-spring-security-ui.git (fetch)
origin    git@github.com:sarmbruster/grails-spring-security-ui.git (push)</pre>
<p>Your collaborators will only get the public fetch URL for both and won&#8217;t be able to commit to your private repo (that&#8217;s why we&#8217;re calling it private, right?).</p>
<p>The other scenario is when you want multiple developers commit to the plugin repo. In this case you need to grant them access to your private repo (or even set up a github organization for that) and use the private URL in the &#8216;git submodule add&#8217; command.</li>
</ul>
<p>Contributing your changes back to the plugin upstream repo is very well explained at <a href="http://help.github.com/fork-a-repo/">Fork a repo</a>.</p>
<h3>Conclusion</h3>
<p>With the approach explained you&#8217;re able to customize any plugin and track the plugin changes from your applications repo. Contributing your bugfixes and improvements back to the upstream author is a piece of cake now as well as benefiting from upstream changes.</p>
<p>I&#8217;d be greedly waiting for your thoughts and for discussion on this setup. Combining this with git-flow looks like a kind of best practice for Grails projects &#8211; at least for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2011/10/project-setup-for-grails-with-customized-plugins-using-git-submodules/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>embedding the git/hg/svn&#8217;s revision number inside a grails application</title>
		<link>http://blog.armbruster-it.de/2011/07/embedding-the-githgsvns-revision-number-inside-a-grails-application/</link>
		<comments>http://blog.armbruster-it.de/2011/07/embedding-the-githgsvns-revision-number-inside-a-grails-application/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 21:51:53 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[mercurial]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=224</guid>
		<description><![CDATA[&#160; When your application goes to production, you should be prepared for handling bugs. Users and customers will find them and hopefully report them. I&#8217;ve been multiple times in a situation where a well written bug report including a stacktrace doesn&#8217;t help me much because the stacktrace doesn&#8217;t match the current development state of the [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">&nbsp;</pre></div></div>

<p>When your application goes to production, you should be prepared for handling bugs. Users and customers will find them and hopefully report them. I&#8217;ve been multiple times in a situation where a well written bug report including a stacktrace doesn&#8217;t help me much because the stacktrace doesn&#8217;t match the current development state of the code. Therefore it simplifies life if the bug report contains a build number or a SCM revision number.  With this small recipe, you can easily add this information to your application.</p>
<h3>Find out your current SCM revision</h3>
<p>Every version control system does this differently, so here&#8217;s a short summary of what command might be used for what SCM:</p>
<table>
<tbody>
<tr>
<th>SCM</th>
<th>command to get revision information</th>
</tr>
<tr>
<td>Mercurial</td>
<td><code>hg id -i -n -b -t</code></td>
</tr>
<tr>
<td>Git</td>
<td><code>git rev-parse HEAD</code></td>
</tr>
<tr>
<td>Subversion</td>
<td><code>svnversion</code></td>
</tr>
</tbody>
</table>
<p>If your SCM of choice is not listed and you know the command, please let me know by posting a comment.</p>
<h3>Create a template that contains the revision information</h3>
<p>For the following, I&#8217;ll use mercurial, it should be easy to adopt this to the SCM of choice. Using a Gant-Script <code>scripts/_Events.groovy</code> you could hook into the build process and easily generate a Grails template that just contains the output of one of the above commands.</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">eventCompileStart <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span> msg <span style="color: #66cc66;">-&gt;</span>
    <span style="color: #000000; font-weight: bold;">def</span> proc <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;hg id -i -n -b -t&quot;</span>.<span style="color: #993399; font-weight: bold;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    proc.<span style="color: #006600;">waitFor</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #aaaadd; font-weight: bold;">FileOutputStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;grails-app/views/_version.gsp&quot;</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;&lt;</span> proc.<span style="color: #b1b100;">in</span>.<span style="color: #006600;">text</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>This recreated <code>grails-app/views/_version.gsp</code> upon each build, so we&#8217;re sure to have always the most recent revision ids there. It is crucial that the file containing the revision information is itself not under version control. To exclude this file you have to list it in <code>.hgignore</code>, <code>.gitignore</code> or use <code>svn propedit svn:ignore</code>.</p>
<h3>Using the _version.gsp template</h3>
<p>The final step is to embed the previously created <code>_version.gsp</code> somewhere in your code. For my usecase, I want to have the revision ids available on each and every page, so I&#8217;ll put it into the layout template <code>grails-app/views/layout/main.gsp</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>div <span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>p<span style="color: #66cc66;">&gt;&lt;</span>g:message code<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;meta.app.version&quot;</span> <span style="color: #000000; font-weight: bold;">default</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Version: {0}&quot;</span> args<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;[meta(name: 'app.version')]&quot;</span>/<span style="color: #66cc66;">&gt;</span>  SCM: <span style="color: #66cc66;">&lt;</span>g:render template<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/version&quot;</span>/<span style="color: #66cc66;">&gt;&lt;</span>/p<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>/div<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>Be sure not to omit the leading &#8220;/&#8221; in the g:render tag, otherwise _version.gsp gets not found in case of a deeper nested view path.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2011/07/embedding-the-githgsvns-revision-number-inside-a-grails-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>a perfect team: Grails Taggable plugin and JQuery Tagit</title>
		<link>http://blog.armbruster-it.de/2011/04/a-perfect-team-grails-taggable-plugin-and-jquery-tagit/</link>
		<comments>http://blog.armbruster-it.de/2011/04/a-perfect-team-grails-taggable-plugin-and-jquery-tagit/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 22:05:18 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=208</guid>
		<description><![CDATA[In a recent Grails project the customer asked for support of a tagging functionality for some domain classes. In order not to clutter the tagspace too much auto-complete should be available when editing the tags. In fact there is a very simple and elegant solution for this. On the application&#8217;s side, there&#8217;s the Grails Taggable [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent Grails project the customer asked for support of a tagging functionality for some domain classes. In order not to clutter the tagspace too much auto-complete should be available when editing the tags.</p>
<p>In fact there is a very simple and elegant solution for this. On the application&#8217;s side, there&#8217;s the <a href="http://www.grails.org/plugin/taggable">Grails Taggable plugin</a> available. For the frontend side JQuery has a nice plugin called  <a href="http://jquery.webspirited.com/2011/02/jquery-tagit-a-jquery-tagging-plugin/">Tagit plugin</a> caring about editing tags and auto-completion. Both play together very well &#8211; showing this is the intention of this post.</p>
<h3>Setting up the &#8216;to-be-tagged&#8217; domain class</h3>
<p>After installing the taggable plugin the usual way using</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">grails install-plugin taggable</pre></div></div>

<p>setting up the &#8216;to-be-tagged&#8217; domain classes is fairly trivial, the only thing left is to add &#8216;implements Taggable&#8217; to the &#8216;to-be-tagged&#8217; domain classes, e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">org.grails.taggable.Taggable</span>
<span style="color: #000000; font-weight: bold;">class</span> Product <span style="color: #000000; font-weight: bold;">implements</span> Taggable <span style="color: #66cc66;">&#123;</span>
    <span style="color: #aaaadd; font-weight: bold;">String</span> name
    <span style="color: #993333;">double</span> price
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>By marking the domain class with the taggable interface it gets injected some methods for manipulating its tags on instance level</p>
<ul>
<li>addTag,</li>
<li>addTags,</li>
<li>getTags,</li>
<li>parseTags,</li>
<li>removeTag,</li>
<li>setTags</li>
</ul>
<p>as well as some new methods on class level:</p>
<ul>
<li> getAllTags,</li>
<li> getTotalTags,</li>
<li> countByTag.</li>
</ul>
<h3>Setting up JQuery Tagit in the Grails application</h3>
<p>Since the Tagit plugin depends on JQueryUI for autocompletion, lets first install this in the application. Using the <a href="http://www.grails.org/plugin/resources">resources plugin</a> for managing our css/js/image resources is also a good idea:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">grails install-plugin jquery-ui
grails install-plugin resources</pre></div></div>

<p>Download an unzip the <a href="http://jquery.webspirited.com/publicscripts/tagit/jquery.tagit.1.5.zip">latest version of tagit</a> (1.5 when authoring this post) to some temporary location. We basically need to copy three files contained in the zip:</p>
<ul>
<li><code>tagit/js/tagit.js</code> to <code>&lt;grailsapp&gt;/web-app/js</code></li>
<li>one of <code>tagit/css/tagit-&lt;yourchoice&gt;.css</code> and <code>tagit/css/ui-anim_basic_16x16.gif</code> to <code>&lt;grailsapp&gt;/web-app/css</code></li>
</ul>
<p>Since we&#8217;ve added resources to our project let&#8217;s declare them as a module for the resources plugin. For more information on this concept, checkout the <a href="http://www.grails.org/plugin/resources">docs of the Grails resources plugin</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">modules <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
 <span style="color: #ff0000;">'tagit'</span> <span style="color: #66cc66;">&#123;</span>
 dependsOn <span style="color: #ff0000;">'jquery-ui'</span>
 resource <span style="color: #ff0000;">'css/tagit-gradient-blue.css'</span>
 resource <span style="color: #ff0000;">'js/jquery/tagit.js'</span>
 <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3>Editing the view</h3>
<p>Next thing is the frontend. To get started, let&#8217;s generate a controller and views for the given domain class:</p>

<div class="wp_syntax"><div class="code"><pre class="" style="font-family:monospace;">grails generate-all Product</pre></div></div>

<p>For simplicity, we&#8217;ll only care about the <code>edit</code> view for the rest of this post. The code of the generated view is the starting point. First we need to make use of the declared resources and second we need to render the already existing tags and apply the tagit plugin.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">...
&lt;%-- in the head section --%&gt;
&lt;r:use modules=&quot;tagit&quot;/&gt;
...
&lt;%-- in the form section --%&gt;
&lt;fieldset class=&quot;form&quot;&gt;
  &lt;r:script&gt;
    $(function() {
      $(&quot;ul[name='tags']&quot;).tagit({select:true, tagSource: &quot;${g.createLink(action: 'tags')}&quot;});
    });
  &lt;/r:script&gt;
&nbsp;
  &lt;h3&gt;Tags&lt;/h3&gt;
  &lt;div class=&quot;fieldcontain&quot;&gt;
    &lt;ul name=&quot;tags&quot;&gt;
      &lt;g:each in=&quot;${productInstance.tags}&quot;&gt;
        &lt;li&gt;${it}&lt;/li&gt;
      &lt;/g:each&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/fieldset&gt;</pre></td></tr></table></div>

<p>L.3 adds the js/css resources. L.9 is requires some explanation, we&#8217;re decorating the <code>ul</code> tag having an attribute <code>name='tags'</code> with the tagit widget. The parameter <code>select=true</code> is crucial since it passes back the chosen tags upon form submission as a multivalued select-box. Specifying a <code>tagSource</code> URL provides auto-completion. In l.15-19 we&#8217;re displaying the existing tags in a simple unordered list. N.B. the <code>name</code> attribute mirrors the name of the select-box being created.</p>
<h3>Editing the controller</h3>
<p>The <code>ProductController</code> must be modified to store given tags upon form submission and to provide auto-completion. For storing tags, the <code>update</code> action requires a single line change:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>69
70
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;">productInstance.<span style="color: #006600;">properties</span> <span style="color: #66cc66;">=</span> params
productInstance.<span style="color: #006600;">tags</span> <span style="color: #66cc66;">=</span> params.<span style="color: #006600;">tags</span> <span style="color: #808080; font-style: italic;">// new line to be inserted</span></pre></td></tr></table></div>

<p><code>tags</code> isn&#8217;t a real property it is not covered by l.69 and an explicit call to <code>setTags()</code> is necessary.</p>
<p>For auto-completion a new action <code>tags</code> is introduced:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">def</span> tags <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
  render Tag.<span style="color: #006600;">findAllByNameIlike</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;${params.term}%&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span>.<span style="color: #006600;">name</span> <span style="color: #000000; font-weight: bold;">as</span> JSON
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>JQuery-UI auto-completion passes the partially entered tag in request parameter <code>term</code>. The code above searches for all tags starting with the given term and returns their name as JSON.</p>
<h3>Result &amp; Conclusion</h3>
<p>With these very few lines of code a comfortable user interface for tagging with auto-completion could be established. Kudos to the authors of the JQuery Tagit and Grails Taggable plugins. These two plugins are a perfect match.<a href="http://blog.armbruster-it.de/wp-content/uploads/2011/04/tagging.png"><img src="http://blog.armbruster-it.de/wp-content/uploads/2011/04/tagging-300x143.png" alt="" title="tagging" width="300" height="143" class="aligncenter size-medium wp-image-219" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2011/04/a-perfect-team-grails-taggable-plugin-and-jquery-tagit/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Grails Searchable plugin: fighting down OOME when rebuilding the search index</title>
		<link>http://blog.armbruster-it.de/2010/12/grails-searchable-plugin-fighting-down-oome-when-rebuilding-the-search-index/</link>
		<comments>http://blog.armbruster-it.de/2010/12/grails-searchable-plugin-fighting-down-oome-when-rebuilding-the-search-index/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 18:08:00 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=196</guid>
		<description><![CDATA[In one of my projects we store blob data (word documents, pdfs,&#8230;) in a Grails domain class. This data should all be indexed by a search engine and provide a convenient search interface. Pretty easy to solve using the Grails Searchable plugin &#8211; customer satisfied. The project went live, everything was fine the first time. [...]]]></description>
			<content:encoded><![CDATA[<p>In one of my projects we store blob data (word documents, pdfs,&#8230;) in a Grails domain class. This data should all be indexed by a search engine and provide a convenient search interface. Pretty easy to solve using the <a href="http://www.grails.org/plugin/searchable">Grails Searchable plugin</a> &#8211; customer satisfied.</p>
<p>The project went live, everything was fine the first time. Until a certain point, we found that rebuilding the index throwed OutOfMemoryException (OOME). Nothing unusual in the java world,  increasing -Xmx helped out for some time.</p>
<p>With a growing set of data we reached a point where -Xmx comes near the size of physical RAM in the machine. Plugging more RAM is not an option here, so I&#8217;ve decided to tackle down the cause of this.</p>
<p>After some debugging session I&#8217;ve found out that rebuilding the index is performed in batches. Grails Searchable uses the <a href="http://www.compass-project.org/">Compass Framework</a> under the hood. Compass  uses a default batch size of 200. For whatever reason the Grails searchable plugin superseeds that to a fixed (!) value of 5000. This means that during indexing 5000 database rows (each one holding a megabyte-sized blob) are read into RAM and then stored in the index! As long as there are no blobs in the database 5000 might be a good value, the larger the batch size the faster indexing will work.</p>
<p>The best solution here would be a configuration parameter for the fetchCount, I&#8217;ve filed an <a href="http://jira.codehaus.org/browse/GRAILSPLUGINS-2691">JIRA</a> for this. Until this is fixed, thers a workaround: reconfigure the compassGpsDevice bean in the application&#8217;s resources.groovy like this</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">compassGpsDevice<span style="color: #66cc66;">&#40;</span>HibernateGpsDevice<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> bean <span style="color: #66cc66;">-&gt;</span>
    bean.<span style="color: #006600;">destroyMethod</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;stop&quot;</span>
    name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;hibernate&quot;</span>
    sessionFactory <span style="color: #66cc66;">=</span> ref<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;sessionFactory&quot;</span><span style="color: #66cc66;">&#41;</span>
    fetchCount <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">200</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Mission Accomplished.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2010/12/grails-searchable-plugin-fighting-down-oome-when-rebuilding-the-search-index/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>using Redmine with IntelliJ X EAP</title>
		<link>http://blog.armbruster-it.de/2010/09/using-redmine-with-intellij-x-eap/</link>
		<comments>http://blog.armbruster-it.de/2010/09/using-redmine-with-intellij-x-eap/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 13:43:32 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[redmine]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=178</guid>
		<description><![CDATA[Since the times when I&#8217;ve started using Grails some years ago, I became a passionate user of IntelliJ IDEA. Basically the single one thing I&#8217;ve been missing when moving over from Eclipse was the lack of something like Mylyn. Since version 9, IntelliJ comes up with basic task and context management features. Support for Jira [...]]]></description>
			<content:encoded><![CDATA[<p>Since the times when I&#8217;ve started using Grails some years ago, I became a passionate user of <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>. Basically the single one thing I&#8217;ve been missing when moving over from Eclipse was the lack of something like <a href="http://www.eclipse.org/mylyn/">Mylyn</a>. Since version 9, IntelliJ comes up with <a href="http://blogs.jetbrains.com/idea/2009/05/task-context-management-in-maia/">basic task and context management features</a>. Support for <a href="http://www.atlassian.com/software/jira/">Jira</a> has always been great by a plugin from Atlassian.  <a href="http://www.redmine.org">Redmine</a> is the also a great issue tracker/wiki/project management application. But there was no IDE integration into IntelliJ so far. The upcoming IntelliJ X version has support for this in their latest EAP.</p>
<p>It took me some time to figure out how that works, so I want to share what I&#8217;ve found out so far:</p>
<ul>
<li>go to File|Settings dialog, select Tasks|Servers</li>
<li>add a redmine server
<div id="attachment_179" class="wp-caption alignnone" style="width: 547px"><a href="http://blog.armbruster-it.de/wp-content/uploads/2010/09/intellij-tasks.png"><img class="size-full wp-image-179  " title="intellij-tasks" src="http://blog.armbruster-it.de/wp-content/uploads/2010/09/intellij-tasks.png" alt="" width="537" height="271" /></a><p class="wp-caption-text">IntelliJ settings dialog</p></div>
<p>The API Token must be taken from the &#8220;My account&#8221; page, link &#8220;API Access Key&#8221;. The project ID is the short project identifier found on Redmine&#8217;s project settings page</li>
<li>test and validate the connection</li>
<li>apply the changes in settings dialog</li>
<li>Open a new task (Alt-Shift-N)</li>
<li>Enter either the id or a word contained in the issue&#8217;s title and press Crtl-Space to find matching issues from redmine.</li>
<li>Select one of the issues being found and create a new context and changelist for that one.</li>
</ul>
<p>Having the redmine tasks in the IDE will be a big time safer for me.</p>
<h3>Update:</h3>
<p>If your redmine server uses https with a self-signed certificate, you must append the certifacte to JVM&#8217;s keystore: <a href="http://www.chrissearle.org/node/260">http://www.chrissearle.org/node/260</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2010/09/using-redmine-with-intellij-x-eap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grails countries plugin 0.2 released</title>
		<link>http://blog.armbruster-it.de/2010/08/grails-countries-plugin-0-2-released/</link>
		<comments>http://blog.armbruster-it.de/2010/08/grails-countries-plugin-0-2-released/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 21:16:11 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=172</guid>
		<description><![CDATA[Thanks to the contributions of other hackers I&#8217;m announcing the 0.2 release of the Grails countries plugin. The changes: added languages for country and continent names: af: contributed by Robert Fletcher es, fr, it, pt_BR: contributed by Lucas Teixeira country list is now maintained outside CountryBootstrap.groovy in seperate csv files reworked properties file to consistently [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the contributions of other hackers I&#8217;m announcing the 0.2 release of the Grails countries plugin. The changes:</p>
<ul>
<li>added languages for country and continent names:
<ul>
<li> af: contributed by <a href="http://adhockery.blogspot.com/">Robert Fletcher</a></li>
<li> es, fr, it, pt_BR: contributed by <a href="http://blog.lucastex.com/">Lucas Teixeira</a></li>
</ul>
</li>
<li>country list is now maintained outside CountryBootstrap.groovy in seperate csv files</li>
<li>reworked properties file to consistently use ISO-3166 3-letter-code as key</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2010/08/grails-countries-plugin-0-2-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>new Grails plugin: Countries</title>
		<link>http://blog.armbruster-it.de/2010/08/new-grails-plugin-countries/</link>
		<comments>http://blog.armbruster-it.de/2010/08/new-grails-plugin-countries/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 14:19:20 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=163</guid>
		<description><![CDATA[A common requirement in many applications is to deal with countries and/or continents. The plugin&#8217;s goal is to apply the DRY principle to these requirements. In short, the plugin offers: populated domain classes for countries and continents i18n for continent and country names (for now, only en and de locales). Currently there are 190 countries [...]]]></description>
			<content:encoded><![CDATA[<p>A common requirement in many applications is to deal with countries and/or continents. The plugin&#8217;s goal is to apply the DRY principle to these requirements.</p>
<p>In short, the plugin offers:</p>
<ul>
<li>populated domain classes for countries and continents</li>
<li> i18n for continent and country names (for now, only en and de locales). Currently there are 190 countries available.</li>
<li>tags for simple usage of
<ul>
<li>localized names for countries and continents</li>
<li>select boxes: for all countries, for all continents, for all countries of a continent or for a defined set of countries. The select box contents are automatically sorted by the the localized country/continent name.</li>
</ul>
</li>
</ul>
<p>resources:</p>
<ul>
<li> homepage: <a href="http://www.grails.org/plugin/countries">http://www.grails.org/plugin/countries</a></li>
<li> docs:<a href="http://sarmbruster.github.com/grails-countries-plugin/">http://sarmbruster.github.com/grails-countries-plugin/</a></li>
<li> sources:<a href="http://github.com/sarmbruster/grails-countries-plugin"> http://github.com/sarmbruster/grails-countries-plugin</a></li>
</ul>
<p>For bug reports please use <a href="http://jira.codehaus.org">http://jira.codehaus.org</a>, project &#8220;GrailsPlugins&#8221;, component &#8220;countries&#8221;.</p>
<p><strong>Update:</strong> since the initial release requires the usage of Grails 1.3.4-SNAPSHOT a bugfix release 0.1.1 has been release shortly afterwards. 0.1.1 should work with Grails &gt;= 1.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2010/08/new-grails-plugin-countries/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Grails Neo4j plugin 0.3 released</title>
		<link>http://blog.armbruster-it.de/2010/07/grails-neo4j-plugin-0-3-released/</link>
		<comments>http://blog.armbruster-it.de/2010/07/grails-neo4j-plugin-0-3-released/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 17:09:46 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[neo4j]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=159</guid>
		<description><![CDATA[Today I released an update of the Grails Neo4j plugin (http://www.grails.org/plugin/neo4j). The main changes are: compatibility with Grails 1.3.x. Be aware, Grails 1.3 &#8211; 1.3.3 are suffering from http://jira.codehaus.org/browse/GRAILS-6427, so either use Grails 1.2.x, or be brave and use a recent git build of Grails 1.3.4.SNAPSHOT. usage of Neo4j 1.1 (released today just a few [...]]]></description>
			<content:encoded><![CDATA[<p>Today I released an update of the Grails Neo4j plugin (<a href="http://www.grails.org/plugin/neo4j">http://www.grails.org/plugin/neo4j</a>). The main changes are:</p>
<ul>
<li>compatibility with Grails 1.3.x. Be aware, Grails 1.3 &#8211; 1.3.3 are suffering from <a href="http://jira.codehaus.org/browse/GRAILS-6427">http://jira.codehaus.org/browse/GRAILS-6427</a>, so either use Grails 1.2.x, or be brave and use a recent git build of Grails 1.3.4.SNAPSHOT.</li>
<li>usage of Neo4j 1.1 (released today just a few hours ago, so get it while it&#8217;s hot).</li>
</ul>
<p>All changes:</p>
<ul>
<li>[GRAILSPLUGINS-2302] &#8211; &#8220;home&#8221; link broken in the org.codehaus.groovy.grails.plugins.neo4j.Neo4jController views</li>
<li>[GRAILSPLUGINS-2303] &#8211; Problems with annotation Neo4jEntity</li>
<li>[GRAILSPLUGINS-2345] &#8211; upgrade to Neo4j 1.1</li>
<li>[GRAILSPLUGINS-2346] &#8211; &lt;domainclass&gt;.get() throws exception if id is not invalid</li>
<li>[GRAILSPLUGINS-2347] &#8211; &lt;domainClass&gt;.findAllBy&lt;Field&gt;(value) fails</li>
<li>[GRAILSPLUGINS-2349] &#8211; provide compatibility for Grails 1.3.x</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2010/07/grails-neo4j-plugin-0-3-released/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>getting a list of all i18n properties used in a Grails application</title>
		<link>http://blog.armbruster-it.de/2010/07/getting-a-list-of-all-i18n-properties-used-in-a-grails-application/</link>
		<comments>http://blog.armbruster-it.de/2010/07/getting-a-list-of-all-i18n-properties-used-in-a-grails-application/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 19:43:45 +0000</pubDate>
		<dc:creator>Stefan Armbruster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=152</guid>
		<description><![CDATA[You might know this situation: in a project you start by hacking code that uses i18n properties instead of fixed strings in order to support multiple languages. The normal process in Grails is to use the g:message tag in controllers or gsp templates. Side by side you append the new introduced i18n property with some [...]]]></description>
			<content:encoded><![CDATA[<p>You might know this situation: in a project you start by hacking code that uses i18n properties instead of fixed strings in order to support multiple languages. The normal process in Grails is to use the <a href="http://grails.org/doc/latest/ref/Tags/message.html">g:message</a> tag in controllers or gsp templates. Side by side you append the new introduced i18n property with some value in your messsages.properties file.</p>
<p>When support for a new language is requested, all you have to do is translating messages.properties. So far so good &#8211; this make i18n really easy.</p>
<p>But: when the project evolves, there&#8217;s a good chance that some of your i18n properties in messages.properties gets orphaned. Assume you remove a block of code from a gsp. It happens often that the i18n properties used in this block are not removed from messages*.properties because at some point you are not sure if it is referenced elsewhere. So what would be really useful here would be a list of all referenced i18n properties from your *.groovy/*.gsp files.</p>
<p>Doing so is pretty easy, just add a new <a href="http://grails.org/doc/latest/guide/4.%20The%20Command%20Line.html">gant script</a> to your Grails application&#8217;s script folder, let&#8217;s name it i18nList.groovy. This script basically contains:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">includeTargets <span style="color: #66cc66;">&lt;&lt;</span> grailsScript<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Init&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
target<span style="color: #66cc66;">&#40;</span>main: <span style="color: #ff0000;">&quot;create a list of all i18n properties used in groovy code and gsp templates&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">def</span> properties <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #aaaadd; font-weight: bold;">File</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #FFCC33;">eachFileRecurse</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>it.<span style="color: #006600;">file</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>it<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #b1b100;">case</span> ~/.<span style="color: #66cc66;">*</span>\.<span style="color: #006600;">groovy</span>/:
                    <span style="color: #000000; font-weight: bold;">def</span> matcher <span style="color: #66cc66;">=</span> it.<span style="color: #006600;">text</span> <span style="color: #66cc66;">=</span>~ /code:\s<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;'](.*?)[&quot;</span><span style="color: #ff0000;">']/
                    matcher.each { properties &lt;&lt; it[1] }
                    break
                case ~/.*<span style="color: #000099; font-weight: bold;">\.</span>gsp/:
                    def matcher = it.text =~ /code=[&quot;'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span>.<span style="color: #66cc66;">*?</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;']/
                    matcher.each { properties &lt;&lt; it[1] }
                    break
            }
        }
    }
    println properties.sort().unique().join(&quot;</span>\n<span style="color: #ff0000;">&quot;)
&nbsp;
}
&nbsp;
setDefaultTarget(main)</span></pre></div></div>

<p>(sorry the color coding seems to fail for some Groovy regexes) The script recursivly iterates over all *.groovy and *.gsp files in your project and extract the part after the &#8216;code&#8217; attribute of the message tag using a regex. The regex result are collected into an array. This array is sorted, unique&#8217;d and printed to the console. That&#8217;s it.</p>
<p>One word of caution: this gant script &#8216;works for me&#8217;. So depending on your code, you might notice that the used regex are not sufficient or even fail. Feel free to modify them for your needs, even better send back your modifications.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.armbruster-it.de/2010/07/getting-a-list-of-all-i18n-properties-used-in-a-grails-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

