maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Huss (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-6036) Allow proper namespace usage for pom.xml
Date Sun, 05 Jun 2016 09:25:59 GMT

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

Roland Huss commented on MNG-6036:
----------------------------------

When Modello in its Xpp3 plugin (which generates the XML reader for Mave POMs) ignore Namespaces
in the XML declaration (https://github.com/codehaus-plexus/modello/blob/master/modello-plugins/modello-plugin-xpp3/src/main/java/org/codehaus/modello/plugin/xpp3/Xpp3ReaderGenerator.java#L583)
then I wonder why it shouldn't ignore namespace prefixes, on tags, too ? 

IMO this would be consistent behaviour and it would solve the issue here, too.


> Allow proper namespace usage for pom.xml
> ----------------------------------------
>
>                 Key: MNG-6036
>                 URL: https://issues.apache.org/jira/browse/MNG-6036
>             Project: Maven
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3.9
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
> Maven home: /usr/local/Cellar/maven/3.3.9/libexec
> Java version: 1.8.0_40, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac"
>            Reporter: Roland Huss
>
> When I use the following pom.xml in order to allow an XSD for my custom plugin configuration:
> {code:xml}
> <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>
> {code}
> I get this error:
> {code}
> [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]
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message