blob: de5386737a3970ab082fcb0e7190dd88a73419d5 [file]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '79']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<title>6 Application Profiles 3.3.0.RC1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
<link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
<script type="text/javascript">
function addJsClass() {
var classes = document.body.className.split(" ");
classes.push("js");
document.body.className = classes.join(" ");
}
</script>
</head>
<body class="body" onload="addJsClass();">
<div id="navigation">
<div class="navTitle">
The Grails Framework
</div>
<div class="navLinks">
<ul>
<li>
<div id="nav-summary" onmouseover="toggleNavSummary(false)" onmouseout="toggleNavSummary(true)">
<a href="../guide/index.html" class="button">Table of contents</a>
<div id="nav-summary-childs" style="display:none;">
<div class="toc-item" style="margin-left:0"><a href="../guide/introduction.html"><strong>1</strong><span>Introduction</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/gettingStarted.html"><strong>2</strong><span>Getting Started</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/upgrading.html"><strong>3</strong><span>Upgrading from Grails 3.2.x</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/conf.html"><strong>4</strong><span>Configuration</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/commandLine.html"><strong>5</strong><span>The Command Line</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/profiles.html"><strong>6</strong><span>Application Profiles</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/GORM.html"><strong>7</strong><span>Object Relational Mapping (GORM)</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/theWebLayer.html"><strong>8</strong><span>The Web Layer</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/traits.html"><strong>9</strong><span>Traits</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/REST.html"><strong>10</strong><span>REST</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/async.html"><strong>11</strong><span>Asynchronous Programming</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/validation.html"><strong>12</strong><span>Validation</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/services.html"><strong>13</strong><span>The Service Layer</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/staticTypeCheckingAndCompilation.html"><strong>14</strong><span>Static Type Checking And Compilation</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/testing.html"><strong>15</strong><span>Testing</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/i18n.html"><strong>16</strong><span>Internationalization</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/security.html"><strong>17</strong><span>Security</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/plugins.html"><strong>18</strong><span>Plugins</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/spring.html"><strong>19</strong><span>Grails and Spring</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/scaffolding.html"><strong>20</strong><span>Scaffolding</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/deployment.html"><strong>21</strong><span>Deployment</span></a>
</div>
<div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>22</strong><span>Contributing to Grails</span></a>
</div>
</div>
</div>
</li>
<li class="separator selected">
<a id="ref-button" onclick="localToggle(); return false;" href="#">Quick Reference</a>
</li>
</ul>
</div>
</div>
<table id="colset" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="col1">
<div id="main" class="corner-all">
<div class="toc-item prev-left"><a href="../guide/commandLine.html">&lt;&lt; <strong>5</strong><span>The Command Line</span></a></div>
<span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
<div class="toc-item next-right"><a href="../guide/GORM.html"><strong>7</strong><span>Object Relational Mapping (GORM)</span> >></a></div>
<div class="project">
<h1>6 Application Profiles</h1>
<p><strong>Version:</strong> 3.3.0.RC1</p>
</div>
<div id="table-of-content">
<h2>Table of Contents</h2>
<div class="toc-item" style="margin-left:0px"><a href="#creatingProfiles"><strong>6.1</strong><span>Creating Profiles</span></a>
</div>
<div class="toc-item" style="margin-left:0px"><a href="#profileInheritance"><strong>6.2</strong><span>Profile Inheritance</span></a>
</div>
<div class="toc-item" style="margin-left:0px"><a href="#publishingProfiles"><strong>6.3</strong><span>Publishing Profiles</span></a>
</div>
<div class="toc-item" style="margin-left:0px"><a href="#profileStructure"><strong>6.4</strong><span>Understanding Profiles</span></a>
</div>
<div class="toc-item" style="margin-left:0px"><a href="#profileCommands"><strong>6.5</strong><span>Creating Profile Commands</span></a>
</div>
<div class="toc-item" style="margin-left:0px"><a href="#profileFeatures"><strong>6.6</strong><span>Creating Profile Features</span></a>
</div>
</div>
<h1 id="profiles">6 Application Profiles</h1>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="paragraph">
<p>When you create a Grails application with the <a href="../ref/Command%20Line/create-app.html">create-app</a> command by default the "web" profile is used:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">grails create-app myapp</code></pre>
</div>
</div>
<div class="paragraph">
<p>You can specify a different profile with the profile argument:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">grails create-app myapp --profile=rest-api</code></pre>
</div>
</div>
<div class="paragraph">
<p>Profiles encapsulate the project commands, templates and plugins that are designed to work for a given profile. The source for the profiles can be found <a href="https://github.com/grails-profiles">on Github</a>, whilst the profiles themselves are published as JAR files to the Grails central repository.</p>
</div>
<div class="paragraph">
<p>To find out what profiles are available use the <a href="../ref/Command%20Line/list-profiles.html">list-profiles</a> command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails list-profiles</code></pre>
</div>
</div>
<div class="paragraph">
<p>For more information on a particular profile use the <a href="../ref/Command%20Line/profile-info.html">profile-info</a> command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails profile-info rest-api</code></pre>
</div>
</div>
<div class="sect3">
<h4 id="_profile_repositories">Profile Repositories</h4>
<div class="paragraph">
<p>By default Grails will resolve profiles from the <a href="https://repo.grails.org/grails/core/org/grails/profiles/">Grails central repository</a>. However, you can override what repositories will be searched by specifying repositories in the <code>USER_HOME/.grails/settings.groovy</code> file.</p>
</div>
<div class="paragraph">
<p>If you want profiles to be resolved with a custom repository in addition to the Grails central repository, you must specify Grails central in the file as well:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">grails {
profiles {
repositories {
myRepo {
url = <span class="string"><span class="delimiter">&quot;</span><span class="content">http://foo.com/repo</span><span class="delimiter">&quot;</span></span>
snapshotsEnabled = <span class="predefined-constant">true</span>
}
grailsCentral {
url = <span class="string"><span class="delimiter">&quot;</span><span class="content">https://repo.grails.org/grails/core</span><span class="delimiter">&quot;</span></span>
snapshotsEnabled = <span class="predefined-constant">true</span>
}
}
}
}</code></pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Grails uses Aether to resolve profiles, as a Gradle instance is not yet available when the <code>create-app</code> command is executed. This means that you can also define repositories and more advanced configuration (proxies, authentication etc.) in your <code>USER_HOME/.m2/settings.xml</code> file if you wish.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>It is also possible to store simple credentials for profile repositories directly in the <code>USER_HOME/.grails/settings.groovy</code> file.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">grails {
profiles {
repositories {
myRepo {
url = <span class="string"><span class="delimiter">&quot;</span><span class="content">http://foo.com/repo</span><span class="delimiter">&quot;</span></span>
snapshotsEnabled = <span class="predefined-constant">true</span>
username = <span class="string"><span class="delimiter">&quot;</span><span class="content">user</span><span class="delimiter">&quot;</span></span>
password = <span class="string"><span class="delimiter">&quot;</span><span class="content">pass</span><span class="delimiter">&quot;</span></span>
}
...
}
}
}</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_profile_defaults">Profile Defaults</h4>
<div class="paragraph">
<p>To create an application that uses a custom profile, you must specify the full artifact.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-app myapp --profile=com.mycompany.grails.profiles:myprofile:1.0.0</code></pre>
</div>
</div>
<div class="paragraph">
<p>To make this process easier, you can define defaults for a given profile in the <code>USER_HOME/.grails/settings.groovy</code> file.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">grails {
profiles {
myprofile {
groupId = <span class="string"><span class="delimiter">&quot;</span><span class="content">com.mycompany.grails.profiles</span><span class="delimiter">&quot;</span></span>
version = <span class="string"><span class="delimiter">&quot;</span><span class="content">1.0.0</span><span class="delimiter">&quot;</span></span>
}
repositories {
...
}
}
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>With the default values specified, the command to create an application using that profile becomes:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-app myapp --profile=myprofile</code></pre>
</div>
</div>
</div>
<h2 id="creatingProfiles">6.1 Creating Profiles</h2>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles/creatingProfiles.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="paragraph">
<p>The idea behind creating a new profile is that you can setup a default set of commands and plugins that are tailored to a particular technology or organisation.</p>
</div>
<div class="paragraph">
<p>To create a new profile you can use the <a href="../ref/Command%20Line/create-profile.html">create-profile</a> command which will create a new empty profile that extends the base profile:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-profile mycompany</code></pre>
</div>
</div>
<div class="paragraph">
<p>The above command will create a new profile in the "mycompany" directory where the command is executed. If you start interactive mode within the directory you will get a set of commands for creating profiles:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ cd mycompany
$ grails
| Enter a command name to run. Use TAB for completion:
grails&gt;
create-command create-creator-command create-feature create-generator-command create-gradle-command create-template</code></pre>
</div>
</div>
<div class="paragraph">
<p>The commands are as follows:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>create-command</code> - creates a new command that will be available from the Grails CLI when the profile is used</p>
</li>
<li>
<p><code>create-creator-command</code> - creates a command available to the CLI that renders a template (Example: create-controller)</p>
</li>
<li>
<p><code>create-generator-command</code> - creates a command available to the CLI that renders a template based on a domain class (Example: generate-controller)</p>
</li>
<li>
<p><code>create-feature</code> - creates a feature that can be used with this profile</p>
</li>
<li>
<p><code>create-gradle-command</code> - creates a CLI command that can invoke gradle</p>
</li>
<li>
<p><code>create-template</code> - creates a template that can be rendered by a command</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>To customize the dependencies for your profile you can specify additional dependencies in <code>profile.yml</code>.</p>
</div>
<div class="paragraph">
<p>Below is an example <code>profile.yml</code> file:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">features</span>:
<span class="key">defaults</span>:
- <span class="string"><span class="content">hibernate</span></span>
- <span class="string"><span class="content">asset-pipeline</span></span>
<span class="key">build</span>:
<span class="key">plugins</span>:
- <span class="string"><span class="content">org.grails.grails-web</span></span>
<span class="key">excludes</span>:
- <span class="string"><span class="content">org.grails.grails-core</span></span>
<span class="key">dependencies</span>:
<span class="key">compile</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">org.mycompany:myplugin:1.0.1</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>With the above configuration in place you can publish the profile to your local repository with <code>gradle install</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ gradle install</code></pre>
</div>
</div>
<div class="paragraph">
<p>Your profile is now usable with the <code>create-app</code> command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-app myapp --profile mycompany</code></pre>
</div>
</div>
<div class="paragraph">
<p>With the above command the application will be created with the "mycompany" profile which includes an additional dependency on the "myplugin" plugin and also includes the "hibernate" and "asset-pipeline" features (more on features later).</p>
</div>
<div class="paragraph">
<p>Note that if you customize the dependency coordinates of the profile (group, version etc.) then you may need to use the fully qualified coordinates to create an application:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-app myapp --profile com.mycompany:mycompany:1.0.1</code></pre>
</div>
</div>
<h2 id="profileInheritance">6.2 Profile Inheritance</h2>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles/profileInheritance.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="paragraph">
<p>One profile can extend one or many different parent profiles. To define profile inheritance you can modify the <code>build.gradle</code> of a profile and define the profile dependences. For example typically you want to extend the <code>base</code> profile:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">dependencies {
runtime project(<span class="string"><span class="delimiter">'</span><span class="content">:base</span><span class="delimiter">'</span></span>)
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>By inheriting from a parent profile you get the following benefits:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>When the <a href="../ref/Command%20Line/create-app.html">create-app</a> command is executed the parent profile&#8217;s skeleton is copied first</p>
</li>
<li>
<p>Dependencies and <code>build.gradle</code> is merged from the parent(s)</p>
</li>
<li>
<p>The <code>application.yml</code> file is merged from the parent(s)</p>
</li>
<li>
<p>CLI commands from the parent profile are inherited</p>
</li>
<li>
<p>Features from the parent profile are inherited</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>To define the order of inheritance ensure that your dependencies are declared in the correct order. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">dependencies {
runtime project(<span class="string"><span class="delimiter">'</span><span class="content">:plugin</span><span class="delimiter">'</span></span>)
runtime project(<span class="string"><span class="delimiter">'</span><span class="content">:web</span><span class="delimiter">'</span></span>)
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>In the above snippet the skeleton from the "plugin" profile is copied first, followed by the "web" profile. In addition, the "web" profile overrides commands from the "plugin" profile, whilst if the dependency order was reversed the "plugin" profile would override the "web" profile.</p>
</div>
<h2 id="publishingProfiles">6.3 Publishing Profiles</h2>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles/publishingProfiles.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="sect3">
<h4 id="_publishing_profiles_to_the_grails_central_repository">Publishing Profiles to the Grails Central Repository</h4>
<div class="paragraph">
<p>Any profile created with the <a href="../ref/Command%20Line/create-profile.html">create-profile</a> command already comes configured with a <code>grails-profile-publish</code> plugin defined in <code>build.gradle</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">apply <span class="key">plugin</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">org.grails.grails-profile-publish</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>To publish a profile using this plugin to the Grails central repository first upload the source to <a href="https://github.com">Github</a> (closed source profiles will not be accepted). Then register for an account on <a href="http://bintray.com">Bintray</a> and configure your keys as follows in the profile&#8217;s <code>build.gradle</code> file:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">grailsPublish {
user = <span class="string"><span class="delimiter">'</span><span class="content">YOUR USERNAME</span><span class="delimiter">'</span></span>
key = <span class="string"><span class="delimiter">'</span><span class="content">YOUR KEY</span><span class="delimiter">'</span></span>
githubSlug = <span class="string"><span class="delimiter">'</span><span class="content">your-repo/your-profile</span><span class="delimiter">'</span></span>
license = <span class="string"><span class="delimiter">'</span><span class="content">Apache-2.0</span><span class="delimiter">'</span></span>
}</code></pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The <code>githubSlug</code> argument should point to the path to your Github repository. For example if your repository is located at <a href="https://github.com/foo/bar" class="bare">https://github.com/foo/bar</a> then your <code>githubSlug</code> is <code>foo/bar</code>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>With this in place you can run <code>gradle publishProfile</code> to publish your profile:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ gradle publishProfile</code></pre>
</div>
</div>
<div class="paragraph">
<p>The profile will be uploaded to Bintray. You can then go the <a href="https://github.com/grails-profiles">Grails profiles repository</a> and request to have your profile included by clicking "Include My Package" button on Bintray&#8217;s interface (you must be logged in to see this).</p>
</div>
</div>
<div class="sect3">
<h4 id="_publishing_profiles_to_an_internal_repository">Publishing Profiles to an Internal Repository</h4>
<div class="paragraph">
<p>The aforementioned <code>grails-profile-publish</code> plugin configures <a href="https://docs.gradle.org/current/userguide/publishing_maven.html">Gradle&#8217;s Maven Publish plugin</a>. In order to publish to an internal repository all you need to do is define the repository in <code>build.gradle</code>. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">publishing {
repositories {
maven {
credentials {
username <span class="string"><span class="delimiter">&quot;</span><span class="content">foo</span><span class="delimiter">&quot;</span></span>
password <span class="string"><span class="delimiter">&quot;</span><span class="content">bar</span><span class="delimiter">&quot;</span></span>
}
url <span class="string"><span class="delimiter">&quot;</span><span class="content">http://foo.com/repo</span><span class="delimiter">&quot;</span></span>
}
}
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Once configured you can publish your plugin with <code>gradle publish</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ gradle publish</code></pre>
</div>
</div>
</div>
<h2 id="profileStructure">6.4 Understanding Profiles</h2>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles/profileStructure.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="paragraph">
<p>A profile is a simple directory that contains a <code>profile.yml</code> file and directories containing the "commands", "skeleton" and "templates" defined by the profile. Example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code>/web
commands/
create-controller.yml
run-app.groovy
...
features/
asset-pipeline/
skeleton
feature.yml
skeleton/
grails-app/
controllers/
...
build.gradle
templates/
artifacts/
Controller.groovy
profile.yml</code></pre>
</div>
</div>
<div class="paragraph">
<p>The above example is a snippet of structure of the 'web' profile. The <code>profile.yml</code> file is used to describe the profile and control how the build is configured.</p>
</div>
<div class="sect3">
<h4 id="_understanding_the_profile_yml_descriptor">Understanding the profile.yml descriptor</h4>
<div class="paragraph">
<p>The <code>profile.yml</code> can contain the following child elements.</p>
</div>
</div>
<div class="sect3">
<h4 id="_1_repositories">1) repositories</h4>
<div class="paragraph">
<p>A list of Maven repositories to include in the generated build. Example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">repositories</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">https://repo.grails.org/grails/core</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_2_build_repositories">2) build.repositories</h4>
<div class="paragraph">
<p>A list of Maven repositories to include in the buildscript section of the generated build. Example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">build</span>:
<span class="key">repositories</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">https://repo.grails.org/grails/core</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_3_build_plugins">3) build.plugins</h4>
<div class="paragraph">
<p>A list of Gradle plugins to configure in the generated build. Example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">build</span>:
<span class="key">plugins</span>:
- <span class="string"><span class="content">eclipse</span></span>
- <span class="string"><span class="content">idea</span></span>
- <span class="string"><span class="content">org.grails.grails-core</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_4_build_excludes">4) build.excludes</h4>
<div class="paragraph">
<p>A list of Gradle plugins to exclude from being inherited from the parent profile:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">build</span>:
<span class="key">excludes</span>:
- <span class="string"><span class="content">org.grails.grails-core</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_5_dependencies">5) dependencies</h4>
<div class="paragraph">
<p>A map of scopes and dependencies to configure. The <code>excludes</code> scope can be used to exclude from the parent profile. Example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">dependencies</span>:
<span class="key">excludes</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">org.grails:hibernate</span><span class="delimiter">&quot;</span></span>
<span class="key">build</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">org.grails:grails-gradle-plugin:$grailsVersion</span><span class="delimiter">&quot;</span></span>
<span class="key">compile</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">org.springframework.boot:spring-boot-starter-logging</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="delimiter">&quot;</span><span class="content">org.springframework.boot:spring-boot-autoconfigure</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_6_features_defaults">6) features.defaults</h4>
<div class="paragraph">
<p>A default list of features to use if no explicit features are specified.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">features</span>:
<span class="key">defaults</span>:
- <span class="string"><span class="content">hibernate</span></span>
- <span class="string"><span class="content">asset-pipeline</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_7_skeleton_excludes">7) skeleton.excludes</h4>
<div class="paragraph">
<p>A list of files to exclude from parent profile&#8217;s skeletons (supports wildcards).</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="key">skeleton</span>:
<span class="key">excludes</span>:
- gradlew
- gradlew.bat
- gradle/</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_8_skeleton_parent_target">8) skeleton.parent.target</h4>
<div class="paragraph">
<p>The target folder that parent profile&#8217;s skeleton should be copied into. This can be used to create multi-project builds.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="key">skeleton</span>:
<span class="key">parent</span>:
<span class="key">target</span>: app</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_9_skeleton_binaryextensions">9) skeleton.binaryExtensions</h4>
<div class="paragraph">
<p>Which file extensions should be copied from the profile as binary. Inherited and combined from parent profiles.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="key">skeleton</span>:
<span class="key">binaryExtensions</span>: [exe, zip]</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_10_skeleton_executable">10) skeleton.executable</h4>
<div class="paragraph">
<p>File patterns that should be marked as executable in the resulting application. Inherited and combined from parent profiles. The patterns are parsed with <a href="https://ant.apache.org/manual/dirtasks.html#patterns">Ant</a>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="key">skeleton</span>:
<span class="key">executable</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">**/gradlew*</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="delimiter">&quot;</span><span class="content">**/grailsw*</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_11_instructions">11) instructions</h4>
<div class="paragraph">
<p>Text to be displayed to the user after the application is created</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="key">instructions</span>: Here are some instructions</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_what_happens_when_a_profile_is_used">What happens when a profile is used?</h4>
<div class="paragraph">
<p>When the <code>create-app</code> command runs it takes the skeleton of the parent profiles and copies the skeletons into a new project structure.</p>
</div>
<div class="paragraph">
<p>The <code>build.gradle</code> file is generated is result of obtaining all of the dependency information defined in the <code>profile.yml</code> files and produces the required dependencies.</p>
</div>
<div class="paragraph">
<p>The command will also merge any <code>build.gradle</code> files defined within a profile and its parent profiles.</p>
</div>
<div class="paragraph">
<p>The <code>grails-app/conf/application.yml</code> file is also merged into a single YAML file taking into account the profile and all of the parent profiles.</p>
</div>
</div>
<h2 id="profileCommands">6.5 Creating Profile Commands</h2>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles/profileCommands.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="paragraph">
<p>A profile can define new commands that apply only to that profile using YAML or Groovy scripts. Below is an example of the <a href="../ref/Command%20Line/create-controller.html">create-controller</a> command defined in YAML:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">description</span>:
- <span class="string"><span class="content">Creates a controller</span></span>
- <span class="string"><span class="content">usage: 'create-controller &lt;&lt;controller name&gt;&gt;'</span></span>
- <span class="string"><span class="content">completer: org.grails.cli.interactive.completers.DomainClassCompleter</span></span>
- <span class="string"><span class="content">argument: &quot;Controller Name&quot;</span></span>
<span class="key">description</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">The name of the controller</span><span class="delimiter">&quot;</span></span>
<span class="key">steps</span>:
- <span class="string"><span class="content">command: render</span></span>
<span class="key">template</span>: <span class="string"><span class="content">templates/artifacts/Controller.groovy</span></span>
<span class="key">destination</span>: <span class="string"><span class="content">grails-app/controllers/`artifact.package.path`/`artifact.name`Controller.groovy</span></span>
- <span class="string"><span class="content">command: render</span></span>
<span class="key">template</span>: <span class="string"><span class="content">templates/testing/Controller.groovy</span></span>
<span class="key">destination</span>: <span class="string"><span class="content">src/test/groovy/`artifact.package.path`/`artifact.name`ControllerSpec.groovy</span></span>
- <span class="string"><span class="content">command: mkdir</span></span>
<span class="key">location</span>: <span class="string"><span class="content">grails-app/views/`artifact.propertyName`</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Commands defined in YAML must define one or many steps. Each step is a command in itself. The available step types are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>render</code> - To render a template to a given destination (as seen in the previous example)</p>
</li>
<li>
<p><code>mkdir</code> - To make a directory specified by the <code>location</code> parameter</p>
</li>
<li>
<p><code>execute</code> - To execute a command specified by the <code>class</code> parameter. Must be a class that implements the <a href="https://grails.apache.org/docs/3.3.0.RC1/api/org/grails/cli/profile/Command.html">Command</a> interface.</p>
</li>
<li>
<p><code>gradle</code> - To execute one or many Gradle tasks specified by the <code>tasks</code> parameter.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>For example to invoke a Gradle task, you can define the following YAML:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">description</span>: <span class="string"><span class="content">Creates a WAR file for deployment to a container (like Tomcat)</span></span>
<span class="key">minArguments</span>: <span class="string"><span class="content">0</span></span>
<span class="key">usage</span>: <span class="string"><span class="delimiter">|</span><span class="content">
war</span></span>
<span class="key">steps</span>:
- <span class="string"><span class="content">command: gradle</span></span>
<span class="key">tasks</span>:
- <span class="string"><span class="content">war</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>If you need more flexiblity than what the declarative YAML approach provides you can create Groovy script commands. Each Command script is extends from the <a href="https://grails.apache.org/docs/3.3.0.RC1/api/org/grails/cli/profile/commands/script/GroovyScriptCommand.html">GroovyScriptCommmand</a> class and hence has all of the methods of that class available to it.</p>
</div>
<div class="paragraph">
<p>The following is an example of the <a href="../ref/Command%20Line/create-script.html">create-script</a> command written in Groovy:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">description( <span class="string"><span class="delimiter">&quot;</span><span class="content">Creates a Grails script</span><span class="delimiter">&quot;</span></span> ) {
usage <span class="string"><span class="delimiter">&quot;</span><span class="content">grails create-script &lt;&lt;SCRIPT NAME&gt;&gt;</span><span class="delimiter">&quot;</span></span>
argument <span class="key">name</span>:<span class="string"><span class="delimiter">'</span><span class="content">Script Name</span><span class="delimiter">'</span></span>, <span class="key">description</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">The name of the script to create</span><span class="delimiter">&quot;</span></span>
flag <span class="key">name</span>:<span class="string"><span class="delimiter">'</span><span class="content">force</span><span class="delimiter">'</span></span>, <span class="key">description</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">Whether to overwrite existing files</span><span class="delimiter">&quot;</span></span>
}
<span class="keyword">def</span> scriptName = args[<span class="integer">0</span>]
<span class="keyword">def</span> model = model(scriptName)
<span class="keyword">def</span> overwrite = flag(<span class="string"><span class="delimiter">'</span><span class="content">force</span><span class="delimiter">'</span></span>) ? <span class="predefined-constant">true</span> : <span class="predefined-constant">false</span>
render <span class="key">template</span>: template(<span class="string"><span class="delimiter">'</span><span class="content">artifacts/Script.groovy</span><span class="delimiter">'</span></span>),
<span class="key">destination</span>: file(<span class="string"><span class="delimiter">&quot;</span><span class="content">src/main/scripts/</span><span class="inline"><span class="inline-delimiter">${</span>model.lowerCaseName<span class="inline-delimiter">}</span></span><span class="content">.groovy</span><span class="delimiter">&quot;</span></span>),
<span class="key">model</span>: model,
<span class="key">overwrite</span>: overwrite</code></pre>
</div>
</div>
<div class="paragraph">
<p>For more information on creating CLI commands see the section on <a href="commandLine.html#creatingCustomScripts">creating custom scripts</a> in the Command Line section of the user guide.</p>
</div>
<h2 id="profileFeatures">6.6 Creating Profile Features</h2>
<div class='contribute-btn'>
<button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/profiles/profileFeatures.adoc"'>
<i class='fa fa-pencil-square-o'></i> Improve this doc
</button>
</div>
<div class="paragraph">
<p>A Profile feature is a shareable set of templates and dependencies that may span multiple profiles. Typically you create a base profile that has multiple features and child profiles that inherit from the parent and hence can use the features available from the parent.</p>
</div>
<div class="paragraph">
<p>To create a feature use the <code>create-feature</code> command from the root directory of your profile:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-feature myfeature</code></pre>
</div>
</div>
<div class="paragraph">
<p>This will create a <code>myfeature/feature.yml</code> file that looks like the following:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">description</span>: <span class="string"><span class="content">Description of the feature</span></span>
<span class="comment"># customize versions here</span>
<span class="comment"># dependencies:</span>
<span class="comment"># compile:</span>
<span class="comment"># - &quot;org.grails.plugins:myplugin2:1.0&quot;</span>
<span class="comment">#</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>As a more concrete example. The following is the <code>feature.yml</code> file from the "asset-pipeline" feature:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">description</span>: <span class="string"><span class="content">Adds Asset Pipeline to a Grails project</span></span>
<span class="key">build</span>:
<span class="key">plugins</span>:
- <span class="string"><span class="content">asset-pipeline</span></span>
<span class="key">dependencies</span>:
<span class="key">build</span>:
- <span class="string"><span class="content">'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0'</span></span>
<span class="key">runtime</span>:
- <span class="string"><span class="delimiter">&quot;</span><span class="content">org.grails.plugins:asset-pipeline</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The structure of a feature is as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code>FEATURE_DIR
feature.yml
skeleton/
grails-app/
conf/
application.yml
build.gradle</code></pre>
</div>
</div>
<div class="paragraph">
<p>The contents of the skeleton get copied into the application tree, whilst the <code>application.yml</code> and <code>build.gradle</code> get merged with their respective counterparts in the profile by used.</p>
</div>
<div class="paragraph">
<p>With the <code>feature.yml</code> you can define additional dependencies. This allows users to create applications with optional features. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="bash">$ grails create-app myapp --profile myprofile --features myfeature,hibernate</code></pre>
</div>
</div>
<div class="paragraph">
<p>The above example will create a new application using your new feature and the "hibernate" feature.</p>
</div>
<div style="clear:both;margin-top:15px;"></div>
<div class="toc-item prev-left"><a href="../guide/commandLine.html">&lt;&lt; <strong>5</strong><span>The Command Line</span></a></div>
<div class="toc-item next-right"><a href="../guide/GORM.html"><strong>7</strong><span>Object Relational Mapping (GORM)</span> >></a></div>
<div style="clear:both"></div>
</div>
</td>
<td id="col2">
<div class="local clearfix">
<div class="local-title">
<a href="../guide/index.html" target="mainFrame">Quick Reference</a>
<span class="toggle">(<a href="#" onclick="localToggle(); return false;">hide</a>)</span>
</div>
<div class="menu">
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Command Line</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Command%20Line/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Command%20Line/bug-report.html">bug-report</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/clean.html">clean</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/compile.html">compile</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/console.html">console</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-app.html">create-app</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-command.html">create-command</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-controller.html">create-controller</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-domain-class.html">create-domain-class</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-functional-test.html">create-functional-test</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-hibernate-cfg-xml.html">create-hibernate-cfg-xml</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-integration-test.html">create-integration-test</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-interceptor.html">create-interceptor</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-plugin.html">create-plugin</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-profile.html">create-profile</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-script.html">create-script</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-service.html">create-service</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-taglib.html">create-taglib</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/create-unit-test.html">create-unit-test</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/dependency-report.html">dependency-report</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/docs.html">docs</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/generate-all.html">generate-all</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/generate-controller.html">generate-controller</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/generate-views.html">generate-views</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/help.html">help</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/install-templates.html">install-templates</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/list-plugins.html">list-plugins</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/list-profiles.html">list-profiles</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/package-plugin.html">package-plugin</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/package.html">package</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/plugin-info.html">plugin-info</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/profile-info.html">profile-info</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/run-app.html">run-app</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/run-command.html">run-command</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/run-script.html">run-script</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/schema-export.html">schema-export</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/shell.html">shell</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/stats.html">stats</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/stop-app.html">stop-app</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/test-app.html">test-app</a>
</div>
<div class="menu-item"><a href="../ref/Command%20Line/war.html">war</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Constraints</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Constraints/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Constraints/attributes.html">attributes</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/bindable.html">bindable</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/blank.html">blank</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/creditCard.html">creditCard</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/email.html">email</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/inList.html">inList</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/matches.html">matches</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/max.html">max</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/maxSize.html">maxSize</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/min.html">min</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/minSize.html">minSize</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/notEqual.html">notEqual</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/nullable.html">nullable</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/range.html">range</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/scale.html">scale</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/size.html">size</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/unique.html">unique</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/url.html">url</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/validator.html">validator</a>
</div>
<div class="menu-item"><a href="../ref/Constraints/widget.html">widget</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Controllers</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Controllers/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Controllers/actionName.html">actionName</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/allowedMethods.html">allowedMethods</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/bindData.html">bindData</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/chain.html">chain</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/controllerName.html">controllerName</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/defaultAction.html">defaultAction</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/errors.html">errors</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/flash.html">flash</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/forward.html">forward</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/grailsApplication.html">grailsApplication</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/hasErrors.html">hasErrors</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/namespace.html">namespace</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/params.html">params</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/redirect.html">redirect</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/render.html">render</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/request.html">request</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/respond.html">respond</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/response.html">response</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/responseFormats.html">responseFormats</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/scope.html">scope</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/servletContext.html">servletContext</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/session.html">session</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/withForm.html">withForm</a>
</div>
<div class="menu-item"><a href="../ref/Controllers/withFormat.html">withFormat</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Database Mapping</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Database%20Mapping/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Database%20Mapping/autoImport.html">autoImport</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/autoTimestamp.html">autoTimestamp</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/batchSize.html">batchSize</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/cache.html">cache</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/cascade.html">cascade</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/column.html">column</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/comment.html">comment</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/discriminator.html">discriminator</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/dynamicInsert.html">dynamicInsert</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/dynamicUpdate.html">dynamicUpdate</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/fetch.html">fetch</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/id.html">id</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/ignoreNotFound.html">ignoreNotFound</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/indexColumn.html">indexColumn</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/insertable.html">insertable</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/joinTable.html">joinTable</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/lazy.html">lazy</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/order.html">order</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/sort.html">sort</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/table.html">table</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/type.html">type</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/updateable.html">updateable</a>
</div>
<div class="menu-item"><a href="../ref/Database%20Mapping/version.html">version</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Domain Classes</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Domain%20Classes/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Domain%20Classes/addTo.html">addTo</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/attach.html">attach</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/belongsTo.html">belongsTo</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/clearErrors.html">clearErrors</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/constraints.html">constraints</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/count.html">count</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/countBy.html">countBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/createCriteria.html">createCriteria</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/delete.html">delete</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/discard.html">discard</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/embedded.html">embedded</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/errors.html">errors</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/executeQuery.html">executeQuery</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/executeUpdate.html">executeUpdate</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/exists.html">exists</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/fetchMode.html">fetchMode</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/find.html">find</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findAll.html">findAll</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findAllBy.html">findAllBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findAllWhere.html">findAllWhere</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findBy.html">findBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findOrCreateBy.html">findOrCreateBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findOrCreateWhere.html">findOrCreateWhere</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findOrSaveBy.html">findOrSaveBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findOrSaveWhere.html">findOrSaveWhere</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/findWhere.html">findWhere</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/first.html">first</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/get.html">get</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/getAll.html">getAll</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/getDirtyPropertyNames.html">getDirtyPropertyNames</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/getPersistentValue.html">getPersistentValue</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/hasErrors.html">hasErrors</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/hasMany.html">hasMany</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/hasOne.html">hasOne</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/ident.html">ident</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/instanceOf.html">instanceOf</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/isAttached.html">isAttached</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/isDirty.html">isDirty</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/last.html">last</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/list.html">list</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/listOrderBy.html">listOrderBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/load.html">load</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/lock.html">lock</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/mapWith.html">mapWith</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/mappedBy.html">mappedBy</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/mapping.html">mapping</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/merge.html">merge</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/namedQueries.html">namedQueries</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/properties.html">properties</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/read.html">read</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/refresh.html">refresh</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/removeFrom.html">removeFrom</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/save.html">save</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/transients.html">transients</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/validate.html">validate</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/where.html">where</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/whereAny.html">whereAny</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/withCriteria.html">withCriteria</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/withNewSession.html">withNewSession</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/withSession.html">withSession</a>
</div>
<div class="menu-item"><a href="../ref/Domain%20Classes/withTransaction.html">withTransaction</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Plug-ins</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Plug-ins/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Plug-ins/URL%20mappings.html">URL mappings</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/codecs.html">codecs</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/controllers.html">controllers</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/core.html">core</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/dataSource.html">dataSource</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/domainClasses.html">domainClasses</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/hibernate.html">hibernate</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/i18n.html">i18n</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/logging.html">logging</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/scaffolding.html">scaffolding</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/services.html">services</a>
</div>
<div class="menu-item"><a href="../ref/Plug-ins/servlets.html">servlets</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Services</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Services/Usage.html">Usage</a></div>
<div class="menu-item"><a href="../ref/Services/scope.html">scope</a>
</div>
<div class="menu-item"><a href="../ref/Services/transactional.html">transactional</a>
</div>
</div>
</div>
<div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Servlet API</h1><div class="menu-sub">
<div class="menu-item"><a href="../ref/Servlet%20API/request.html">request</a>
</div>
<div class="menu-item"><a href="../ref/Servlet%20API/response.html">response</a>
</div>
<div class="menu-item"><a href="../ref/Servlet%20API/servletContext.html">servletContext</a>
</div>
<div class="menu-item"><a href="../ref/Servlet%20API/session.html">session</a>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
<div id="footer">
Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
</div>
<script type="text/javascript" src="../js/docs.js"></script>
</body>
</html>