Browse Source

Good-Bye resolver 1.0.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273559 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
e7474bf8bb
5 changed files with 38 additions and 29 deletions
  1. +2
    -2
      WHATSNEW
  2. +22
    -19
      docs/manual/CoreTypes/xmlcatalog.html
  3. +7
    -3
      docs/manual/install.html
  4. +4
    -2
      src/main/org/apache/tools/ant/types/resolver/ApacheCatalog.java
  5. +3
    -3
      src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java

+ 2
- 2
WHATSNEW View File

@@ -98,8 +98,8 @@ Other changes:
in the XML file. in the XML file.


* <xmlcatalog> will now support external catalogs according to the * <xmlcatalog> will now support external catalogs according to the
OASIS "Open Catalog" standard - if resolver.jar from Apache's
xml-commons is in your CLASSPATH.
OASIS "Open Catalog" standard - if resolver.jar (newer than version
1.0) from Apache's xml-commons is in your CLASSPATH.
* Starteam tasks now have support for revision labels and build labels. * Starteam tasks now have support for revision labels and build labels.
Checkouts now have the option of using repository timestamps, instead Checkouts now have the option of using repository timestamps, instead


+ 22
- 19
docs/manual/CoreTypes/xmlcatalog.html View File

@@ -66,29 +66,32 @@ previously in a build file, or as a list of <code>dtd</code> or
<code>entity</code> locations. In addition, external catalog files <code>entity</code> locations. In addition, external catalog files
may be specified in <code>catalogfiles</code> filesets, but they will may be specified in <code>catalogfiles</code> filesets, but they will
be ignored unless the resolver library from xml-commons is available be ignored unless the resolver library from xml-commons is available
in the system classpath. A separate classpath for entity resolution
may be specified inline via nested <code>classpath</code> elements;
otherwise the system classpath is used for this as well.</p>
<p>XMLCatalogs can also be nested inside other XMLCatalogs. For
example, a "superset" XMLCatalog could be made by including several
nested XMLCatalogs that referred to other, previously defined
XMLCatalogs.</p>
<p>Resource locations can be specified either in-line or in
external catalog file(s), or both. In order to use an external
catalog file, the xml-commons resolver library ("resolver.jar")
must be in your path. External catalog files may be either <a
in the system classpath. <b>Due to backwards incompatible changes in
the resolver code after the release of resolver 1.0, Ant will not
support resolver.jar in version 1.0 - we expect a resolver release 1.1
to happen before Ant 1.6 gets released.</b> A separate classpath for
entity resolution may be specified inline via nested
<code>classpath</code> elements; otherwise the system classpath is
used for this as well.</p> <p>XMLCatalogs can also be nested inside
other XMLCatalogs. For example, a "superset" XMLCatalog could be made
by including several nested XMLCatalogs that referred to other,
previously defined XMLCatalogs.</p> <p>Resource locations can be
specified either in-line or in external catalog file(s), or both. In
order to use an external catalog file, the xml-commons resolver
library ("resolver.jar") must be in your path. External catalog files
may be either <a
href="http://oasis-open.org/committees/entity/background/9401.html"> href="http://oasis-open.org/committees/entity/background/9401.html">
plain text format</a> or <a plain text format</a> or <a
href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html"> href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">
XML format</a>. If the xml-commons resolver library is not found in the
classpath, external catalog files, specified in <code>catalogfiles</code>
filesets, will be ignored and a warning will be logged. In this case, however,
processing of inline entries will proceed normally.</p>
<p>Currently, only <code>&lt;dtd&gt;</code> and
XML format</a>. If the xml-commons resolver library is not found in
the classpath, external catalog files, specified in
<code>catalogfiles</code> filesets, will be ignored and a warning will
be logged. In this case, however, processing of inline entries will
proceed normally.</p> <p>Currently, only <code>&lt;dtd&gt;</code> and
<code>&lt;entity&gt;</code> elements may be specified inline; these <code>&lt;entity&gt;</code> elements may be specified inline; these
roughly correspond to OASIS catalog entry types <code>PUBLIC</code> and
<code>URI</code> respectively. By contrast, external catalog files
may use any of the entry types defined in the
roughly correspond to OASIS catalog entry types <code>PUBLIC</code>
and <code>URI</code> respectively. By contrast, external catalog
files may use any of the entry types defined in the
<a href="http://oasis-open.org/committees/entity/spec-2001-08-06.html"> <a href="http://oasis-open.org/committees/entity/spec-2001-08-06.html">
+OASIS specification</a>.</p> +OASIS specification</a>.</p>
<h3><a name="ResolverAlgorithm">Entity/DTD/URI Resolution Algorithm</a></h3> <h3><a name="ResolverAlgorithm">Entity/DTD/URI Resolution Algorithm</a></h3>


