-
Notifications
You must be signed in to change notification settings - Fork 16
configuration
Add a file called architecture.json
to the toplevel directory of your project and configure your components and their dependencies. You should commit this file to your version control system (e.g. git). The following example shows an architecture definition for the my-thai-star
sample application:
{
"architecture": {
"components": [
{"name":"bookingmanagement","dependencies":["ordermanagement","usermanagement","mailservice"]},
{"name":"dishmanagement","dependencies":["imagemanagement"]},
{"name":"imagemanagement","dependencies":[]},
{"name":"ordermanagement","dependencies":["dishmanagement"]},
{"name":"usermanagement","dependencies":[]},
{"name":"mailservice","dependencies":[]}
]
}
}
com.devonfw.sampleapp.samplecomponent
). As the technical architecture is standardized by a blueprint in devonfw, you do not need any further configuration and everything can already be validated out of the box.
If for some reason you can not or do not want to follow the devon4j
packaging conventions and architecture mapping but still map your architecture to the code and want to use this plugin, you can do so.
All you need to do is to configure a custom mapping by adding a packages
configuration to your architecture.json
:
{
"architecture": {
"components": [ ... ]
"packages": {
"pattern": "([a-zA-Z0-9_]+\.)+(persistence|core|service|gui)\.([a-zA-Z0-9_]+)\.(api|base|impl)(\.[a-zA-Z0-9_]+)*",
"groups": [ "root", "layer", "component", "scope", "detail" ],
"mappings": { "persistence": "dataaccess", "core": "logic", "gui": "client"}
}
}
The packages
object has the following properties:
-
The
pattern
property defines a regular expression your packages will match. -
The
groups
property maps the groups of the regular expression frompattern
in the order of occurence to the according architecture segments. In case your regular expression needs some extra bracket and therefore "artificial" groups, you can assignnone
to such groups. -
The
mappings
maps segments from your custom architecture definition to thedevon4j
architecture terms.
This documentation is licensed under the Creative Commons License (Attribution-NoDerivatives 4.0 International).