Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use enforcer plugin to guarantee core is free from dependencies #1655

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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