EAR Plugin deployment descriptor: wrong XML namespace for Java EE 7?


(Sunil D'Monte) #1

I’m trying to generate my EAR’s application.xml via the EAR Plugin, using code like the following:

deploymentDescriptor {
    version = "7"
    initializeInOrder = true
    webModule("module1.war", "module1")
    webModule("module2.war", "module2")
    ...
}

This works fine, but the only problem I see is that the XML namespace in the generated “application.xml” file is the old “http://java.sun.com/xml/ns/javaee” namespace. According to this link, for Java EE 7, the namespace has been changed to “http://xmlns.jcp.org/xml/ns/javaee/”: http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html


(Sunil D'Monte) #2

PS: the “schemaLocation” attribute is missing too.

This is what is being generated:

<application
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     version="7"
    >

And this is what ought to be generated:

<application
     xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     version="7"
    >

(Sunil D'Monte) #3

PS: the “schemaLocation” attribute is missing too.

This is what is being generated:

<application
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     version="7"
    >

And this is what ought to be generated:

<application
     xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     version="7"
    >