Skip to content

Instantly share code, notes, and snippets.

@beyondxscratch

beyondxscratch/pom.xml

Last active Aug 9, 2020
Embed
What would you like to do?
Maven Enforcer Plugin to seal a domain in Hexagonal Architecture
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>*</exclude> <!-- forbids non domain dependencies -->
</excludes>
<includes>
<!-- but allow kotlin dependencies-->
<include>org.jetbrains.kotlin:*</include>
<include>org.jetbrains:annotations</include>
<!-- and test dependencies-->
<include>*:*:*:*:test</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.