Add spring-security.xsd symlink
Closes gh-13131
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
package io.spring.gradle.convention
|
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.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.api.plugins.JavaPlugin
|
||||||
|
import org.gradle.api.tasks.bundling.Zip
|
||||||
|
|
||||||
public class SchemaZipPlugin implements Plugin<Project> {
|
public class SchemaZipPlugin implements Plugin<Project> {
|
||||||
|
|
||||||
@@ -37,6 +37,15 @@ public class SchemaZipPlugin implements Plugin<Project> {
|
|||||||
from xsdFile.path
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
spring-security-5.7.xsd
|
||||||
@@ -150,8 +150,8 @@ public class XsdDocumentedTests {
|
|||||||
.getParentFile()
|
.getParentFile()
|
||||||
.list((dir, name) -> name.endsWith(".xsd"));
|
.list((dir, name) -> name.endsWith(".xsd"));
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
assertThat(schemas.length).isEqualTo(19)
|
assertThat(schemas.length).isEqualTo(20)
|
||||||
.withFailMessage("the count is equal to 19, if not then schemaDocument needs updating");
|
.withFailMessage("the count is equal to 20, if not then schemaDocument needs updating");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user