1 Reply Latest reply on Jan 22, 2016 10:26 AM by fbricon

    Multiple WAR-s

    aleshiukas

      Hi,

       

      I have same code for multiple JAR's (running with different config's).
      Now I migrated it to Dynamic Web Project and want to build different WAR's.

       

      Code and libs will be the same, except:
      - WAR filename will be different
      - web.xml is different (different context name, and config file context parameter).

       

      How I do now is manually:
      - Change folder of source web.xml in Deployment assembly
      - Specify different WAR filename

       

      Is there any simpler way to do this automatically (without ANT etc scripting) ?

        • 1. Re: Multiple WAR-s
          fbricon

          Using stock Dynamic Web projects, I don't think this is doable, unless you create as many Web Projects as configurations you need, and all the common code should be kept in a common utility (jar) project, referenced by all these web projects.

           

          If you're using (or willing to use Maven), then it's possible to create different profiles, each pointing at a different configuration, while keeping only one web project. The caveat is you'll only be able to have 1 active configuration/deployment at a time. If that's what you're looking for I can go into more detailed explanations.