DPML
DPML Depot Type Production
HomeUtilitiesStationMetro
Filters

The filters element may be used to declare a collection of filters to be applied to a project code base.

XML Nested elements
filter 0..n Declaration of a simple literal filter that subsitues the supplied token with a value.
feature 0..n Substitution of a token with a value resolved from a feature of the project model (such as a name, group, uri, etc.).
Example

The following project definition demonstrates usage of a combination of simple and feature-based filters.

  <project name="dpml-depot-console" basedir="core">
    <properties>
      <property name="project.test.fork" value="true"/>
      <property name="depot.short.filename" value="${project.name}.jar"/>
      <property name="transit.short.filename" value="dpml-transit-main.jar"/>
      <property name="project.jar.main.class" value="dpml.depot.Main"/>
    </properties>
    <types>
      <type id="jar"/>
    </types>
    <dependencies>
      <runtime>
        <include ref="dpml/transit/dpml-transit-main"/>
      </runtime>
      <test>
        <include ref="ant/ant-junit"/>
      </test>
    </dependencies>
    <filters>
      <filter token="DEPOT-PATH" value="${depot.short.filename}"/>
      <filter token="DEPOT-MAIN-CLASS" value="${project.jar.main.class}"/>
      <filter token="TRANSIT-PATH" value="${transit.short.filename}"/>
      <filter token="DEPOT-CLASSLOADER-CLASS" value="net.dpml.util.SystemClassLoader"/>
      <feature token="BUILD-ID" id="version"/>
      <feature token="DEPOT-CONSOLE-URI" id="uri" type="jar"/>
      <feature token="TRANSIT-CORE-URI" id="uri" type="jar" ref="dpml/transit/dpml-transit-main" />
      <feature token="TRANSIT-CONSOLE-URI" id="uri" type="part" alias="true" ref="dpml/transit/dpml-transit-console" />
      <feature token="DEPOT-BUILDER-URI" id="uri" type="part" alias="true" ref="dpml/depot/dpml-depot-build" />
      <feature token="DEPOT-EXEC-URI" id="uri" type="part" alias="true" ref="dpml/station/dpml-station-exec" />
      <feature token="DEPOT-STATION-URI" id="uri" type="part" alias="true" ref="dpml/station/dpml-station-console" />
      <feature token="DEPOT-STATION-SERVER-URI" id="uri" type="part" alias="true" ref="dpml/station/dpml-station-server" />
    </filters>
  </project>