dpml:library
The DPML build system maintains information about projects, resources, and modules in a central library. The library is described using XML and is used to automate the determination of project BUILD, TEST and RUNTIME dependencies, project build prerequisites, processing requirements and associated properties.
The persistent state of the library is maintained in a file named index.xml. The index file is located by searching up the directory hierachy from the current working directory to the root of the file system until the index file is located. The file contains the declaration of project modules which in turn contain declarations of available resources (such as dependent jar files), projects, and subsidiary modules.
<?xml version="1.0" encoding="ISO-8859-1"?> <index xmlns="dpml:library" xmlns:part="dpml:part"> <imports> <import uri="link:module:junit"/> <import uri="link:module:ant"/> </imports> <modules> <module name="dpml" basedir="."> <properties> <property name="project.publisher.name" value="Digital Product Management Library"/> <property name="project.specification.vendor" value="${project.publisher.name}"/> <property name="project.implementation.vendor" value="${project.publisher.name}"/> <property name="project.implementation.vendor-id" value="net.dpml"/> <property name="project.publisher.url" value="http://www.dpml.net"/> <property name="project.resource.host" value="http://repository.dpml.net"/> <property name="project.api.host" value="http://api.dpml.net"/> <property name="project.svn.host" value="svn://svn.berlios.de/dpml/trunk/main"/> <property name="project.javadoc.linksource" value="true"/> </properties> <types> <type id="module" alias="true"/> </types> <filters> <filter token="PROJECT-VERSION" value="${project.version}"/> <filter token="PUBLISHER-NAME" value="${project.publisher.name}"/> <filter token="PUBLISHER-URL" value="${project.publisher.url}"/> </filters> <import file="lang/module.xml"/> <import file="transit/module.xml"/> <import file="util/module.xml"/> <import file="depot/module.xml"/> <import file="metro/module.xml"/> <import file="station/module.xml"/> <import file="planet/module.xml"/> <project name="central" basedir="central"> <filters> <feature token="VERSION" id="version"/> <feature token="ANT-JAR-VERSION" ref="ant/ant" id="version"/> <feature token="ANT-JAR-URI" ref="ant/ant" id="uri" type="jar" /> <feature token="TRANSIT-TOOLS-URI" ref="dpml/transit/dpml-transit-tools" id="uri" type="jar" /> <feature token="TRANSIT-MODULE-VERSION" ref="dpml/transit" id="version"/> <feature token="TRANSIT-HANDLER-URI" ref="dpml/transit/dpml-transit-main" id="uri" type="jar" /> <feature token="DEPOT-MODULE-VERSION" ref="dpml/depot" id="version" /> <feature token="DEPOT-CONSOLE-URI" ref="dpml/depot/dpml-depot-console" id="uri" type="jar" /> <feature token="DEPOT-TOOLS-ANT-URI" ref="dpml/depot/dpml-depot-builder" id="uri" type="part" /> <feature token="DEPOT-TOOLS-LIBRARY-URI" ref="dpml/depot/dpml-library" id="uri" type="jar"/> <feature token="METRO-RUNTIME-URI" ref="dpml/metro/dpml-metro-runtime" id="uri" type="part"/> <feature token="METRO-TOOLS-URI" ref="dpml/metro/dpml-metro-tools" id="uri" type="part"/> <feature token="UTIL-CLI-URI" ref="dpml/util/dpml-util-cli" id="uri" type="jar" /> <feature token="UTIL-I18N-URI" ref="dpml/util/dpml-util-i18n" id="uri" type="jar"/> <feature token="UTIL-LOGGING-API-URI" ref="dpml/util/dpml-logging-api" id="uri" type="jar"/> </filters> </project> </module> </modules> </index>
The above index contains a collection of global properties and top-level modules. Collectively this information is sufficient to execute a complete preparation, compilation, packaging, testing, and installation of the project and modules defined within the library. This level of automation is achived through (a) support from the index for project relationship information, dependencies, properties and produced type declarations, combined with (b) a plugin build implementation.