diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/SchemaZipPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/SchemaZipPlugin.groovy index 72de4b3f73..caafb07ab7 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/SchemaZipPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/SchemaZipPlugin.groovy @@ -1,9 +1,9 @@ package io.spring.gradle.convention -import org.gradle.api.plugins.JavaPlugin -import org.gradle.api.tasks.bundling.Zip import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.plugins.JavaPlugin +import org.gradle.api.tasks.bundling.Zip public class SchemaZipPlugin implements Plugin { @@ -37,6 +37,15 @@ public class SchemaZipPlugin implements Plugin { from xsdFile.path } } + File symlink = module.sourceSets.main.resources.find { + it.path.endsWith('org/springframework/security/config/spring-security.xsd') + } + if (symlink != null) { + schemaZip.into('security') { + duplicatesStrategy 'exclude' + from symlink.path + } + } } } } diff --git a/config/src/main/resources/org/springframework/security/config/spring-security.xsd b/config/src/main/resources/org/springframework/security/config/spring-security.xsd new file mode 120000 index 0000000000..976a03ccd6 --- /dev/null +++ b/config/src/main/resources/org/springframework/security/config/spring-security.xsd @@ -0,0 +1 @@ +spring-security-5.7.xsd \ No newline at end of file