Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6036

Allow proper namespace usage for pom.xml

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.9
    • 4.0.0-alpha-9
    • Core
    • None

    Description

      When I use the following pom.xml in order to allow an XSD for my custom plugin configuration:

      <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns="http://maven.apache.org/POM/4.0.0"
               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0">
      
      ....
          <plugin>
               ....
               <m:configuration xmlns:m="http://maven.apache.org/POM/4.0.0" xmlns="http://fabric8.io/fabric8-maven-plugin">
                   <myConfig>.....</myConfig>
               </m:configuration>
          </plugin>
          ....
      </project>
      

      I get this error:

      [INFO] Scanning for projects...
      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [ERROR] Malformed POM /Users/roland/Development/docker/docker-maven-plugin/samples/data-jolokia-demo/pom.xml: Unrecognised tag: 'm:configuration' (position: START_TAG seen ...che.org/POM/4.0.0" xmlns="http://fabric8.io/fabric8-maven-plugin">... @91:117)  @ /Users/roland/Development/docker/docker-maven-plugin/samples/data-jolokia-demo/pom.xml, line 91, column 117
       @
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]
      [ERROR]   The project io.fabric8:docker-jolokia-demo:0.15-SNAPSHOT (/Users/roland/Development/docker/docker-maven-plugin/samples/data-jolokia-demo/pom.xml) has 1 error
      [ERROR]     Malformed POM /Users/roland/Development/docker/docker-maven-plugin/samples/data-jolokia-demo/pom.xml: Unrecognised tag: 'm:configuration' (position: START_TAG seen ...che.org/POM/4.0.0" xmlns="http://fabric8.io/fabric8-maven-plugin">... @91:117)  @ /Users/roland/Development/docker/docker-maven-plugin/samples/data-jolokia-demo/pom.xml, line 91, column 117 -> [Help 2]
      

      It would be awesome if the XML parser would resolve namespaces properly. Its not about adding namespace features, only for plain XML resolving (each decent XML these days should be able to do this transparently).

      Except for https://cwiki.apache.org/confluence/display/MAVEN/Moving+forward+with+the+POM+data+model I couldn't find any statement when namespaces are supported or tolerated. Are there any plans for this (and maybe also to relax the schema constraints on the <configuration> tag) ?

      See also https://github.com/rhuss/poblano/issues/19 for a use case.

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              rhuss Roland Huss
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: