Skip to content

Commit

Permalink
Enforce org.jetbrains:annotations to be defined at runtime scope
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Dec 23, 2023
1 parent 8002d18 commit 07a7081
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-scope-of-annotation-deps</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<searchTransitive>false</searchTransitive>
<excludes>
<exclude>org.jetbrains:annotations:*:*:compile</exclude>
</excludes>
<message>The annotation dependencies should be used with scope provided to prevent transitive inheritance and to prevent runtime inclusion</message>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 07a7081

Please sign in to comment.