Fix broken build on Windows OS if the schema contains references to other schema files. (#21300)

This commit is contained in:
Andreas Kuhtz 2025-05-20 04:06:01 +02:00 committed by GitHub
parent 0aaeb45dbe
commit 78b54b9283
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -563,12 +563,18 @@ public class CodeGenMojo extends AbstractMojo {
} }
if (StringUtils.isNotBlank(inputSpecRootDirectory)) { if (StringUtils.isNotBlank(inputSpecRootDirectory)) {
// make sure the path can be processed correct under Windows OS
inputSpecRootDirectory = inputSpecRootDirectory.replaceAll("\\\\", "/");
inputSpec = new MergedSpecBuilder(inputSpecRootDirectory, mergedFileName, inputSpec = new MergedSpecBuilder(inputSpecRootDirectory, mergedFileName,
mergedFileInfoName, mergedFileInfoDescription, mergedFileInfoVersion) mergedFileInfoName, mergedFileInfoDescription, mergedFileInfoVersion)
.buildMergedSpec(); .buildMergedSpec();
LOGGER.info("Merge input spec would be used - {}", inputSpec); LOGGER.info("Merge input spec would be used - {}", inputSpec);
} }
// make sure the path can be processed correct under Windows OS
inputSpec = inputSpec.replaceAll("\\\\", "/");
File inputSpecFile = new File(inputSpec); File inputSpecFile = new File(inputSpec);
if (output == null) { if (output == null) {