Skip to content

Commit

Permalink
Use enforcer plugin to garantee core is free from dependencies (#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
velo committed Jun 28, 2022
1 parent 1ac8768 commit 5c96c8f
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
</properties>

<dependencies>
<dependency>
<groupId>org.jvnet</groupId>
<artifactId>animal-sniffer-annotation</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
Expand Down Expand Up @@ -90,6 +84,33 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<message>feign-core should never include any dependencies, this is a design choice to keep core light and extend functionality using modules</message>
<excludes>
<exclude>*:*:*:*:*:*</exclude>
</excludes>
<includes>
<include>*:*:*:*:test:*</include>
</includes>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 5c96c8f

Please sign in to comment.