This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186224 - Consider not generating application.xml for Java EE 6 EAR applications
Summary: Consider not generating application.xml for Java EE 6 EAR applications
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-16 20:21 UTC by Petr Jiricka
Modified: 2016-07-07 08:53 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-05-16 20:21:34 UTC
1. Create a new Maven-based Java EE 6 Enterprise application
2. Build it with dependencies

You will see that application.xml was generated in the output, which is not necessary for EE 6. I guess it can be suppressed (if this is easily doable in the maven-ear-plugin), what do you think David?
Comment 1 David Konecny 2010-05-17 18:45:48 UTC
What is inside generated application.xml? It should not be needed.
Comment 2 Petr Jiricka 2010-05-17 21:16:01 UTC
This is what is generated:

<?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">
  <display-name>mavenproject91-ear</display-name>
  <module>
    <ejb>mavenproject91-ejb-1.0-SNAPSHOT.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>mavenproject91-web-1.0-SNAPSHOT.war</web-uri>
      <context-root>/mavenproject91-web</context-root>
    </web>
  </module>
</application>
Comment 3 David Konecny 2010-05-17 22:55:05 UTC
The only reason why you may want application.xml is context-root. If you delete your application.xml then filename of war will be used instead which in your case will be "/mavenproject91-web-1.0-SNAPSHOT". Otherwise application.xml is not needed since EE 5.
Comment 4 Petr Jiricka 2010-05-18 10:31:43 UTC
Well, context root is often needed (and /mavenproject91-web-1.0-SNAPSHOT is an ugly context path), so application.xml may often be useful. We should still think about this - changing to TASK.
Comment 5 puce 2010-06-23 19:06:05 UTC
+1
application.xml currently also gets generated if there is only an ejb module and no web module.
Comment 6 Martin Balin 2016-07-07 08:53:33 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss