Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Factor out a common temporary file location.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Aug 1, 2016
1 parent 4395841 commit e06bd2d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@
</classpath>
</taskdef>

<!--
Full path to a commonly used temporary file.
-->
<property name="temp.xml" value="${temp.dir}/temp.xml"/>

<!--
There are many separate processing "streams": production, test, export,
fallback, "wayf", and "cdsall".
Expand Down Expand Up @@ -259,11 +264,6 @@
-->
<property name="java.max.memory" value="1024m"/>

<!--
Full paths to a couple of temporary file locations.
-->
<property name="temp.xml" value="${temp.dir}/temp.xml"/>


<!--
*************************************************
Expand Down Expand Up @@ -293,18 +293,18 @@
<attribute name="i"/>
<sequential>
<echo>Verifying @{i}...</echo>
<delete file="${temp.dir}/temp.xml" quiet="true" verbose="false"/>
<get src="@{i}" dest="${temp.dir}/temp.xml"/>
<delete file="${temp.xml}" quiet="true" verbose="false"/>
<get src="@{i}" dest="${temp.xml}"/>

<!--
Verify using xmlsectool.
-->
<XMLSECTOOL.VFY.uk i="${temp.dir}/temp.xml"/>
<XMLSECTOOL.VFY.uk i="${temp.xml}"/>

<!--
Delete the temporary file.
-->
<delete file="${temp.dir}/temp.xml" quiet="true" verbose="false"/>
<delete file="${temp.xml}" quiet="true" verbose="false"/>
</sequential>
</macrodef>

Expand All @@ -319,23 +319,23 @@
<attribute name="i"/>
<sequential>
<echo>Verifying @{i}...</echo>
<delete file="${temp.dir}/temp.xml" quiet="true" verbose="false"/>
<get src="@{i}" dest="${temp.dir}/temp.xml"/>
<delete file="${temp.xml}" quiet="true" verbose="false"/>
<get src="@{i}" dest="${temp.xml}"/>

<!--
Verify using metadatatool.
-->
<MDT.VFY.uk i="${temp.dir}/temp.xml"/>
<MDT.VFY.uk i="${temp.xml}"/>

<!--
Verify using xmlsectool.
-->
<XMLSECTOOL.VFY.uk i="${temp.dir}/temp.xml"/>
<XMLSECTOOL.VFY.uk i="${temp.xml}"/>

<!--
Delete the temporary file.
-->
<delete file="${temp.dir}/temp.xml" quiet="true" verbose="false"/>
<delete file="${temp.xml}" quiet="true" verbose="false"/>
</sequential>
</macrodef>

Expand Down Expand Up @@ -685,7 +685,7 @@
<attribute name="digest"/><!-- digest function to use -->
<sequential>
<!-- delete the temporary file to be sure we don't use old data -->
<delete file="${temp.dir}/temp.xml" quiet="true" verbose="false"/>
<delete file="${temp.xml}" quiet="true" verbose="false"/>

<echo>Signing @{i} using digest @{digest}.</echo>

Expand Down

0 comments on commit e06bd2d

Please sign in to comment.