<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>

  <header>    
    <title>Apache Gump&#x2122; Object Model</title>
  <authors><person name="Sam Ruby" email="rubys@us.ibm.com"/></authors></header>

<body>

    <p>The data definitions for Apache Gump are organized around the various
    roles a developer may perform.  The overall approach is that elements
    (e.g. project definitions) can be repeated in multiple contexts (e.g.,
    modules, profiles, and workspaces), with definitions in "higher"
    level constructs extending or overriding the previous definitions.</p>

    <p>The way extending or overriding works is quite simple.  If two like
    kind elements (e.g., project) are located with the same value for the
    "name" attribute, they are combined.  Combining of attributes results
    in like named attributes overriding previous values.  Combining of
    elements results in concatenation.  These rules allow for the easy
    overriding of a target and the adding of a dependency.</p>

    <p>An area for future exploration is "anti-elements", which cancel out
    the effect of other elements</p>

    <p>An area where designers of XML DTDs have differing opinions is whether
    a given piece of information should be modeled as an attribute or an
    element.  A design goal of Gump was to try to reinvent as little as
    possible - resulting in a bit of inconsistency.  Project definitions are
    done in a style reminiscent of Ant - with element and attribute names
    chosen to match whenever possible.  Repository definitions were done in
    a style consistent with Alexandria.  In a few cases, information can
    be represented as either a nested element or an attribute - this was
    generally done to make that piece of information easier to override.</p>

    <p>One special global substutition is made - the string
    <code>@@DATE@@</code> is replaced with the current date in yyyyMMdd
    format whenever it occurs in any attribute value</p>

    <p>The subsections below represent a "bottoms up" introduction to the
    individual XML data elements, and contain links to more full
    descriptions</p>

    <section><title>project</title>
      <p>A <link href="project.html">project</link> represents the unit of
      integration for Gump.  It could represent a buildable project, or an
      installable package.  Its primary roles are to be a target of a
      dependency or the provider of jars and/or other source files.</p>

      <p>In the case of buildable projects, project definitions contain
      values for properties and the dependencies are used to construct
      the classpath.</p>

      <p>Note the project definitions contain the names of the jar or
      jars that they export.  Consuming projects simply name the projects
      that they depend on.</p>
    </section>

    <section><title>module</title>
      <p>A <link href="module.html">module</link> is a collection of projects that
      are physically stored in a single repository.  Due to the way that Gump
      will combine definitions, a module definition can be spread across
      multiple files.</p>

      <p>While a module references a repository, it can also contain prefixes
      and suffixes that modify the value of the CVSROOT used.</p>
    </section>

    <section><title>repository</title>
      <p>A <link href="repository.html">repository</link> specifies
      where modules can physically be located.  In the case of cvs, it
      contains the information used to form the CVSROOT used on
      checkout and update commands, for other supported SCMs it
      contains URLs or similar information.</p>
    </section>

    <section><title>profile</title>
      <p>A <link href="profile.html">profile</link> is a collection of projects and
      repositories that are logically to be considered a unit.  A profile can
      provide a consistent set of installable dependencies, or tagged versions
      of cvs modules to be used.</p>
    </section>

    <section><title>workspace</title>
      <p>A <link href="workspace.html">workspace</link> defines the ultimate
      word as to what projects and repositories are to be used, and the
      options (e.g., properties, tags, targets, and dependencies) are to
      be used to build.</p>

      <p>A workspace definition should also be the only place where
      absolute path names and other machine specific information is
      contained.</p>
    </section>

</body>
</document>
