Trimm Groovy YAML configuration reference

Below is the reference for the TRIMM Groovy YAML configuration file.
A YAML that adheres to the specification below can be used directly with the TrimmGroovy Maven plugin.

Full YAML configuration file:

# Setup
xmiModelPath: model/MDD Example.xml
# EA, MagicDraw, FQCN, .groovy script
umlTool: EA
basePackageName: dk.tigerteam
modelPreprocessingScript: model/model-preprocessing.groovy
# does not work with Gorm listener use GroovyMixinEventListener instead
generateExtensionClasses: false
# addExtensionAndBaseClassAnnotations is only valid if generateExtensionClasses is set to true
addExtensionAndBaseClassAnnotations: false
rootSuperClass: dk.tigerteam.AbstractEntity
sourceCodeFormatting:
 # Formatting exclusions can be specified even though implementation hasn't been specified (and the default GroovyCodeWriter is used)
 excludeFormattingForPackages:
 - dk.tigerteam.mddexample.meta
 - dk.tigerteam.mddexample.test

# Paths
generateBaseClassesToPath: target/generated-sources/domainmodel
generateExtensionClassesToPath: target/generated-sources/domainmodel-extensions
generateInterfacesToPath: target/generated-sources/domainmodel
generateTestClassesToPath: target/generated-sources/generated-tests
generateResourcesToPath: target/generated-sources/generated-resources

# Gorm specific setup, mixinSuperClass is used with GroovyMixinEventListener if you want to mixin common Gorm field like uuid, dateCreated, lastUpdated
gormSetup:
 excludeGormMappedProperties: true
# mixinSuperClass: dk.tigerteam.groovy.AbstractMixinEntity

# Extensions (note these listeners can also be groovy scripts containing a single class implement the GeneratorEventListener interface (or
# which extend specializations thereof)
eventListeners:
 - listener: dk.tigerteam.trimm.mdsd.groovy.generator.gorm.GormGeneratorEventListener
 - listener: dk.tigerteam.trimm.mdsd.groovy.generator.extensions.GroovyMixinEventListener
# - listener: dk.tigerteam.trimm.mdsd.groovy.generator.gorm.EnversEventListener

Detailed explanation:

See Java reference for base parameters.

ParameterExample value(s)Explanation
excludeGormMappedPropertiestrue or false

In associations like hasMany or hasOne which would look like this as Gorm mapping:

static hasMany = [ opgave: Opgave]

will also get a property mapping like

Set<Opgave> opgave = HashSet<Opgave>()

if this is set to false.

mixinSuperClassdk.tigerteam.groovy.MixinAbstractEntityIf you want a common super class for your Mixin classes