- Grails Tutorial
- Grails - Home
- Grails - Overview
- Grails - MVC Architecture
- Grails - Creating an Application
- Grails - The Command Line
- Grails - Application Profiles
- Object Relational Mapping (GORM)
- Grails - The Web Layer
- Grails - Groovy Server Pages
- Grails - Web Services
- Grails - Validation
- Grails - Plugins
Grails - Understanding Profiles
Description
A profile is a set of directories which contains the "commands", "skeleton" and "templates" defined by the profile. It also contains a directory that contains a profile.yml file. The profile.yml file consists of elements that will describe the profile and control how the build is configured.
The following table shows the child elements ofprofile.yml file.
S.N. | Name & Description | Example |
---|---|---|
1 | repositories This represents list of Maven repositories to be included in generated build. |
repositories: - "https://repo.grails.org/grails/core" |
2 | build.repositories This represents list of Maven repositories to be included in the buildscript section of generated build. |
build: repositories: - "https://repo.grails.org/grails/core" |
3 | build.plugins It represents list of Gradle plugins to configure in the generated build. |
build: plugins: - eclipse - idea - org.grails.grails-core |
4 | build.excludes It represents list of Gradle plugins to be excluded from being inherited from the parent profile. |
build: excludes: - org.grails.grails-core |
5 | dependencies It represents scope and dependencies to be configured and to be exculded. |
dependencies: excludes: - "org.grails:hibernate" build: - "org.grails:grails-gradle-plugin:$grailsVersion" compile: - "org.springframework.boot:spring-boot-starter-logging" - "org.springframework.boot:spring-boot-autoconfigure" |
6 | features.defaults It is a list of features to be used by default, if no features are specified. |
features: defaults: - hibernate - asset-pipeline |
7 | skeleton.excludes It is a list of files which should not be included from parents profile. |
skeleton: excludes: - gradlew - gradlew.bat - gradle/ |
8 | skeleton.parent.target It represents the folder into which parent profile’s skeleton should be copied. |
skeleton: parent: target: app |
9 | skeleton.binaryExtensions It indiactes the file extensions should be copied from the profile as binary. |
skeleton: binaryExtensions: [exe, zip] |
10 | skeleton.executable This represents file pattern which are marked as executable in application. |
skeleton: executable: - "**/gradlew*" - "**/grailsw*" |
11 | instructions It is user manual instructions to user after creating application. |
instructions: Here are some instructions |
Advertisements
To Continue Learning Please Login
Login with Google