Skip to content

Commit

Permalink
Update SpringBootThinUtil for Spring Boot 3.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblye committed Jan 4, 2024
1 parent 4c5ff74 commit e1cead0
Showing 1 changed file with 74 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected String hash(JarFile jf, ZipEntry entry) throws IOException, NoSuchAlgo
byte[] digested = digest.digest();
return convertToHexString(digested);
}

@FFDCIgnore(NoSuchAlgorithmException.class)
private static MessageDigest getDigest(String... algorithms) throws NoSuchAlgorithmException {
NoSuchAlgorithmException error = null;
Expand Down Expand Up @@ -794,6 +794,14 @@ public static Set<String> getStarterArtifactIds(String starter) {
"jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile",
"org.springframework.boot:spring-boot-starter-tomcat:jar:3.0.0:compile");

private final static List<String> mvnSpringBoot32TomcatStarterDeps = Arrays.asList(
"org.apache.tomcat.embed:tomcat-embed-websocket:jar:10.1.17:compile",
"org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.17:compile",
"org.apache.tomcat.embed:tomcat-embed-core:jar:10.1.17:compile",
"jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile",
"org.springframework.boot:spring-boot-starter-tomcat:jar:3.2.1:compile");
// Jetty

private final static List<String> mvnSpringBoot15JettyStarterDeps = Arrays.asList(
"org.springframework.boot:spring-boot-starter-jetty:jar:1.5.10.RELEASE:compile",
"org.eclipse.jetty:jetty-xml:jar:9.4.8.v20171121:compile",
Expand Down Expand Up @@ -1136,6 +1144,47 @@ public static Set<String> getStarterArtifactIds(String starter) {
"org.eclipse.jetty.websocket:websocket-jetty-common:jar:11.0.15:compile",
"org.eclipse.jetty.websocket:websocket-core-common:jar:11.0.15:compile");

private final static List<String> mvnSpringBoot32JettyStarterDeps = Arrays.asList(
"jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile",
"jakarta.servlet:jakarta.servlet-api:jar:6.0.0:compile",
"jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile",
"jakarta.websocket:jakarta.websocket-api:jar:2.1.1:compile",
"jakarta.websocket:jakarta.websocket-client-api:jar:2.1.1:compile",
"org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.17:compile",
"org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-client:jar:12.0.5:compile",
"org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-common:jar:12.0.5:compile",
"org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-server:jar:12.0.5:compile",
"org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jetty-server:jar:12.0.5:compile",
"org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-servlet:jar:12.0.5:compile",
"org.eclipse.jetty.ee10:jetty-ee10-annotations:jar:12.0.5:compile",
"org.eclipse.jetty.ee10:jetty-ee10-plus:jar:12.0.5:compile",
"org.eclipse.jetty.ee10:jetty-ee10-servlet:jar:12.0.5:compile",
"org.eclipse.jetty.ee10:jetty-ee10-servlets:jar:12.0.5:compile",
"org.eclipse.jetty.ee10:jetty-ee10-webapp:jar:12.0.5:compile",
"org.eclipse.jetty.websocket:jetty-websocket-core-client:jar:12.0.5:compile",
"org.eclipse.jetty.websocket:jetty-websocket-core-common:jar:12.0.5:compile",
"org.eclipse.jetty.websocket:jetty-websocket-core-server:jar:12.0.5:compile",
"org.eclipse.jetty.websocket:jetty-websocket-jetty-api:jar:12.0.5:compile",
"org.eclipse.jetty.websocket:jetty-websocket-jetty-common:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-alpn-client:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-client:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-http:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-io:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-jndi:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-plus:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-security:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-server:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-session:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-util:jar:12.0.5:compile",
"org.eclipse.jetty:jetty-xml:jar:12.0.5:compile",
"org.ow2.asm:asm-commons:jar:9.6:compile",
"org.ow2.asm:asm-tree:jar:9.6:compile",
"org.ow2.asm:asm:jar:9.6:compile",
"org.slf4j:slf4j-api:jar:2.0.9:compile",
"org.springframework.boot:spring-boot-starter-jetty:jar:3.2.1:compile");

// undertow

private final static List<String> mvnSpringBoot15UndertowStarterDeps = Arrays.asList(
"org.jboss.xnio:xnio-api:jar:3.3.8.Final:compile",
"org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile",
Expand Down Expand Up @@ -1276,6 +1325,24 @@ public static Set<String> getStarterArtifactIds(String starter) {
"io.undertow:undertow-websockets-jsr:jar:2.3.0.Final:compile",
"jakarta.servlet:jakarta.servlet-api:jar:6.0.0:compile");

private final static List<String> mvnSpringBoot32UndertowStarterDeps = Arrays.asList(
"io.undertow:undertow-core:jar:2.3.10.Final:compile",
"io.undertow:undertow-servlet:jar:2.3.10.Final:compile",
"io.undertow:undertow-websockets-jsr:jar:2.3.10.Final:compile",
"jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile",
"jakarta.servlet:jakarta.servlet-api:jar:6.0.0:compile",
"jakarta.websocket:jakarta.websocket-api:jar:2.1.1:compile",
"jakarta.websocket:jakarta.websocket-client-api:jar:2.1.1:compile",
"org.jboss.logging:jboss-logging:jar:3.5.3.Final:compile",
"org.jboss.threads:jboss-threads:jar:3.5.0.Final:compile",
"org.jboss.xnio:xnio-api:jar:3.8.8.Final:compile",
"org.jboss.xnio:xnio-nio:jar:3.8.8.Final:runtime",
"org.springframework.boot:spring-boot-starter-undertow:jar:3.2.1:compile",
"org.wildfly.client:wildfly-client-config:jar:1.0.1.Final:compile",
"org.wildfly.common:wildfly-common:jar:1.5.4.Final:compile");

// Netty

// NOTE that we leave netty itself on the classpath in order to allow WebClient to still be used.
// We do not filter out reator-core or reactive-streams
private final static List<String> mvnSpringBoot20NettyStarterDeps = Arrays.asList(
Expand All @@ -1296,6 +1363,8 @@ public static Set<String> getStarterArtifactIds(String starter) {
"org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.7.1:compile");
private final static List<String> mvnSpringBoot30NettyStarterDeps = Arrays.asList(
"org.springframework.boot:spring-boot-starter-reactor-netty:jar:3.0.0:compile");
private final static List<String> mvnSpringBoot32NettyStarterDeps = Arrays.asList(
"org.springframework.boot:spring-boot-starter-reactor-netty:jar:3.2.1:compile");

public static final String TOMCAT = "tomcat";
public static final String JETTY = "jetty";
Expand Down Expand Up @@ -1324,6 +1393,7 @@ public static Map<String, Set<String>> getStartersToDependentArtifactIdsMap() {
theMap.put(starterJarNamePrefix(TOMCAT, "2.6"), loadStarterMvnDeps(mvnSpringBoot26TomcatStarterDeps));
theMap.put(starterJarNamePrefix(TOMCAT, "2.7"), loadStarterMvnDeps(mvnSpringBoot27TomcatStarterDeps));
theMap.put(starterJarNamePrefix(TOMCAT, "3.0"), loadStarterMvnDeps(mvnSpringBoot30TomcatStarterDeps));
theMap.put(starterJarNamePrefix(TOMCAT, "3.2"), loadStarterMvnDeps(mvnSpringBoot32TomcatStarterDeps));

theMap.put(starterJarNamePrefix(JETTY, "1.5"), loadStarterMvnDeps(mvnSpringBoot15JettyStarterDeps));
theMap.put(starterJarNamePrefix(JETTY, "2.0"), loadStarterMvnDeps(mvnSpringBoot20JettyStarterDeps));
Expand All @@ -1336,6 +1406,7 @@ public static Map<String, Set<String>> getStartersToDependentArtifactIdsMap() {
theMap.put(starterJarNamePrefix(JETTY, "2.7"), loadStarterMvnDeps(mvnSpringBoot27JettyStarterDeps));
theMap.put(starterJarNamePrefix(JETTY, "3.0"), loadStarterMvnDeps(mvnSpringBoot30JettyStarterDeps));
theMap.put(starterJarNamePrefix(JETTY, "3.1"), loadStarterMvnDeps(mvnSpringBoot31JettyStarterDeps));
theMap.put(starterJarNamePrefix(JETTY, "3.2"), loadStarterMvnDeps(mvnSpringBoot32JettyStarterDeps));

theMap.put(starterJarNamePrefix(UNDERTOW, "1.5"), loadStarterMvnDeps(mvnSpringBoot15UndertowStarterDeps));
theMap.put(starterJarNamePrefix(UNDERTOW, "2.0"), loadStarterMvnDeps(mvnSpringBoot20UndertowStarterDeps));
Expand All @@ -1347,6 +1418,7 @@ public static Map<String, Set<String>> getStartersToDependentArtifactIdsMap() {
theMap.put(starterJarNamePrefix(UNDERTOW, "2.6"), loadStarterMvnDeps(mvnSpringBoot26UndertowStarterDeps));
theMap.put(starterJarNamePrefix(UNDERTOW, "2.7"), loadStarterMvnDeps(mvnSpringBoot27UndertowStarterDeps));
theMap.put(starterJarNamePrefix(UNDERTOW, "3.0"), loadStarterMvnDeps(mvnSpringBoot30UndertowStarterDeps));
theMap.put(starterJarNamePrefix(UNDERTOW, "3.2"), loadStarterMvnDeps(mvnSpringBoot32UndertowStarterDeps));

theMap.put(starterJarNamePrefix(NETTY, "2.0"), loadStarterMvnDeps(mvnSpringBoot20NettyStarterDeps));
theMap.put(starterJarNamePrefix(NETTY, "2.1"), loadStarterMvnDeps(mvnSpringBoot21NettyStarterDeps));
Expand All @@ -1357,6 +1429,7 @@ public static Map<String, Set<String>> getStartersToDependentArtifactIdsMap() {
theMap.put(starterJarNamePrefix(NETTY, "2.6"), loadStarterMvnDeps(mvnSpringBoot26NettyStarterDeps));
theMap.put(starterJarNamePrefix(NETTY, "2.7"), loadStarterMvnDeps(mvnSpringBoot27NettyStarterDeps));
theMap.put(starterJarNamePrefix(NETTY, "3.0"), loadStarterMvnDeps(mvnSpringBoot30NettyStarterDeps));
theMap.put(starterJarNamePrefix(NETTY, "3.2"), loadStarterMvnDeps(mvnSpringBoot32NettyStarterDeps));

startersToDependentArtifactIdsMap = Collections.unmodifiableMap(theMap);
}
Expand Down

0 comments on commit e1cead0

Please sign in to comment.