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

Commit

Permalink
Parameterise import aggregate generation.
Browse files Browse the repository at this point in the history
Take local file locations of production aggregate and generated import
aggregate from properties.
Add a target to generate the import aggregate.
  • Loading branch information
iay committed Jul 15, 2014
1 parent 3bd9f57 commit dd54cae
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
20 changes: 20 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,13 @@
-->
<property name="mda.inc.exported.xml" value="${mda.incdir}/exported.xml"/>

<!--
Default local file location to which to write the import aggregate.
This can be overridden in build.properties.
-->
<property name="mda.inc.imported.xml" value="${mda.incdir}/imported.xml"/>

<!--
inc.fetch.production
Expand Down Expand Up @@ -1476,4 +1483,17 @@
<echo>Generation complete.</echo>
</target>

<!--
inc.generate.import
Generate the InCommon import aggregate.
-->
<target name="inc.generate.import">
<echo>Generating InCommon import aggregate in ${mda.inc.imported.xml}</echo>
<echo> from production aggregate in ${mda.inc.production.xml}</echo>
<echo> and selected eduGAIN entities...</echo>
<CHANNEL.do channel="incommon" verb="export"/>
<echo>Generation complete.</echo>
</target>

</project>
21 changes: 11 additions & 10 deletions mdx/incommon/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
p:id="serializeImported">
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/incommon/imported.xml"/>
<constructor-arg value="${inc.imported.xml}"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -87,17 +87,18 @@
p:id="import">
<property name="stages">
<list>
<!-- Start with the InCommon production aggregate. -->
<ref bean="us_incommon_productionAggregate"/>

<!--
Check for fatal errors at the aggregate level:
missing or expired validUntil attribute
invalid signature
Start with the InCommon production aggregate.
In a production environment, this will be the *unsigned* aggregate,
so we perform minimal checking on its contents.
-->
<ref bean="check_validUntil"/>
<ref bean="us_incommon_checkSignature"/>
<ref bean="errorTerminatingFilter"/>
<bean id="production_aggregate" parent="DOMResourceSourceStage"
p:id="production_aggregate">
<property name="DOMResource">
<bean parent="ClassPathResource" c:_0="incommon/production.xml"/>
</property>
</bean>

<!-- Break down into individual entities. -->
<ref bean="disassemble"/>
Expand Down

0 comments on commit dd54cae

Please sign in to comment.