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

Commit

Permalink
Rework how system properties are passed into an mda invocation.
Browse files Browse the repository at this point in the history
This allows new properties to be injected more easily, and allows Ant's property
hierarchy (including external property files) to be used to create new ones or
override old ones.
  • Loading branch information
iay committed Jul 14, 2014
1 parent 7924156 commit 0947c2c
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,30 @@
***************************
-->

<!--
Property definitions for the mda tool.
Any Ant property with a name of the form "mda.*" is passed through
as a system property to the mda invocation with the "mda." stripped
off. Thus, a property "mda.foo" will be passed through as a system
property called "foo".
The individual properties listed here can be augmented or overridden
by properties defined in the external properties files, e.g., build.properties.
-->
<property name="mda.java.endorsed.dirs" value="${tools.mda}/lib/endorsed"/>
<property name="mda.basedir" value="${basedir}"/>
<property name="mda.rulesdir" value="${rules.dir}"/>

<!--
Build a property set of all the properties to be passed through, with
the "mda." prefix stripped off.
-->
<propertyset id="mda.properties">
<propertyref prefix="mda."/>
<mapper type="glob" from="mda.*" to="*"/>
</propertyset>

<!--
Macro to run the mda (metadata aggregator CLI) tool.
-->
Expand Down Expand Up @@ -471,9 +495,9 @@
<include name="ukf-members-*.jar"/>
</fileset>
</classpath>
<jvmarg value="-Djava.endorsed.dirs=${tools.mda}/lib/endorsed"/>
<jvmarg value="-Dbasedir=${basedir}"/>
<jvmarg value="-Drulesdir=${rules.dir}"/>
<syspropertyset>
<propertyset refid="mda.properties"/>
</syspropertyset>
<jvmarg value="-enableassertions"/>
<arg value="--quiet"/>
<arg value="@{config}"/>
Expand Down Expand Up @@ -1383,7 +1407,14 @@
List all the properties ant is using.
-->
<target name="echoproperties">
<echo>All properties:</echo>
<echoproperties/>
<echo>MDA properties:</echo>
<echoproperties>
<propertyset>
<propertyset refid="mda.properties"/>
</propertyset>
</echoproperties>
</target>

</project>

0 comments on commit 0947c2c

Please sign in to comment.