|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2012-2024 the original author or authors. |
|
|
|
* Copyright 2012-2025 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -31,7 +31,6 @@ import java.util.Map; |
|
|
|
import com.fasterxml.jackson.core.JsonParseException; |
|
|
|
import com.fasterxml.jackson.core.JsonParseException; |
|
|
|
import com.fasterxml.jackson.databind.JsonMappingException; |
|
|
|
import com.fasterxml.jackson.databind.JsonMappingException; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import org.gradle.api.GradleException; |
|
|
|
|
|
|
|
import org.gradle.api.file.FileTree; |
|
|
|
import org.gradle.api.file.FileTree; |
|
|
|
import org.gradle.api.file.RegularFileProperty; |
|
|
|
import org.gradle.api.file.RegularFileProperty; |
|
|
|
import org.gradle.api.tasks.InputFiles; |
|
|
|
import org.gradle.api.tasks.InputFiles; |
|
|
|
@ -40,6 +39,7 @@ import org.gradle.api.tasks.PathSensitive; |
|
|
|
import org.gradle.api.tasks.PathSensitivity; |
|
|
|
import org.gradle.api.tasks.PathSensitivity; |
|
|
|
import org.gradle.api.tasks.SourceTask; |
|
|
|
import org.gradle.api.tasks.SourceTask; |
|
|
|
import org.gradle.api.tasks.TaskAction; |
|
|
|
import org.gradle.api.tasks.TaskAction; |
|
|
|
|
|
|
|
import org.gradle.api.tasks.VerificationException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* {@link SourceTask} that checks additional Spring configuration metadata files. |
|
|
|
* {@link SourceTask} that checks additional Spring configuration metadata files. |
|
|
|
@ -70,7 +70,7 @@ public abstract class CheckAdditionalSpringConfigurationMetadata extends SourceT |
|
|
|
File reportFile = getReportLocation().get().getAsFile(); |
|
|
|
File reportFile = getReportLocation().get().getAsFile(); |
|
|
|
Files.write(reportFile.toPath(), report, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); |
|
|
|
Files.write(reportFile.toPath(), report, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); |
|
|
|
if (report.hasProblems()) { |
|
|
|
if (report.hasProblems()) { |
|
|
|
throw new GradleException( |
|
|
|
throw new VerificationException( |
|
|
|
"Problems found in additional Spring configuration metadata. See " + reportFile + " for details."); |
|
|
|
"Problems found in additional Spring configuration metadata. See " + reportFile + " for details."); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|