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

Brian E Fox commented on MNG-6830:
----------------------------------

After chatting in slack to find some good examples:

 

"This one is bad: 
[https://github.com/apache/maven/blob/master/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml],
 this one is good: 
[https://github.com/apache/maven/blob/2caed6218a5ec0a0b7fce2975743331e5ec76c89/pom.xml#L22]";

 

I'll say that in central hardly any are going to have the namespace correctly 
set. If someone has the xsd references, they are better than most, but it's 
hard to find any like the good example. Warning on no namespace seems pointless 
because EVERYTHING is going to generate a warn.

 

> Warn on missing namespace
> -------------------------
>
>                 Key: MNG-6830
>                 URL: https://issues.apache.org/jira/browse/MNG-6830
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Elliotte Rusty Harold
>            Priority: Minor
>
> We allow pom.xml files with no namespace and reject pom.xml files that use 
> prefixed local names that are correctly namespaced.
> As step 1 to getting to a release where we can fix this, emit a warning when 
> we encounter a non-namespaced pom.xml such as this:
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <packaging>war</packaging>
>   <version>0.1.0-SNAPSHOT</version>
>   <groupId>c.g</groupId>
>   <artifactId>mvn25</artifactId>
>   <properties>
>     <appengine.maven.plugin.version>2.2.0</appengine.maven.plugin.version>
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
>     <maven.compiler.source>1.8</maven.compiler.source>
>     <maven.compiler.target>1.8</maven.compiler.target>
>     <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
>   </properties>
> </project>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to