mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-12 13:23:29 +00:00
Pull most recent Structure101 version
Closes gh-10696
This commit is contained in:
parent
60ed3602f6
commit
194eaf8491
@ -164,14 +164,18 @@ public class S101Configurer {
|
|||||||
String source = "https://structure101.com/binaries/v6";
|
String source = "https://structure101.com/binaries/v6";
|
||||||
try (final WebClient webClient = new WebClient()) {
|
try (final WebClient webClient = new WebClient()) {
|
||||||
HtmlPage page = webClient.getPage(source);
|
HtmlPage page = webClient.getPage(source);
|
||||||
|
Matcher matcher = null;
|
||||||
for (HtmlAnchor anchor : page.getAnchors()) {
|
for (HtmlAnchor anchor : page.getAnchors()) {
|
||||||
Matcher matcher = Pattern.compile("(structure101-build-java-all-)(.*).zip").matcher(anchor.getHrefAttribute());
|
Matcher candidate = Pattern.compile("(structure101-build-java-all-)(.*).zip").matcher(anchor.getHrefAttribute());
|
||||||
if (matcher.find()) {
|
if (candidate.find()) {
|
||||||
|
matcher = candidate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (matcher == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
copyZipToFilesystem(source, installationDirectory, matcher.group(1) + matcher.group(2));
|
copyZipToFilesystem(source, installationDirectory, matcher.group(1) + matcher.group(2));
|
||||||
return matcher.group(2);
|
return matcher.group(2);
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user