Thanks Tony for your remarks!

So what you are saying is that we can drop the namespace requirement if we make sure to check the pom version instead? Would something like the following do:

<xs:element name="pomVersion">
<xs:simpleType>
  <xs:restriction base="xs:string">
    <xs:enumeration value="3"/>
  </xs:restriction>
</xs:simpleType>
</xs:element>



Another general question: I noticed that maven-project.xsd defines a minOccurs="0" attribute for _all_ elements except the root (project). That means that a completely empty pom is perfectly valid? I would have thought that there should be a minimum set of elements that make up a valid pom. It would also facilitate the tracking of some obscure error messages that we sometimes get when a plugin tries to access an inexistent pom element.

Thanks again,
-Lukas



Anthony B. Coates wrote:
Since POM instances identify their POM version, there is a case that the namespace does not need to change with every new POM version. However, it sounds to me like there is a problem with the way "pom:validate" is conceived.

If you are validate a POM instance for an older version of the POM, you should be using the older version of the POM Schema. I expect/assume/hope that Maven takes note of the POM version when it reads a POM instance, and doesn't just assume that any POM instance can be assumed to be compatible with the latest POM version. The same approach should apply to "pom:validate".

If you do remove the namespace, I hope that each Schema version will strictly check the value of the POM version, so that you still get a sanity check that you are using the right Schema version for the right POM version.

Cheers, Tony.

On Tue, 04 Oct 2005 16:41:00 +0100, Lukas Theussl <[EMAIL PROTECTED]> wrote:



Carlos Sanchez wrote:

Hi,
 I've poms without namespace which are working under 1.1b2, why are you
saying it's required?


Sure they work but they don't validate. The problem that I have currently is that running 'pom:validate' on a pom without namespace declaration seems to hang the msv verifier. This is probably a bug in msv, but I find it quite inconvenient anyway to enforce this namespace declaration.

Cheers,
Lukas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to