Skip to content

Commit 589a286

Browse files
committed
use shrinkwrap-resolver-impl-maven dependency
1 parent e2fc119 commit 589a286

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

classpath-replacer/build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
dependencies {
22
api(platform("org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-bom:${shrinkwrapResolversVersion}"))
33

4-
api("org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven-archive")
4+
api("org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven")
55

66
api("org.junit.jupiter:junit-jupiter")
77
api("org.junit.platform:junit-platform-launcher")
8-
9-
testImplementation("ch.qos.logback:logback-classic:${logbackVersion}") {
10-
exclude(group: "org.slf4j", module: "slf4j-api")
11-
}
12-
testImplementation("org.springframework.boot:spring-boot-starter-test:2.7.5")
138
}
149

1510
apply from: "${rootDir}/gradle/deploy.gradle"

classpath-replacer/src/test/java/cr/action/RecursiveExcludeTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void excludeSubDependencies_whenUsingMavenCoordinateWithoutVersion() {
3434
assertThrows(ClassNotFoundException.class, () -> {
3535
Class.forName("org.springframework.cloud.bootstrap.marker.Marker");
3636
});
37-
assertThrows(NoClassDefFoundError.class, () -> {
37+
assertThrows(ClassNotFoundException.class, () -> {
3838
Class.forName("org.springframework.boot.SpringApplication");
3939
});
4040
}
@@ -48,7 +48,7 @@ void excludeSubDependencies_whenUsingMavenCoordinate() {
4848
assertThrows(ClassNotFoundException.class, () -> {
4949
Class.forName("org.springframework.cloud.bootstrap.marker.Marker");
5050
});
51-
assertThrows(NoClassDefFoundError.class, () -> {
51+
assertThrows(ClassNotFoundException.class, () -> {
5252
Class.forName("org.springframework.boot.SpringApplication");
5353
});
5454
}
@@ -96,7 +96,7 @@ void excludeSubDependencies_whenRecursiveExcludeWithoutVersion() {
9696
assertThrows(ClassNotFoundException.class, () -> {
9797
Class.forName("org.springframework.cloud.bootstrap.marker.Marker");
9898
});
99-
assertThrows(NoClassDefFoundError.class, () -> {
99+
assertThrows(ClassNotFoundException.class, () -> {
100100
Class.forName("org.springframework.boot.SpringApplication");
101101
});
102102
// If dependencies with different versions have same version dependency, still works perfectly ^_*

gradle.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
group=io.github.danielliu1123
22
version=3.0.0-SNAPSHOT
33

4-
# core
5-
# version explanation: https://maven.apache.org/resolver/maven-3.8.x.html
6-
mavenVerson=3.8.7
7-
mavenResolverVersion=1.6.3
8-
9-
# https://github.com/junit-team/junit5
10-
junit5Version=5.10.0
114
# https://github.com/shrinkwrap/resolver
125
# junit version: https://github.com/shrinkwrap/resolver/blob/master/pom.xml#L59
136
shrinkwrapResolversVersion=3.3.3

0 commit comments

Comments
 (0)