{"id":1114,"date":"2010-06-18T15:46:47","date_gmt":"2010-06-18T10:16:47","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=1114"},"modified":"2016-12-16T12:00:23","modified_gmt":"2016-12-16T06:30:23","slug":"script-for-running-grails-projects-of-different-versions-simultaneously","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/script-for-running-grails-projects-of-different-versions-simultaneously\/","title":{"rendered":"Script for Running Grails Projects of Different Versions Simultaneously"},"content":{"rendered":"<p>Sometimes it is required that multiple Grails projects, hosted on a different Grails version, run simultaneously. In this case, while fixing bugs, you are required to run the application after switching the Grails version each time.<\/p>\n<p>To handle this scenario, I wrote a utility shell script &#8220;runGrails&#8221; to use a particular version of Grails while running the scripts like run-app, test-app etc. The shell script contained these two lines:<\/p>\n<blockquote>\n<pre>export GRAILS_HOME=\/opt\/grails-$1\r\n$GRAILS_HOME\/bin\/grails $2<\/pre>\n<\/blockquote>\n<p>This script was put in a location coming under the &#8220;PATH&#8221;. It is assumed that the different versions of grails are under directories named <em>grails-&lt;version&gt; <\/em>under <em>\/opt\/.<\/em><\/p>\n<p>Now, to run different projects, we can call the script as:<\/p>\n<blockquote>\n<pre>runGrails 1.3.1 \"-Dserver.port=8082 run-app\"<\/pre>\n<\/blockquote>\n<p>which will run the project with grails version 1.3.1 at port 8082.<\/p>\n<p>PS: This works on *nix systems.<\/p>\n<p>Hope this helps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it is required that multiple Grails projects, hosted on a different Grails version, run simultaneously. In this case, while fixing bugs, you are required to run the application after switching the Grails version each time. To handle this scenario, I wrote a utility shell script &#8220;runGrails&#8221; to use a particular version of Grails while [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1},"categories":[7],"tags":[4840,260],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/1114"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=1114"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/1114\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=1114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=1114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=1114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}