5 Replies Latest reply on Jul 23, 2015 9:00 AM by ctomc

    Context-Root of WAR cannot be changed if WAR is not in root of EAR

    hades32

      This was closed on GitHub, but I think that this is a bug.

       

      I created a

       

      Working example: (snippets from META-INF/application.xml in an EAR)

        <module id="wftest.server-wftest.server.backend.web">
          <web>
            <web-uri>wftest.server-wftest.server.backend.web-1.31.0-buildr.war</web-uri>
            <context-root>/eu/backend</context-root>
          </web>
        </module>
      


      NOT working example: (the WAR file was moved into /war of course beforehand)

        <module id="wftest.server-wftest.server.backend.web">
          <web>
            <web-uri>war/wftest.server-wftest.server.backend.web-1.31.0-buildr.war</web-uri>
            <context-root>/eu/backend</context-root>
          </web>
        </module>
      


      The second form is the default of what buildr (https://buildr.apache.org/packaging.html#ear) produces. It can be worked around with something like `, :path=>''`, but why the limitation? For me this looks like a bug.

       

      Tested with Wildfly 9.0 Final