当前位置:网站首页>Window runs gradle build ----- stacktrace. Exception occurs when the file framework-4.3.0.build-snapshot-schema.zip is not found

Window runs gradle build ----- stacktrace. Exception occurs when the file framework-4.3.0.build-snapshot-schema.zip is not found

2022-07-23 11:43:00 Youth without fame

Reprint http://stackoverflow.com/questions/34916981/build-spring-framework-source-code-encounter-an-error

edit build.gradle file

Replace with

task schemaZip(type: Zip) {
        group = "Distribution"
        baseName = "spring-framework"
        classifier = "schema"
        description = "Builds -${classifier} archive containing all " +
            "XSDs for deployment at http://springframework.org/schema."
        duplicatesStrategy 'exclude'
        moduleProjects.each { subproject ->
            def Properties schemas = new Properties();

            subproject.sourceSets.main.resources.find {
                it.path.endsWith("META-INF\\spring.schemas")
            }?.withInputStream { schemas.load(it) }

            for (def key : schemas.keySet()) {
                def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
                assert shortName != key
                File xsdFile = subproject.sourceSets.main.resources.find {
                    it.path.endsWith(schemas.get(key).replaceAll('\\/','\\\\'))
                }
                assert xsdFile != null
                into (shortName) {
                    from xsdFile.path
                }
            }
        }
    }
 Then re execute the command 

原网站

版权声明
本文为[Youth without fame]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230538281341.html