Skip to content

Commit

Permalink
Reimplement check.ports using the aggregator framework.
Browse files Browse the repository at this point in the history
Remove the (now unused) mdcheck tool, and all references to it.
  • Loading branch information
iay committed Mar 2, 2012
1 parent 581c36e commit 758b901
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 59 deletions.
61 changes: 2 additions & 59 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
<property name="tools.dir" value="tools"/>
<property name="tools.ant" value="${tools.dir}/ant"/>
<property name="tools.mda" value="${tools.dir}/mda"/>
<property name="tools.mdcheck" value="${tools.dir}/mdcheck"/>
<property name="tools.mdnorm" value="${tools.dir}/mdnorm"/>
<property name="tools.metadatatool" value="${tools.dir}/metadatatool"/>
<property name="tools.xmlsectool" value="${tools.dir}/xmlsectool"/>
Expand Down Expand Up @@ -776,62 +775,6 @@
<echo>Checked.</echo>
</target>

<!--
*****************************************
*** ***
*** M E T A D A T A C H E C K S ***
*** ***
*****************************************
-->

<!--
Check a metadata document against a set of conventions.
Parameter 'i' is the file to be checked; no assumption is made
about its location so this must contain a full path.
Additional arguments are normally ruleset file names.
-->
<macrodef name="CHECK.base">
<attribute name="i"/>
<element name="base.args" implicit="yes"/>
<sequential>
<java classname="uk.ac.sdss.mdcheck.MetadataCheck"
fork="true" failonerror="true" maxmemory="${java.max.memory}">
<classpath>
<fileset dir="${tools.mdcheck}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${tools.xalan}/lib">
<include name="*.jar"/>
</fileset>
</classpath>
<jvmarg value="-Djava.endorsed.dirs=${tools.xalan}/endorsed"/>
<arg value="@{i}"/>
<base.args/>
</java>
</sequential>
</macrodef>

<!--
Check a metadata document against a single ruleset file.
Parameter 'i' is the file to be checked; no assumption is made
about its location so this must contain a full path.
Parameter 's' is the checking stylesheet to use; assumed to be
present in the build.dir.
-->
<macrodef name="CHECK.one">
<attribute name="i"/>
<attribute name="s"/>
<sequential>
<CHECK.base i="@{i}">
<arg value="${build.dir}/@{s}"/>
</CHECK.base>
</sequential>
</macrodef>

<!--
*********************************************
*** ***
Expand Down Expand Up @@ -1171,9 +1114,9 @@
<!--
Check for IdPs using the single-port configuration.
-->
<target name="check.ports" depends="flow.uk.collect">
<target name="check.ports">
<echo>Checking vhost use</echo>
<CHECK.one i="${uk.collected}" s="check_vhosts.xsl"/>
<CHANNEL.do verb="checkPorts" channel="uk"/>
<echo>Checked.</echo>
</target>

Expand Down
32 changes: 32 additions & 0 deletions mdx/uk/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,38 @@
</property>
</bean>

<!--
*********************************
*** ***
*** C H E C K P O R T S ***
*** ***
*********************************
-->

<bean id="checkPorts" p:id="checkPorts" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="stages">
<list>
<ref bean="uk_registeredEntities"/>

<!--
The next four stages ensure that any errors are reported
in entity ID order, even on systems where the native order
(which tends to reflect the file enumeration ordering)
is arbitrary. Ideally this should be handled by an optional
ordering strategy on the announcing filter.
-->
<ref bean="uk_assemble"/>
<ref bean="disassemble"/>
<ref bean="populateItemIds"/>
<ref bean="uk_populateIds"/>

<ref bean="check_vhosts"/>
<ref bean="errorAnnouncingFilter"/>
</list>
</property>
</bean>

<!--
***********************************
*** ***
Expand Down
Binary file removed tools/mdcheck/lib/sdss-mdcheck-1.3.jar
Binary file not shown.

0 comments on commit 758b901

Please sign in to comment.