Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
N/A
Description
The documentation example for the archetype-metadata.xml file uses a namespace name, whose URI has the http protocol defined while the "real-life" XML Schema for archetype-metadata.xml uses the https protocol.
This issue appears at http://maven.apache.org/guides/mini/guide-creating-archetypes.html#2-create-the-archetype-descriptor in the archetype descriptor example's namespace on lines 2 and 3:
1. <archetype-descriptor 2. xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3. xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd" name="quickstart">
The XSD can be found at https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd
This breaks validation, as soon as a user copies and pastes the example as a starting point for their own Archetype Descriptor.
Remark:
XML namespace URIs are not meant to be dereferenced to an actual document. They are just a convention to produce a unique ID, which is easier for a human to remember, than, let's say a UUID. However, once set, they can not be legally changed without producing a completely new namespace! So http://example.org/ and http://example.org are two distinct namespaces (note the trailing slash). Same stands for https://example.org and http://example.org. When hashed, both strings would lead to different results, of course.
I don't know the history of this schema file, but in case, the namespace URI had once been using http instead of https, then this would render the current XSD incompatible with any previous versions.