Skip to content

Commit 9f13941

Browse files
committed
Prohibit org.jboss.spec.* dependencies
Closes gh-28329
1 parent 0561992 commit 9f13941

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,6 +79,9 @@ private boolean prohibited(ModuleVersionIdentifier id) {
7979
if (group.equals("org.slf4j") && id.getName().equals("jcl-over-slf4j")) {
8080
return true;
8181
}
82+
if (group.startsWith("org.jboss.spec")) {
83+
return true;
84+
}
8285
return false;
8386
}
8487

spring-boot-project/spring-boot-starters/spring-boot-starter-undertow/build.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ description = "Starter for using Undertow as the embedded servlet container. An
77
dependencies {
88
api("io.undertow:undertow-core")
99
api("io.undertow:undertow-servlet") {
10-
exclude group: "org.jboss.spec.javax.annotation", module: "jboss-annotations-api_1.2_spec"
10+
exclude group: "org.jboss.spec.javax.annotation", module: "jboss-annotations-api_1.3_spec"
1111
exclude group: "org.jboss.spec.javax.servlet", module: "jboss-servlet-api_4.0_spec"
1212
}
1313
api("io.undertow:undertow-websockets-jsr") {
14-
exclude group: "org.jboss.spec.javax.annotation", module: "jboss-annotations-api_1.2_spec"
14+
exclude group: "org.jboss.spec.javax.annotation", module: "jboss-annotations-api_1.3_spec"
1515
exclude group: "org.jboss.spec.javax.servlet", module: "jboss-servlet-api_4.0_spec"
16+
exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
1617
}
1718
api("jakarta.servlet:jakarta.servlet-api")
19+
api("jakarta.websocket:jakarta.websocket-api")
1820
api("org.glassfish:jakarta.el")
1921
}

0 commit comments

Comments
 (0)