Skip to content

Commit

Permalink
OF-2720: Enforce ban of old javax.servlet api usage
Browse files Browse the repository at this point in the history
The configuration for the Enforcer plugin that's added in this commit is taken from https://github.com/jetty/jetty.project/blob/be2b431ba6ae815efcab92450755e4c8788039b7/pom.xml#L268-L280
  • Loading branch information
guusdk committed Nov 10, 2023
1 parent f475b01 commit 7475c22
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,33 @@
</rules>
</configuration>
</execution>
<execution>
<!-- OF-2720: When migrating to JakartaEE 9 or later, the javax.servlet namespace is replaced with jakarta.servlet Usage of the form will cause breakage.-->
<id>ban-javax-servlet-api</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>validate</phase>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>javax.servlet:*</exclude>
<exclude>servletapi</exclude>
<exclude>org.eclipse.jetty.orbit:javax.servlet</exclude>
<exclude>*:javax.servlet</exclude>
<exclude>org.mortbay.jetty:servlet-api</exclude>
<exclude>jetty:servlet-api</exclude>
<exclude>jetty-servlet-api</exclude>
<exclude>javax.websocket</exclude>
<exclude>javax.el:*</exclude>
<exclude>javax.annotation:javax.annotation-api</exclude>
</excludes>
<searchTransitive>true</searchTransitive>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
<configuration>
<rules>
Expand Down

0 comments on commit 7475c22

Please sign in to comment.