1.16. Element `jar`
Prev | 1. Reference | Next

### 1.16. Element `jar`

    <jar
      archive = Path
    >
      Content: [ add ]+ [ manifestFile | manifest ]?
    </jar>

    <add
      files = Glob pattern
      baseDir = Path : .
      store = boolean : false
    />

    <manifestFile>
      Content: Path
    </manifestFile>

    <manifest>
      Content: [ attribute ]+
    </manifest>

    <attribute
      name = xs:NMTOKEN (must match [0-9a-zA-Z_-]+ after
                         substitution of process variables)
    >
      Content: xs:string
    </attribute>

Similar to zip, except that the archive always contains a manifest (even if this manifest is empty). The manifest, if any, is specified using a `manifestFile` child element or a `manifest` child element.

Examples:

    <jar archive="doc.jar">
      <add files="doc.xml" />
      <add files="images/*.gif" />
      <manifestFile>/tmp/manifest</manifestFile>
    </jar>

    <jar archive="doc2.jar">
      <add files="doc.xml" />
      <add files="images/*.gif" store="true" />
      <manifest>
        <attribute name="Master-Document">doc.xml</attribute>
        <attribute name="Publication-Date">%0</attribute>
        <attribute name="Self-Contained"></attribute>
      </manifest>
    </jar>

Prev | Up | Next
1.15. Element `zip` | Home | 1.17. Element `shell`