1. Introduction
Provides additional configuration formats such as YAML and JSON. With this plugin installed you’ll be able to write
any configuration file using YAML or JSON formats. For example, a typical Config.groovy
file can be rewritten with
JSON as
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"application": {
"title" : "Sample",
"startupGroups": ["sample"],
"autoShutdown" : "true"
},
"mvcGroups": {
"sample": {
"model" : "com.acme.SampleModel",
"view" : "com.acme.SampleView",
"controller": "com.acme.SampleController"
}
}
}
or with YAML
1
2
3
4
5
6
7
8
9
application:
title: Sample
startupGroups: sample
autoShutdown: true
mvcGroups:
sample:
model: com.acme.SampleModel
view: com.acme.SampleView
controller: com.acme.SampleController
Griffon version: 2.12.0
2. Build Configuration
2.1. Gradle
You have two options for configuring this plugin: automatic and manual.
2.1.1. Automatic
As long as the project has the org.codehaus.griffon.griffon
plugin applied to it you
may include the following snippet in build.gradle
dependencies {
griffon 'org.codehaus.griffon.plugins:griffon-configuration-plugin:1.1.0'
}
The griffon
plugin will take care of the rest given its configuration.
2.2. Maven
First configure the griffon-configuration-plugin
BOM in your POM file, by placing the following
snippet before the <build>
element
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-configuration-plugin</artifactId>
<version>1.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Next configure dependencies as required by your particular setup
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-configuration-json</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-configuration-yaml</artifactId>
</dependency>
3. Modules
The following sections display all bindings per module. Use this information to successfully override a binding on your own modules or to troubleshoot a module binding if the wrong type has been applied by the Griffon runtime.