{"id":38290,"date":"2016-07-29T18:47:13","date_gmt":"2016-07-29T13:17:13","guid":{"rendered":"https:\/\/2thenew.online\/blog\/?p=38290"},"modified":"2016-08-01T11:59:45","modified_gmt":"2016-08-01T06:29:45","slug":"run-grails-application-as-standalone-application","status":"publish","type":"post","link":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/","title":{"rendered":"Run Grails application as standalone application"},"content":{"rendered":"<p>Most <a title=\"grails development\" href=\"https:\/\/2thenew.online\/grails-application-development\">Grails application<\/a> are intended to deploy within external container.\u00a0According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty.<\/p>\n<p>There is a plugin <a title=\"Standalone App Runner\" href=\"http:\/\/grails.org\/plugin\/standalone\" target=\"_blank\">Standalone App Runner<\/a> which allow to em-bade a container inside the grails application itself. The advantage of that is that a\u00a0Gails application can be run as a standalone application , without any dependency of external container.<\/p>\n<p>The embadded container comes up with application up and stop when we stop the application. To use this add the plugin dependencies in BuildConfig.groovy<\/p>\n<p>[java]<br \/>\ncompile &quot;org.grails.plugins:standalone:9.0.0.M4&quot;<br \/>\n[\/java]<\/p>\n<p>To create the Jar file with embadded container :<\/p>\n<p>[java]<br \/>\ngrails build-standalone<br \/>\n[\/java]<\/p>\n<p>To Run the Jar file as a stand alone application :<\/p>\n<p>[java]<br \/>\njava -jar \/path\/to\/jar_name.jar<br \/>\n[\/java]<\/p>\n<p>We can also pass the environment variables while running the jar to run the container with a specific environment configuration :<\/p>\n<p>[java]<br \/>\ngrails -Dgrails.env=prod build-standalone jar_name.jar<br \/>\n[\/java]<\/p>\n<p>This plugin has both Tomcat and Jetty container functionality, we can set the jetty as a default container. For that we need to specify that in BuildConfig.groovy :<\/p>\n<p>[java]<br \/>\ngrails.plugin.standalone.useJetty = true<br \/>\n[\/java]<\/p>\n<p>Also it can bs specify at the time of deployment which server will be used to run the application. we can specify the flag values for perticular container.<\/p>\n<p>[java]<br \/>\ngrails build-standalone &#8211;tomcat<br \/>\ngrails build-standalone &#8211;jetty<br \/>\n[\/java]<\/p>\n<p>It removes the external container dependency and easily integrate with the application. And the Grails application can be run as standalone application with Jar packaging.<\/p>\n<p>Hope this helps \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most Grails application are intended to deploy within external container.\u00a0According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that [&hellip;]<\/p>\n","protected":false},"author":203,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":11,"footnotes":""},"categories":[7,1],"tags":[4840],"class_list":["post-38290","post","type-post","status-publish","format-standard","hentry","category-grails","category-technology","tag-grails"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sanchit\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Run Grails application as standalone application | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Run Grails application as standalone application | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#article\",\"name\":\"Run Grails application as standalone application | TO THE NEW Blog\",\"headline\":\"Run Grails application as standalone application\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sanchit\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2016-07-29T18:47:13+05:30\",\"dateModified\":\"2016-08-01T11:59:45+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#webpage\"},\"articleSection\":\"Grails, Technology, Grails\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#listItem\",\"name\":\"Run Grails application as standalone application\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#listItem\",\"position\":3,\"name\":\"Run Grails application as standalone application\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sanchit\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sanchit\\\/\",\"name\":\"Sanchit\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/ef47782c-6d11-4d8c-b6a1-2c3d99c37fc9_4539-Sanchit-.-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Sanchit\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/\",\"name\":\"Run Grails application as standalone application | TO THE NEW Blog\",\"description\":\"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/run-grails-application-as-standalone-application\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sanchit\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sanchit\\\/#author\"},\"datePublished\":\"2016-07-29T18:47:13+05:30\",\"dateModified\":\"2016-08-01T11:59:45+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Run Grails application as standalone application | TO THE NEW Blog","description":"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that","canonical_url":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#article","name":"Run Grails application as standalone application | TO THE NEW Blog","headline":"Run Grails application as standalone application","author":{"@id":"https:\/\/2thenew.online\/blog\/author\/sanchit\/#author"},"publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"},"datePublished":"2016-07-29T18:47:13+05:30","dateModified":"2016-08-01T11:59:45+05:30","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#webpage"},"articleSection":"Grails, Technology, Grails"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/2thenew.online\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#listItem","name":"Run Grails application as standalone application"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#listItem","position":3,"name":"Run Grails application as standalone application","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.online\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.online\/blog\/author\/sanchit\/#author","url":"https:\/\/2thenew.online\/blog\/author\/sanchit\/","name":"Sanchit","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/ef47782c-6d11-4d8c-b6a1-2c3d99c37fc9_4539-Sanchit-.-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Sanchit"}},{"@type":"WebPage","@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#webpage","url":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/","name":"Run Grails application as standalone application | TO THE NEW Blog","description":"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.online\/blog\/author\/sanchit\/#author"},"creator":{"@id":"https:\/\/2thenew.online\/blog\/author\/sanchit\/#author"},"datePublished":"2016-07-29T18:47:13+05:30","dateModified":"2016-08-01T11:59:45+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.online\/blog\/#website","url":"https:\/\/2thenew.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Run Grails application as standalone application | TO THE NEW Blog","og:description":"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that","og:url":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/","og:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Run Grails application as standalone application | TO THE NEW Blog","twitter:description":"Most Grails application are intended to deploy within external container. According to the traditional way of deployment, the apps are bundled as war packaging, deploy it into any external container like tomcat and Jetty. There is a plugin Standalone App Runner which allow to em-bade a container inside the grails application itself. The advantage of that","twitter:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"38290","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 14:34:12","updated":"2024-02-29 09:16:22","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRun Grails application as standalone application\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.online\/blog"},{"label":"Technology","link":"https:\/\/2thenew.online\/blog\/category\/technology\/"},{"label":"Run Grails application as standalone application","link":"https:\/\/2thenew.online\/blog\/run-grails-application-as-standalone-application\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/38290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/users\/203"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/comments?post=38290"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/38290\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/media?parent=38290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/categories?post=38290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/tags?post=38290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}