File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
buildSrc/src/main/groovy/io/spring/gradle/convention Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,13 @@ public class SchemaZipPlugin implements Plugin<Project> {
32
32
for (def key : schemas. keySet()) {
33
33
def shortName = key. replaceAll(/ http.*schema.(.*).spring-.*/ , ' $1' )
34
34
assert shortName != key
35
+ def schemaResourceName = schemas. get(key)
35
36
File xsdFile = module. sourceSets. main. resources. find {
36
- it. path. endsWith(schemas. get(key))
37
+ it. path. endsWith(schemaResourceName)
38
+ }
39
+ if (xsdFile == null ) {
40
+ throw new IllegalStateException (" Could not find schema file for resource name " + schemaResourceName + " in src/main/resources" )
37
41
}
38
- assert xsdFile != null
39
42
schemaZip. into (shortName) {
40
43
duplicatesStrategy ' exclude'
41
44
from xsdFile. path
You can’t perform that action at this time.
0 commit comments