<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using Gant to execute a groovy script within the Grails context (updated)</title>
	<atom:link href="http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/feed/" rel="self" type="application/rss+xml" />
	<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/</link>
	<description>Groovy, Grails and OS X tips and tricks</description>
	<lastBuildDate>Sat, 31 Jul 2010 11:43:17 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vladimir Grichina</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2716</link>
		<dc:creator>Vladimir Grichina</dc:creator>
		<pubDate>Thu, 03 Jun 2010 12:16:31 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2716</guid>
		<description>As promised, blog post about updated version – http://www.componentix.com/blog/15</description>
		<content:encoded><![CDATA[<p>As promised, blog post about updated version – <a href="http://www.componentix.com/blog/15" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/www.componentix.com/blog/15?referer=');">http://www.componentix.com/blog/15</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir Grichina</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2715</link>
		<dc:creator>Vladimir Grichina</dc:creator>
		<pubDate>Wed, 02 Jun 2010 22:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2715</guid>
		<description>Hi Ted,

Your latest script didn&#039;t work on Grails 1.3.1, so I updated it a bit:
http://gist.github.com/423119

Would like to get comments from you, going to publish it in blog as well.

Thanks,

Vladimir</description>
		<content:encoded><![CDATA[<p>Hi Ted,</p>
<p>Your latest script didn&#8217;t work on Grails 1.3.1, so I updated it a bit:<br />
<a href="http://gist.github.com/423119" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/gist.github.com/423119?referer=');">http://gist.github.com/423119</a></p>
<p>Would like to get comments from you, going to publish it in blog as well.</p>
<p>Thanks,</p>
<p>Vladimir</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tednaleid</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2689</link>
		<dc:creator>tednaleid</dc:creator>
		<pubDate>Tue, 18 May 2010 16:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2689</guid>
		<description>Yep, that should be possible.  If you google around for information around using GORM outside of grails, there should be a number of blog posts that pop up around it.  If you apply that so that it runs that way with your script (and so that your GORM domain objects are part of your classpath when the script runs) it should work.  I just haven&#039;t tried it so I can&#039;t give you more specific info, good luck!</description>
		<content:encoded><![CDATA[<p>Yep, that should be possible.  If you google around for information around using GORM outside of grails, there should be a number of blog posts that pop up around it.  If you apply that so that it runs that way with your script (and so that your GORM domain objects are part of your classpath when the script runs) it should work.  I just haven&#8217;t tried it so I can&#8217;t give you more specific info, good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vino</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2688</link>
		<dc:creator>Vino</dc:creator>
		<pubDate>Tue, 18 May 2010 11:00:36 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2688</guid>
		<description>Yes. Sorry. This is what happens when an elec engineer tries to use stuff he doesn&#039;t totally understand. :)

I am creating a small grails app which accesses a database. The database itself gets updated by some other source. I&#039;d like to share the domain classes and utilize the power of GORM as much as possible even in the &#039;external&#039; script so I don&#039;t have to deal with schema &#039;mismatch&#039;. 

Idea is to create a script which can be used to update the database with a command line interface, while my grails app works flawlessly with the same back-end. You think its possible? I&#039;d like to get there.</description>
		<content:encoded><![CDATA[<p>Yes. Sorry. This is what happens when an elec engineer tries to use stuff he doesn&#8217;t totally understand. :)</p>
<p>I am creating a small grails app which accesses a database. The database itself gets updated by some other source. I&#8217;d like to share the domain classes and utilize the power of GORM as much as possible even in the &#8216;external&#8217; script so I don&#8217;t have to deal with schema &#8216;mismatch&#8217;. </p>
<p>Idea is to create a script which can be used to update the database with a command line interface, while my grails app works flawlessly with the same back-end. You think its possible? I&#8217;d like to get there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tednaleid</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2687</link>
		<dc:creator>tednaleid</dc:creator>
		<pubDate>Tue, 18 May 2010 05:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2687</guid>
		<description>@Vino  Thanks, I&#039;m glad you found it useful.

I took a look at createBook.groovy, but I&#039;m not seeing a missing newline anywhere.  What am I missing?

I&#039;m also not sure what you mean by &quot;run it outside of grails&quot;, running it inside of grails is sort of the whole point :).  Do you mean with just GORM?  I haven&#039;t tried that.</description>
		<content:encoded><![CDATA[<p>@Vino  Thanks, I&#8217;m glad you found it useful.</p>
<p>I took a look at createBook.groovy, but I&#8217;m not seeing a missing newline anywhere.  What am I missing?</p>
<p>I&#8217;m also not sure what you mean by &#8220;run it outside of grails&#8221;, running it inside of grails is sort of the whole point :).  Do you mean with just GORM?  I haven&#8217;t tried that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vino</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2686</link>
		<dc:creator>Vino</dc:creator>
		<pubDate>Tue, 18 May 2010 03:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2686</guid>
		<description>Works like a charm. A missing new line in the createBook.groovy, but a great example nevertheless. 

Now all I need to figure out is to run it outside of grails... Has anyone tried this? Ted?</description>
		<content:encoded><![CDATA[<p>Works like a charm. A missing new line in the createBook.groovy, but a great example nevertheless. </p>
<p>Now all I need to figure out is to run it outside of grails&#8230; Has anyone tried this? Ted?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: corey_s</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2673</link>
		<dc:creator>corey_s</dc:creator>
		<pubDate>Tue, 11 May 2010 03:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2673</guid>
		<description>regarding grails 1.3:

I got things working by simply adding:

setDefaultTarget(&#039;default&#039;)

... to the latest bitbucket version of the script:

http://bitbucket.org/tednaleid/grails-run-script/src/tip/scripts/RunScript.groovy</description>
		<content:encoded><![CDATA[<p>regarding grails 1.3:</p>
<p>I got things working by simply adding:</p>
<p>setDefaultTarget(&#8216;default&#8217;)</p>
<p>&#8230; to the latest bitbucket version of the script:</p>
<p><a href="http://bitbucket.org/tednaleid/grails-run-script/src/tip/scripts/RunScript.groovy" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-run-script/src/tip/scripts/RunScript.groovy?referer=');">http://bitbucket.org/tednaleid/grails-run-script/src/tip/scripts/RunScript.groovy</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: corey_s</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2672</link>
		<dc:creator>corey_s</dc:creator>
		<pubDate>Tue, 11 May 2010 03:28:50 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2672</guid>
		<description>Has anyone gotten this to work w/ grails-1.3rc2?</description>
		<content:encoded><![CDATA[<p>Has anyone gotten this to work w/ grails-1.3rc2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish Ranjan</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2655</link>
		<dc:creator>Ashish Ranjan</dc:creator>
		<pubDate>Sat, 24 Apr 2010 09:11:12 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2655</guid>
		<description>nice work.
Why dont u submit both (with and without argument scripts) scripts for inclusion in the next version of grails itself?

Ashish Ranjan
ashishwave@yahoo.com</description>
		<content:encoded><![CDATA[<p>nice work.<br />
Why dont u submit both (with and without argument scripts) scripts for inclusion in the next version of grails itself?</p>
<p>Ashish Ranjan<br />
<a href="mailto:ashishwave@yahoo.com">ashishwave@yahoo.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/comment-page-1/#comment-2590</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Fri, 12 Mar 2010 21:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://tednaleid.wordpress.com/?p=11#comment-2590</guid>
		<description>As Armin said above, I also had to comment out line 12: depends(checkVersion, configureProxy, packageApp, classpath) or the parseArguments block ran twice...

Also, how can I pass the argsMap into a full blown class?  I&#039;m not running a script.  Looks something like this:


grails run-script-with-params grails-app/controllers/MyController.groovy --foo=bar


...and this...

Class MyController {
  def main = {
    println &quot;argsMap is: $argsMap&quot;
  }
}

...and I receive the error that argsMap doesn&#039;t exist...

Error executing script RunScriptWithParams: No such property: argsMap for class: CatalogController
gant.TargetMissingPropertyException: No such property: argsMap for class: CatalogController</description>
		<content:encoded><![CDATA[<p>As Armin said above, I also had to comment out line 12: depends(checkVersion, configureProxy, packageApp, classpath) or the parseArguments block ran twice&#8230;</p>
<p>Also, how can I pass the argsMap into a full blown class?  I&#8217;m not running a script.  Looks something like this:</p>
<p>grails run-script-with-params grails-app/controllers/MyController.groovy &#8211;foo=bar</p>
<p>&#8230;and this&#8230;</p>
<p>Class MyController {<br />
  def main = {<br />
    println &#8220;argsMap is: $argsMap&#8221;<br />
  }<br />
}</p>
<p>&#8230;and I receive the error that argsMap doesn&#8217;t exist&#8230;</p>
<p>Error executing script RunScriptWithParams: No such property: argsMap for class: CatalogController<br />
gant.TargetMissingPropertyException: No such property: argsMap for class: CatalogController</p>
]]></content:encoded>
	</item>
</channel>
</rss>
