Frage

If I create a new Java EE application in Intellij IDEA 12:

New JavaEE Web Module

Using Web Application 2.5, JSF 2.0, Application Server Glassfish 3.1.2.2, and Java EE 6:

Technology stack selections

application.xml is autogenerated with this text as its content:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
             version="6">

</application>

This application will not successfully deploy because the <module> tag is missing from application.xml:

The content of element 'application' is not complete. One of
'{"http://java.sun.com/xml/ns/javaee":application-name,
"http://java.sun.com/xml/ns/javaee":description,
"http://java.sun.com/xml/ns/javaee":display-name,
"http://java.sun.com/xml/ns/javaee":icon,
"http://java.sun.com/xml/ns/javaee":initialize-in-order,
"http://java.sun.com/xml/ns/javaee":module}' is expected.

Should the module tag have been added automatically by the IDE? If so, why hasn't it been? If not, what should I set the web-uri tag (<module><web><web-uri>) to if I want to use the default web:war exploded artifact?

War es hilfreich?

Lösung

It's a bug. If you choose 'Java Module' instead of 'JavaEE Web Module' on the first step and then select 'Web Application', 'JavaEE Application' and 'Application Server' on the second step the application.xml file should be generated properly.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top