Add Structure101 to Build

Closes gh-620
This commit is contained in:
Josh Cummings
2022-01-19 16:34:24 -07:00
parent 1abcfbdf52
commit f587593fca
16 changed files with 238 additions and 8 deletions

View File

@@ -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")
}

View File

@@ -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);

32
etc/s101/config.xml Normal file
View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<headless version="1.0">
<operations>
<operation type="publish">
<argument name="overwrite" value="true"/>
<argument name="diagrams" value="true"/>
</operation>
<operation type="check-key-measures">
<argument name="baseline" value="baseline"/>
<argument name="useProjectFileSpec" value="true"/>
<argument name="useProjectFileDiagrams" value="true"/>
<argument name="fail-on-architecture-violations" value="false"/>
<argument name="fail-on-fat-package" value="false"/>
<argument name="fail-on-fat-class" value="false"/>
<argument name="fail-on-fat-method" value="false"/>
<argument name="fail-on-feedback-dependencies" value="true"/>
<argument name="fail-on-spec-violation-dependencies" value="false"/>
<argument name="fail-on-total-problem-dependencies" value="false"/>
<argument name="fail-on-spec-item-violations" value="false"/>
<argument name="fail-on-biggest-class-tangle" value="true"/>
<argument name="fail-on-tangled-package" value="true"/>
<argument name="fail-on-architecture-violations" value="false"/>
<argument name="fail-on-total-problem-dependencies" value="true"/>
<argument name="identifier-on-violation" value="S101 key measure violation"/>
</operation>
</operations>
<arguments>
<argument name="local-project" value="const(THIS_FILE)/project.java.hsp"/>
<argument name="repository" value="const(THIS_FILE)/repository"/>
<argument name="project" value="snapshots"/>
</arguments>
</headless>

32
etc/s101/project.java.hsp Normal file
View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<local-project language="java" version="6.1.19172" xml-version="3" flavor="j2se">
<property name="show-as-module" value="false" />
<property name="publish-architecture-artifacts" value="true" />
<property name="force-classpath" value="false" />
<property name="project-type" value="classpath" />
<property name="hide-externals" value="true" />
<property name="parse-archive-in-archive" value="false" />
<property name="include-injected-dependency" value="false" />
<property name="relative-to" value="const(THIS_FILE)/.." />
<property name="action-set-mod" value="1" />
<property name="detail-mode" value="true" />
<property name="hide-deprecated" value="false" />
<property name="resolve-name-clashes" value="true" />
<property name="project-excluded" />
<property name="show-needs-to-compile" value="false" />
<classpath>
<classpathentry kind="lib" path="core/build/classes/java/main" module="spring-ldap-core" />
<classpathentry kind="lib" path="core-tiger/build/classes/java/main" module="spring-ldap-core-tiger" />
<classpathentry kind="lib" path="ldif/ldif-core/build/classes/java/main" module="spring-ldap-ldif-core" />
<classpathentry kind="lib" path="odm/build/classes/java/main" module="spring-ldap-odm" />
<classpathentry kind="lib" path="samples/plain/build/classes/java/main" module="spring-ldap-plain-sample" />
<classpathentry kind="lib" path="sandbox/build/classes/java/main" module="spring-ldap-sandbox" />
<classpathentry kind="lib" path="test-support/build/classes/java/main" module="spring-ldap-test" />
</classpath>
<pom-root-files />
<modules-in-scope />
<restructuring>
<set version="3" name="Action list 1" hiview="Codemap" active="true" todo="false" list="0" />
</restructuring>
<grid-set sep="." version="6.1.19172" />
</local-project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<structure101-repository language="java" version="19172">
<xs-configuration>
<entry metric="Tangled" scope="design" threshold="0" color="153,53,0" />
<entry metric="Fat" scope="design" threshold="120" color="255,153,0" />
<entry metric="Fat" scope="leaf package" threshold="120" color="0,153,153" />
<entry metric="Fat" scope="class" threshold="120" color="255,153,153" />
<entry metric="Fat" scope="method" threshold="15" color="51,255,51" />
</xs-configuration>
<!--Note: All date strings are stored in short US format e.g. 2/1/06 for 1st Feb 2006-->
<project name="snapshots" dir="snapshots" baselineSnapshot="default" version="19172">
<snapshot label="baseline" location="baseline" timestamp="1/19/22, 8:43 AM" version="19172" detail="true" good="true" size="501" />
</project>
</structure101-repository>

