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

**URL:** <https://discuss.gradle.org/t/ear-plugin-deployment-descriptor-wrong-xml-namespace-for-java-ee-7/1534>\
**Category:** Old Forum Archive\
**Created:** [July 9, 2014, 7:16am UTC](https://discuss.gradle.org/t/ear-plugin-deployment-descriptor-wrong-xml-namespace-for-java-ee-7/1534 "2014-07-09T07:16:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunil\_D\_Monte](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@Sunil\_D\_Monte](https://discuss.gradle.org/u/Sunil_D_Monte)\
**Post date:** [July 9, 2014, 7:16am UTC](https://discuss.gradle.org/t/ear-plugin-deployment-descriptor-wrong-xml-namespace-for-java-ee-7/1534/1 "2014-07-09T07:16:00Z")

</div>

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

```gradle
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](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://xmlns.jcp.org/xml/ns/javaee/)”: [http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html](http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html)

---

<div class="post-metadata">

**Author:** ![Sunil\_D\_Monte](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@Sunil\_D\_Monte](https://discuss.gradle.org/u/Sunil_D_Monte)\
**Post date:** [July 9, 2014, 7:32am UTC](https://discuss.gradle.org/t/ear-plugin-deployment-descriptor-wrong-xml-namespace-for-java-ee-7/1534/2 "2014-07-09T07:32:00Z")

</div>

PS: the “schemaLocation” attribute is missing too.

This is what is being generated:

```gradle
<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:

```gradle
<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"
    >

```

---

<div class="post-metadata">

**Author:** ![Sunil\_D\_Monte](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@Sunil\_D\_Monte](https://discuss.gradle.org/u/Sunil_D_Monte)\
**Post date:** [July 9, 2014, 7:33am UTC](https://discuss.gradle.org/t/ear-plugin-deployment-descriptor-wrong-xml-namespace-for-java-ee-7/1534/3 "2014-07-09T07:33:00Z")

</div>

PS: the “schemaLocation” attribute is missing too.

This is what is being generated:

```gradle
<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:

```gradle
<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"
    >

```