+ 7
- 3
docs/manual/install.html View File

@@ -396,10 +396,14 @@ Installing Ant / Optional Tasks</a> section above.</p>
target="_top">http://www.clarkware.com/software/JDepend.html</a></td> target="_top">http://www.clarkware.com/software/JDepend.html</a></td>
</tr> </tr>
<tr> <tr>
<td>resolver.jar</td>
<td>resolver.jar <b>after the 1.0 release</b></td>
<td>xmlcatalog datatype <em>only if support for external catalog files is desired</em></td> <td>xmlcatalog datatype <em>only if support for external catalog files is desired</em></td>
<td><a href="http://xml.apache.org/dist/commons"
target="_top">http://xml.apache.org/dist/commons</a></td>
<td><a href="http://xml.apache.org/dist/commons/"
target="_top">http://xml.apache.org/dist/commons</a> for released
versions, <a
href="http://gump.covalent.net/jars/latest/xml-commons/"
target="_top">http://gump.covalent.net/jars/latest/xml-commons/</a>
for a nightly snapshot.</td>
</tr> </tr>
</table> </table>
<br> <br>


+ 4
- 2
src/main/org/apache/tools/ant/types/resolver/ApacheCatalog.java View File

@@ -130,7 +130,8 @@ public class ApacheCatalog extends Catalog {
String systemid = normalizeURI(entry.getEntryArg(1)); String systemid = normalizeURI(entry.getEntryArg(1));


if (resolver == null) { if (resolver == null) {
Debug.message(1, "Internal Error: null ApacheCatalogResolver");
catalogManager.debug
.message(1, "Internal Error: null ApacheCatalogResolver");
} }
else { else {
resolver.addPublicEntry(publicid, systemid, base); resolver.addPublicEntry(publicid, systemid, base);
@@ -142,7 +143,8 @@ public class ApacheCatalog extends Catalog {
String altURI = normalizeURI(entry.getEntryArg(1)); String altURI = normalizeURI(entry.getEntryArg(1));


if (resolver == null) { if (resolver == null) {
Debug.message(1, "Internal Error: null ApacheCatalogResolver");
catalogManager.debug
.message(1, "Internal Error: null ApacheCatalogResolver");
} }
else { else {
resolver.addURIEntry(uri, altURI, base); resolver.addURIEntry(uri, altURI, base);


+ 3
- 3
src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java View File

@@ -114,14 +114,14 @@ public class ApacheCatalogResolver extends CatalogResolver {
// file in the ant jarfile with some default property // file in the ant jarfile with some default property
// settings. See CatalogManager.java for more details. // settings. See CatalogManager.java for more details.
// //
CatalogManager.ignoreMissingProperties(true);
CatalogManager.getStaticManager().setIgnoreMissingProperties(true);


// //
// Make sure CatalogResolver instantiates ApacheCatalog, // Make sure CatalogResolver instantiates ApacheCatalog,
// rather than a plain Catalog // rather than a plain Catalog
// //
System.setProperty("xml.catalog.className",
ApacheCatalog.class.getName());
System.getProperties().put("xml.catalog.className",
ApacheCatalog.class.getName());


// debug // debug
// System.setProperty("xml.catalog.verbosity", "4"); // System.setProperty("xml.catalog.verbosity", "4");


Loading…
Cancel
Save