View File

@@ -0,0 +1,2 @@
x<EFBFBD>]N;
1<10><05>0L<30><4C>bc<62>q<11><13>B2j If<49><66>w<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>"t<>-<2D>L8nw<08>]<5D>!?o<><6F><EFBFBD><EFBFBD><EFBFBD>q<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>\UQ<02>4<EFBFBD>_r<5F><72>mb“% <20>&0"<C<0F>&<<17>ɾ<10><>]}<7D><>R|!<21><><EFBFBD>,B}0,<2C><><EFBFBD><EFBFBD><17>A7+

Binary file not shown.

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyMeasureData formatVersion="2" specViolationDependencies="0" specViolationContainers="0" specItemViolations="0" specDependencyViolatingItems="0" biggestUnspecifiedNumber="0" specCoverage="0.0" feedbackDependencies="0" totalProblemDependencies="0" tangledDesign="0" tanglePercentage="0.0" biggestClassTangle="5" fatPackage="1" fatClass="4" fatMethod="13" fatPercentage="38.0" numDiagrams="0" numDiagramDependencyViolations="0" numDiagramDependencyViolatingItems="0" numUnassociatedItems="0" numDiagramViolationContainers="0" moduleAPIViolations="0" moduleRequiresViolations="0" deprecationViolations="0" moduleViolatingItems="0" moduleCoverage="0.0">
<enabled-optional-measures/>
<specOverlays/>
<archOverlays/>
<tangledDesign/>
<fatPackage>
<node id="6532" measure="145" impact="32574" threshold="120.0"/>
</fatPackage>
<fatClass>
<node id="382" measure="129" impact="945" threshold="120.0"/>
<node id="284" measure="133" impact="1014" threshold="120.0"/>
<node id="7" measure="272" impact="3150" threshold="120.0"/>
<node id="117" measure="497" impact="5400" threshold="120.0"/>
</fatClass>
<fatMethod>
<node id="202" measure="16" impact="119" threshold="15.0"/>
<node id="5263" measure="19" impact="244" threshold="15.0"/>
<node id="733" measure="19" impact="196" threshold="15.0"/>
<node id="5199" measure="20" impact="315" threshold="15.0"/>
<node id="758" measure="21" impact="249" threshold="15.0"/>
<node id="3873" measure="21" impact="249" threshold="15.0"/>
<node id="732" measure="22" impact="222" threshold="15.0"/>
<node id="3566" measure="22" impact="175" threshold="15.0"/>
<node id="5032" measure="23" impact="241" threshold="15.0"/>
<node id="5911" measure="23" impact="209" threshold="15.0"/>
<node id="1205" measure="23" impact="241" threshold="15.0"/>
<node id="5362" measure="36" impact="394" threshold="15.0"/>
<node id="730" measure="38" impact="668" threshold="15.0"/>
</fatMethod>
<specViolationContainers/>
<specItemViolations/>
<biggestClassTangle>
<node id="3359" measure="3"/>
<node id="1139" measure="14"/>
<node id="1199" measure="398"/>
<node id="27" measure="816"/>
<node id="300" measure="878"/>
</biggestClassTangle>
<archViolationContainers/>
<unassociatedItems/>
<moduleViolations/>
<nodeMap>
<entry>
<key>3873</key>
<value realName="spring-ldap-core.org.springframework.ldap.pool2.DelegatingDirContextTest.testAllMethodsClosed():void" type="method" localSize="249" size="249" displayName="spring-ldap-core.org.springframework.ldap.pool2.DelegatingDirContextTest.testAllMethodsClosed():void" navigationName="spring-ldap-core.org.springframework.ldap.pool2.DelegatingDirContextTest.testAllMethodsClosed():void" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>6532</key>
<value realName="spring-ldap-core.org.springframework.ldap.core" type="package" localSize="0" size="32574" displayName="spring-ldap-core.org.springframework.ldap.core" navigationName="spring-ldap-core.org.springframework.ldap.core" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>7</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.LdapTemplate" type="class" localSize="1" size="3150" displayName="spring-ldap-core.org.springframework.ldap.core.LdapTemplate" navigationName="spring-ldap-core.org.springframework.ldap.core.LdapTemplate" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>5032</key>
<value realName="spring-ldap-core.org.springframework.ldap.pool.DelegatingContextTest.testAllMethodsClosed():void" type="method" localSize="241" size="241" displayName="spring-ldap-core.org.springframework.ldap.pool.DelegatingContextTest.testAllMethodsClosed():void" navigationName="spring-ldap-core.org.springframework.ldap.pool.DelegatingContextTest.testAllMethodsClosed():void" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>202</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.NameAwareAttribute.equals(java.lang.Object):boolean" type="method" localSize="119" size="119" displayName="spring-ldap-core.org.springframework.ldap.core.NameAwareAttribute.equals(java.lang.Object):boolean" navigationName="spring-ldap-core.org.springframework.ldap.core.NameAwareAttribute.equals(java.lang.Object):boolean" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>300</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DistinguishedName" type="class" localSize="1" size="878" displayName="spring-ldap-core.org.springframework.ldap.core.DistinguishedName" navigationName="spring-ldap-core.org.springframework.ldap.core.DistinguishedName" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>3566</key>
<value realName="spring-ldap-odm.org.springframework.ldap.odm.test.Person.equals(java.lang.Object):boolean" type="method" localSize="175" size="175" displayName="spring-ldap-odm.org.springframework.ldap.odm.test.Person.equals(java.lang.Object):boolean" navigationName="spring-ldap-odm.org.springframework.ldap.odm.test.Person.equals(java.lang.Object):boolean" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>5263</key>
<value realName="spring-ldap-core.org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.mapFromLdapDataEntry(org.springframework.LdapDataEntry, java.lang.Class):java.lang.Object" type="method" localSize="244" size="244" displayName="spring-ldap-core.org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.mapFromLdapDataEntry(org.springframework.LdapDataEntry, java.lang.Class):java.lang.Object" navigationName="spring-ldap-core.org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.mapFromLdapDataEntry(org.springframework.LdapDataEntry, java.lang.Class):java.lang.Object" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>5199</key>
<value realName="spring-ldap-odm.org.springframework.ldap.odm.tools.SchemaToJava.main(java.lang.String[]):void" type="method" localSize="315" size="315" displayName="spring-ldap-odm.org.springframework.ldap.odm.tools.SchemaToJava.main(java.lang.String[]):void" navigationName="spring-ldap-odm.org.springframework.ldap.odm.tools.SchemaToJava.main(java.lang.String[]):void" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>1199</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.LdapRdn" type="class" localSize="1" size="398" displayName="spring-ldap-core.org.springframework.ldap.core.LdapRdn" navigationName="spring-ldap-core.org.springframework.ldap.core.LdapRdn" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>5362</key>
<value realName="spring-ldap-core.org.springframework.ldap.support.LdapUtils.convertLdapException(javax.naming.NamingException):org.springframework.ldap.NamingException" type="method" localSize="394" size="394" displayName="spring-ldap-core.org.springframework.ldap.support.LdapUtils.convertLdapException(javax.naming.NamingException):org.springframework.ldap.NamingException" navigationName="spring-ldap-core.org.springframework.ldap.support.LdapUtils.convertLdapException(javax.naming.NamingException):org.springframework.ldap.NamingException" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>1139</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DefaultDnParserFactory" type="class" localSize="1" size="14" displayName="spring-ldap-core.org.springframework.ldap.core.DefaultDnParserFactory" navigationName="spring-ldap-core.org.springframework.ldap.core.DefaultDnParserFactory" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>117</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.LdapTemplateTest" type="class" localSize="1" size="5400" displayName="spring-ldap-core.org.springframework.ldap.core.LdapTemplateTest" navigationName="spring-ldap-core.org.springframework.ldap.core.LdapTemplateTest" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>1205</key>
<value realName="spring-ldap-core.org.springframework.ldap.pool2.DelegatingContextTest.testAllMethodsClosed():void" type="method" localSize="241" size="241" displayName="spring-ldap-core.org.springframework.ldap.pool2.DelegatingContextTest.testAllMethodsClosed():void" navigationName="spring-ldap-core.org.springframework.ldap.pool2.DelegatingContextTest.testAllMethodsClosed():void" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>758</key>
<value realName="spring-ldap-core.org.springframework.ldap.pool.DelegatingDirContextTest.testAllMethodsClosed():void" type="method" localSize="249" size="249" displayName="spring-ldap-core.org.springframework.ldap.pool.DelegatingDirContextTest.testAllMethodsClosed():void" navigationName="spring-ldap-core.org.springframework.ldap.pool.DelegatingDirContextTest.testAllMethodsClosed():void" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>5911</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.LdapTemplate.search(org.springframework.ldap.core.SearchExecutor, org.springframework.ldap.core.NameClassPairCallbackHandler, org.springframework.ldap.core.DirContextProcessor):void" type="method" localSize="209" size="209" displayName="spring-ldap-core.org.springframework.ldap.core.LdapTemplate.search(org.springframework.ldap.core.SearchExecutor, org.springframework.ldap.core.NameClassPairCallbackHandler, org.springframework.ldap.core.DirContextProcessor):void" navigationName="spring-ldap-core.org.springframework.ldap.core.LdapTemplate.search(org.springframework.ldap.core.SearchExecutor, org.springframework.ldap.core.NameClassPairCallbackHandler, org.springframework.ldap.core.DirContextProcessor):void" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>730</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_1(int, int):int" type="method" localSize="668" size="668" displayName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_1(int, int):int" navigationName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_1(int, int):int" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>27</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DnParserImpl" type="class" localSize="1" size="816" displayName="spring-ldap-core.org.springframework.ldap.core.DnParserImpl" navigationName="spring-ldap-core.org.springframework.ldap.core.DnParserImpl" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>732</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_0(int, int):int" type="method" localSize="222" size="222" displayName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_0(int, int):int" navigationName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_0(int, int):int" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>284</key>
<value realName="spring-ldap-integration-tests.org.springframework.ldap.itest.LdapTemplateSearchResultITest" type="class" localSize="1" size="1014" displayName="spring-ldap-integration-tests.org.springframework.ldap.itest.LdapTemplateSearchResultITest" navigationName="spring-ldap-integration-tests.org.springframework.ldap.itest.LdapTemplateSearchResultITest" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>733</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_2(int, int):int" type="method" localSize="196" size="196" displayName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_2(int, int):int" navigationName="spring-ldap-core.org.springframework.ldap.core.DnParserImplTokenManager.jjMoveNfa_2(int, int):int" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>382</key>
<value realName="spring-ldap-integration-tests.org.springframework.ldap.itest.LdapTemplateSearchResultNamespaceConfigITest" type="class" localSize="1" size="945" displayName="spring-ldap-integration-tests.org.springframework.ldap.itest.LdapTemplateSearchResultNamespaceConfigITest" navigationName="spring-ldap-integration-tests.org.springframework.ldap.itest.LdapTemplateSearchResultNamespaceConfigITest" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
<entry>
<key>3359</key>
<value realName="spring-ldap-core.org.springframework.ldap.core.DnParser" type="class" localSize="1" size="3" displayName="spring-ldap-core.org.springframework.ldap.core.DnParser" navigationName="spring-ldap-core.org.springframework.ldap.core.DnParser" isModule="false" isModuleInterface="false" isDeprecated="false"/>
</entry>
</nodeMap>
</KeyMeasureData>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<architecture num-diagrams="0">
<violations total="0" total-weighted="0" population="0" population-weighted="0" generated="statically" />
</architecture>

Binary file not shown.

Binary file not shown.