[ 
https://issues.apache.org/jira/browse/MNG-8537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937603#comment-17937603
 ] 

Elliotte Rusty Harold commented on MNG-8537:
--------------------------------------------

Thinking about this further, it occurs to me that the use of XML tools is a 
strong reason why XML namespaces should not change. Changing the namespace 
breaks any XML-based tools that have already been written to support the old 
namespace. 

Example: suppose I used non-Maven based XML tools to read dependency graphs out 
of poms using XPath and/or XSLT. (Hypothetical because I tried this and it 
didn't work precisely because of the pre-existing namespace issues.) Now the 
namespace changes in new poms. Now my code no longer works on any new pom, and 
likely returns incorrect results. The code would have worked had new elements 
been added and others removed that did not directly affect dependencies. That 
is, changing the namespace is a global breakage
 for existing code.

http://maven.apache.org/POM/4.0.0 is the namespace and should remain so for the 
foreseeable future. We can't fix what's already been published to Maven 
Central, but we can stop the bleeding. 



> Maven 4 namespace should not change
> -----------------------------------
>
>                 Key: MNG-8537
>                 URL: https://issues.apache.org/jira/browse/MNG-8537
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Elliotte Rusty Harold
>            Assignee: Elliotte Rusty Harold
>            Priority: Blocker
>
> Just noticed that Maven 4 has a new namespace URL. The old namespace was
>  
> [http://maven.apache.org/POM/4.0.0]
>  
> The new one is
>  
> [http://maven.apache.org/POM/4.1.0]
>  
> Putting version numbers in namespaces is a known XML antipattern because it 
> makes it extremely difficult and inconvenient to write tools that process 
> both, even when they are much the same. XSLT, DOM, XQuery, JDOM, etc. — 
> really any XML aware tool — is going to have problems with this.
> Model version 4.1.0 is not a new and different schema that completely breaks 
> with the past. Most old elements from 4.0.0 are still present and still mean 
> exactly the same thing: groupId, artifactId, name, dependency, and most 
> others. There are new elements but that doesn't imply a new namespace. Adding 
> a new namespace is asserting that all the elements are different.
> IMHO Maven 4 should not change the namespace URL.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to