Merge branch '2.7.x'
Closes gh-31178
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.boot.build.classpath;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -52,7 +51,7 @@ public class CheckClasspathForProhibitedDependencies extends DefaultTask {
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
public void checkForProhibitedDependencies() throws IOException {
|
||||
public void checkForProhibitedDependencies() {
|
||||
TreeSet<String> prohibited = this.classpath.getResolvedConfiguration().getResolvedArtifacts().stream()
|
||||
.map((artifact) -> artifact.getModuleVersion().getId()).filter(this::prohibited)
|
||||
.map((id) -> id.getGroup() + ":" + id.getName()).collect(Collectors.toCollection(TreeSet::new));
|
||||
|
||||
@@ -43,7 +43,7 @@ public class MavenExec extends JavaExec {
|
||||
|
||||
private File projectDir;
|
||||
|
||||
public MavenExec() throws IOException {
|
||||
public MavenExec() {
|
||||
setClasspath(mavenConfiguration(getProject()));
|
||||
args("--batch-mode");
|
||||
getMainClass().set("org.apache.maven.cli.MavenCli");
|
||||
|
||||
@@ -45,7 +45,7 @@ class BomPluginIntegrationTests {
|
||||
private File buildFile;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir File projectDir) throws IOException {
|
||||
void setup(@TempDir File projectDir) {
|
||||
this.projectDir = projectDir;
|
||||
this.buildFile = new File(this.projectDir, "build.gradle");
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class OptionalDependenciesPluginIntegrationTests {
|
||||
private File buildFile;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir File projectDir) throws IOException {
|
||||
void setup(@TempDir File projectDir) {
|
||||
this.projectDir = projectDir;
|
||||
this.buildFile = new File(this.projectDir, "build.gradle");
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ class TestFailuresPluginIntegrationTests {
|
||||
private File projectDir;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir File projectDir) throws IOException {
|
||||
void setup(@TempDir File projectDir) {
|
||||
this.projectDir = projectDir;
|
||||
}
|
||||
|
||||
@Test
|
||||
void singleProject() throws IOException {
|
||||
void singleProject() {
|
||||
createProject(this.projectDir);
|
||||
BuildResult result = GradleRunner.create().withDebug(true).withProjectDir(this.projectDir)
|
||||
.withArguments("build").withPluginClasspath().buildAndFail();
|
||||
@@ -59,7 +59,7 @@ class TestFailuresPluginIntegrationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void multiProject() throws IOException {
|
||||
void multiProject() {
|
||||
createMultiProjectBuild();
|
||||
BuildResult result = GradleRunner.create().withDebug(true).withProjectDir(this.projectDir)
|
||||
.withArguments("build").withPluginClasspath().buildAndFail();
|
||||
@@ -69,7 +69,7 @@ class TestFailuresPluginIntegrationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void multiProjectContinue() throws IOException {
|
||||
void multiProjectContinue() {
|
||||
createMultiProjectBuild();
|
||||
BuildResult result = GradleRunner.create().withDebug(true).withProjectDir(this.projectDir)
|
||||
.withArguments("build", "--continue").withPluginClasspath().buildAndFail();
|
||||
@@ -81,7 +81,7 @@ class TestFailuresPluginIntegrationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void multiProjectParallel() throws IOException {
|
||||
void multiProjectParallel() {
|
||||
createMultiProjectBuild();
|
||||
BuildResult result = GradleRunner.create().withDebug(true).withProjectDir(this.projectDir)
|
||||
.withArguments("build", "--parallel", "--stacktrace").withPluginClasspath().buildAndFail();
|
||||
|
||||
Reference in New Issue
Block a user