mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Merge branch '3.5.x'
Closes gh-47738 Closes gh-47739
This commit is contained in:
+4
-1
@@ -21,6 +21,7 @@ import java.io.IOException;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.BuildTask;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.TestTemplate;
|
||||
|
||||
@@ -37,6 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@GradleCompatibility
|
||||
class CycloneDxPluginActionIntegrationTests {
|
||||
|
||||
@SuppressWarnings("NullAway.Init")
|
||||
GradleBuild gradleBuild;
|
||||
|
||||
@TestTemplate
|
||||
@@ -51,7 +53,8 @@ class CycloneDxPluginActionIntegrationTests {
|
||||
|
||||
private void sbomIsIncludedInUberArchive(String taskName, String sbomLocationPrefix) throws IOException {
|
||||
BuildResult result = this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("7.6.6").build(taskName);
|
||||
assertThat(result.task(":cyclonedxBom").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
BuildTask task = result.task(":cyclonedxBom");
|
||||
assertThat(task).isNotNull().extracting(BuildTask::getOutcome).isEqualTo(TaskOutcome.SUCCESS);
|
||||
File[] libs = new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles();
|
||||
assertThat(libs).hasSize(1);
|
||||
try (JarFile jar = new JarFile(libs[0])) {
|
||||
|
||||
+15
@@ -29,6 +29,7 @@ import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
|
||||
import org.apache.hc.core5.http.HttpRequest;
|
||||
import org.apache.hc.core5.http2.HttpVersionPolicy;
|
||||
import org.cyclonedx.gradle.CycloneDxPlugin;
|
||||
import org.gradle.testkit.runner.GradleRunner;
|
||||
import org.jetbrains.kotlin.gradle.fus.BuildUidService;
|
||||
import org.jetbrains.kotlin.gradle.model.KotlinProject;
|
||||
@@ -112,6 +113,20 @@ public class PluginClasspathGradleBuild extends GradleBuild {
|
||||
classpath.add(new File(pathOfJarContaining("org.graalvm.buildtools.gradle.NativeImagePlugin")));
|
||||
classpath.add(new File(pathOfJarContaining("org.graalvm.reachability.GraalVMReachabilityMetadataRepository")));
|
||||
classpath.add(new File(pathOfJarContaining("org.graalvm.buildtools.utils.SharedConstants")));
|
||||
// CycloneDx dependencies
|
||||
classpath.add(new File(pathOfJarContaining(CycloneDxPlugin.class)));
|
||||
classpath.add(new File(pathOfJarContaining("com.github.packageurl.MalformedPackageURLException")));
|
||||
classpath.add(new File(pathOfJarContaining("org.cyclonedx.parsers.Parser")));
|
||||
classpath.add(new File(pathOfJarContaining("org.apache.maven.project.MavenProject")));
|
||||
classpath.add(new File(pathOfJarContaining("org.apache.maven.model.building.ModelBuildingException")));
|
||||
classpath.add(new File(pathOfJarContaining("org.codehaus.plexus.util.xml.pull.XmlPullParserException")));
|
||||
classpath.add(new File(pathOfJarContaining("org.apache.commons.lang3.StringUtils")));
|
||||
classpath.add(new File(pathOfJarContaining("com.networknt.schema.resource.SchemaMapper")));
|
||||
classpath.add(new File(pathOfJarContaining("com.fasterxml.jackson.core.Versioned")));
|
||||
classpath.add(new File(pathOfJarContaining("com.fasterxml.jackson.databind.JsonSerializer")));
|
||||
classpath.add(new File(pathOfJarContaining("com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator")));
|
||||
classpath.add(new File(pathOfJarContaining("org.apache.commons.collections4.CollectionUtils")));
|
||||
classpath.add(new File(pathOfJarContaining("org.apache.commons.io.FileUtils")));
|
||||
return classpath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user