diff --git a/build.gradle b/build.gradle
index 2fe80d31..3fc3233f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,6 +22,7 @@ buildscript {
apply plugin: 'io.spring.convention.root'
apply plugin: 'io.spring.convention.docs'
+apply plugin: 's101'
group = "org.springframework.ldap"
description = "Spring LDAP"
@@ -49,4 +50,8 @@ asciidoctor {
options = [
eruby: 'erubis'
]
+}
+
+s101 {
+ configurationDirectory = project.file("etc/s101")
}
\ No newline at end of file
diff --git a/buildSrc/src/main/java/s101/S101Configurer.java b/buildSrc/src/main/java/s101/S101Configurer.java
index b7687154..6ce3caf7 100644
--- a/buildSrc/src/main/java/s101/S101Configurer.java
+++ b/buildSrc/src/main/java/s101/S101Configurer.java
@@ -161,17 +161,21 @@ public class S101Configurer {
}
private String installBuildTool(File installationDirectory, File configurationDirectory) {
- String source = "https://structure101.com/binaries/19159";
+ String source = "https://structure101.com/binaries/v6";
try (final WebClient webClient = new WebClient()) {
HtmlPage page = webClient.getPage(source);
+ Matcher matcher = null;
for (HtmlAnchor anchor : page.getAnchors()) {
- Matcher matcher = Pattern.compile("(structure101-build-java-all-)(.*).zip").matcher(anchor.getHrefAttribute());
- if (matcher.find()) {
- copyZipToFilesystem(source, installationDirectory, matcher.group(1) + matcher.group(2));
- return matcher.group(2);
+ Matcher candidate = Pattern.compile("(structure101-build-java-all-)(.*).zip").matcher(anchor.getHrefAttribute());
+ if (candidate.find()) {
+ matcher = candidate;
}
}
- return null;
+ if (matcher == null) {
+ return null;
+ }
+ copyZipToFilesystem(source, installationDirectory, matcher.group(1) + matcher.group(2));
+ return matcher.group(2);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
@@ -233,7 +237,7 @@ public class S101Configurer {
}
private String validateFilename(String filename, String intendedDir)
- throws IOException {
+ throws java.io.IOException {
File f = new File(filename);
String canonicalPath = f.getCanonicalPath();
@@ -263,7 +267,7 @@ public class S101Configurer {
private void copyToProject(String location, File destination) {
Resource resource = new ClassPathResource(location);
try (InputStream is = resource.getInputStream();
- OutputStream os = new FileOutputStream(destination)) {
+ OutputStream os = new FileOutputStream(destination)) {
IOUtils.copy(is, os);
} catch (IOException ex) {
throw new UncheckedIOException(ex);
diff --git a/etc/s101/config.xml b/etc/s101/config.xml
new file mode 100644
index 00000000..113236c4
--- /dev/null
+++ b/etc/s101/config.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/etc/s101/project.java.hsp b/etc/s101/project.java.hsp
new file mode 100644
index 00000000..df9a5a26
--- /dev/null
+++ b/etc/s101/project.java.hsp
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/etc/s101/repository/repository.xml b/etc/s101/repository/repository.xml
new file mode 100644
index 00000000..c9b3ce00
--- /dev/null
+++ b/etc/s101/repository/repository.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/etc/s101/repository/snapshots/baseline/actions.hsx b/etc/s101/repository/snapshots/baseline/actions.hsx
new file mode 100644
index 00000000..f10f3591
--- /dev/null
+++ b/etc/s101/repository/snapshots/baseline/actions.hsx
@@ -0,0 +1,2 @@
+x]N;
+10LbcqB2j Ifw,"t-L8nw]!?oq2\UQ4_rmb% &0"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3873
+
+
+
+ 6532
+
+
+
+ 7
+
+
+
+ 5032
+
+
+
+ 202
+
+
+
+ 300
+
+
+
+ 3566
+
+
+
+ 5263
+
+
+
+ 5199
+
+
+
+ 1199
+
+
+
+ 5362
+
+
+
+ 1139
+
+
+
+ 117
+
+
+
+ 1205
+
+
+
+ 758
+
+
+
+ 5911
+
+
+
+ 730
+
+
+
+ 27
+
+
+
+ 732
+
+
+
+ 284
+
+
+
+ 733
+
+
+
+ 382
+
+
+
+ 3359
+
+
+
+
diff --git a/etc/s101/repository/snapshots/baseline/package-slice.hsx b/etc/s101/repository/snapshots/baseline/package-slice.hsx
new file mode 100644
index 00000000..c43cff3c
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/package-slice.hsx differ
diff --git a/etc/s101/repository/snapshots/baseline/settings.hsx b/etc/s101/repository/snapshots/baseline/settings.hsx
new file mode 100644
index 00000000..42f32b6d
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/settings.hsx differ
diff --git a/etc/s101/repository/snapshots/baseline/spec.hsx b/etc/s101/repository/snapshots/baseline/spec.hsx
new file mode 100644
index 00000000..32c2431d
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/spec.hsx differ
diff --git a/etc/s101/repository/snapshots/baseline/summary.hsx b/etc/s101/repository/snapshots/baseline/summary.hsx
new file mode 100644
index 00000000..de1abd5c
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/summary.hsx differ
diff --git a/etc/s101/repository/snapshots/baseline/violations.xml b/etc/s101/repository/snapshots/baseline/violations.xml
new file mode 100644
index 00000000..386e6c9d
--- /dev/null
+++ b/etc/s101/repository/snapshots/baseline/violations.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/etc/s101/repository/snapshots/baseline/xb.hsx b/etc/s101/repository/snapshots/baseline/xb.hsx
new file mode 100644
index 00000000..c53579bf
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/xb.hsx differ
diff --git a/etc/s101/repository/snapshots/baseline/xblite.hsx b/etc/s101/repository/snapshots/baseline/xblite.hsx
new file mode 100644
index 00000000..f16aadaa
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/xblite.hsx differ
diff --git a/etc/s101/repository/snapshots/baseline/xs-offenders.hsx b/etc/s101/repository/snapshots/baseline/xs-offenders.hsx
new file mode 100644
index 00000000..661bddcb
Binary files /dev/null and b/etc/s101/repository/snapshots/baseline/xs-offenders.hsx differ