Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2119

Portable war: Weld deployment on JBoss AS 7 should not require to remove the WeldListener line from the web.xml

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Critical
    • 7.1.0.Beta1
    • 7.1.0.Alpha1
    • None
    • None

    Description

      When deploying on JBoss AS 7, the web.xml can't contain this:

        <listener>
          <listener-class&gt;org.jboss.weld.environment.servlet.Listener</listener-class&gt;
        </listener>
      

      When deploying on any other app servers (JBoss AS 5.1 EAP, Tomcat 6, Jetty 6, ...) that code needs to be there.
      This makes for an unportable wars.

      Maven profiles cannot fix this in many cases:

      • You don't want to run your build 5 times to build 5 different wars. You run it once, build a generic war and use assembly descriptors to build 5 appserver specific wars from that.
      • When you're using GWT, you want run in GWT-hosted mode (which uses jetty 6) a lot. So the default web.xml needs to contain it.
      • When you're using arquillian-jboss7 (in maven and straight for your IDE), the default web.xml should not have it.
      • When you're deploying a generic war to nexus, the web.xml should contain it?

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: