Maven plugin
To apply polygonal-architecture plugin into your maven project:
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-mk-5-maven</id>
<name>bintray-plugins</name>
<url>https://dl.bintray.com/mk-5/maven</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>io.polygonal</groupId>
<artifactId>polygonal-architecture-maven-plugin</artifactId>
<version>latest</version>
<configuration>
<basePackage>pl.mk5.polygonal.mvne2e</basePackage>
</configuration>
</plugin>
</plugins>
</build>
The full list of allowed attributes:
Maven configuration | Description | Default |
---|---|---|
sourcesDir |
Relative path to the sources. Required | file('src/main/java') |
basePackage |
The level0 / package where polygons are stored. Your polygonal architecture starts here. Required | `` |
polygonTemplate |
Template file -> if you’d like to keep polygon definition in .yml file. Required if polygon dsl is not defined | null |
strictMode |
If true, only defined packages are allowed. | false |
Polygon definition
The only way to define your polygon is to use yml
file. By default plugin is looking for definition in path src/main/resources/polygon.yml
. More about YML definition can be find here: YML polygon definition.