[ http://jira.codehaus.org/browse/MNG-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent Siveton closed MNG-2769. -------------------------------- Assignee: Vincent Siveton Resolution: Fixed Fixed this page in r610540 > Use of POM namespace is confused and confusing in both the code and the > documentation > ------------------------------------------------------------------------------------- > > Key: MNG-2769 > URL: http://jira.codehaus.org/browse/MNG-2769 > Project: Maven 2 > Issue Type: Bug > Components: Artifacts and Repositories, Documentation: Guides, > General, POM > Affects Versions: 2.0.4 > Reporter: Nigel Magnay > Assignee: Vincent Siveton > Priority: Minor > Fix For: Documentation Deficit > > > Looking at the (very good) documentation on the POM at > http://maven.apache.org/pom.html, the very first link is to the POM XSD, the > schema definition for the XML. This XSD explicitly places POMs into the > namespace targetNamespace="http://maven.apache.org/POM/4.0.0". > However, the immediately following examples of POMs do not place their > examples inside this namespace (there should be an > xmlns="http://maven.apache.org/POM/4.0.0" at the root element). > Taking a look through my local repository, it's all a bit hit-and-miss as to > whether the defined POM is in the correct namespace or not. > This is really annoying, because any tools I write that wish to use standard > XML parsers to consume the POM need, in effect, to pass a namespace manager > around, because if I wish to XPath to 'dependencies', I have to say 'is this > //pom:dependencies, or is it a "defective" POM, where it's just > //dependencies. This is bad if I'm using XSLT too (as one might to display a > 'prettyprinted' POM). > * The documentation should use the namespace > * Maven should probably warn when it meets a POM that it's compiling from > contains information in an invalid namespace. > * Maven should re-namespace POMs to be in the 'right' namespace when copying > to repositories (or perhaps modify any POM.xml that it sees which is > incorrect automatically). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira