Skip to content

Commit 26566af

Browse files
author
Steve Riesenberg
committed
Copy spring-security-oauth schemas on deploy
Closes gh-12804
1 parent 5257e36 commit 26566af

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

buildSrc/src/main/groovy/io/spring/gradle/convention/SchemaDeployPlugin.groovy

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,33 @@ public class SchemaDeployPlugin implements Plugin<Project> {
6262
execute "rm -f $tempPath*.zip"
6363
execute "rm -rf $extractPath*"
6464
execute "mv $tempPath/* $extractPath"
65+
66+
/*
67+
* Copy spring-security-oauth schemas so that legacy projects using the "http" scheme can
68+
* resolve the following schema locations:
69+
*
70+
* - http://www.springframework.org/schema/security/spring-security-oauth-1.0.xsd
71+
* - http://www.springframework.org/schema/security/spring-security-oauth2-1.0.xsd
72+
* - http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
73+
*
74+
* Note: The directory:
75+
* https://www.springframework.org/schema/security/
76+
*
77+
* is a symbolic link pointing to:
78+
* https://docs.spring.io/autorepo/schema/spring-security/current/security/
79+
*
80+
* which in turn points to the latest:
81+
* https://docs.spring.io/autorepo/schema/spring-security/$version/security/
82+
*
83+
* with the help of the autoln command which is run regularly via a cron job.
84+
*
85+
* See https://github.com/spring-io/autoln for more info.
86+
*/
87+
if (name == "spring-security") {
88+
def springSecurityOauthPath = "/var/www/domains/spring.io/docs/htdocs/autorepo/schema/spring-security-oauth/current/security"
89+
execute "cp $springSecurityOauthPath/* $extractPath"
90+
}
91+
6592
execute "chmod -R g+w $extractPath"
6693
}
6794
}

0 commit comments

Comments
 (0)