6 Replies Latest reply on Oct 27, 2016 10:07 AM by rlmartinez

    Deployment - Multiple war files with same name

    rlmartinez

      I'm attempting to deploy multiple war files with the same name but different directory locations and context. For example, .../deployments/bob/home.war ; .../deployments/sue/home.war  ; .../deployments/bill/home.war ; etc... However, WildFly seems to require unique war file names even though the deployments are in different directories with different contexts. Does anyone know how I might be able to achieve this? Thank you.

        • 1. Re: Deployment - Multiple war files with same name
          jaikiran

          How exactly are you deploying these and which exact version of WildFly? Are you creating different file deplyoment scanners in the subsytem configs or is it some other way? Do you have any stacktraces of exceptions you run into?

          • 2. Re: Deployment - Multiple war files with same name
            rlmartinez

            Deploying by uploading .war files to subdirectories under .../deployments.

            Using only one deployment scanner (that is all I want).

            No exceptions generated. The WildFly log shows the scanner 'alternating' deployments. That is, it cycles the active deployment among the war files of the same name.

            After posting the question, I have read that Wildly requires unique war file names which indicates that I am not able to deploy multiple war files with the same name. Oh well.

            • 3. Re: Deployment - Multiple war files with same name
              ehugonnet

              You have to deploy using the jboss-cli or the webconsole and specify a runtime-name for each of your war file. The you can use the same file name.

              Specifying the runtime-name can't be done using the deployment scanner, it will default to the file name.

              1 of 1 people found this helpful
              • 4. Re: Deployment - Multiple war files with same name
                rlmartinez

                Thanks for the response. For my 'use case' I am unable to have multiple users use the jboss-cli or the webconsole for deployments.

                 

                Each user on the system has access to a subdirectory below .../deployments. The user manages their deployments via the .war, .deployed, .undeployed files in their subdirectories.

                 

                I appreciate your suggestions.

                • 5. Re: Deployment - Multiple war files with same name
                  ehugonnet

                  One solution would be to remove the deployment scanner for the deployments folder and have as many deployment scanners as there are sub-folders. Something like

                   

                  /subsystem=deployment-scanner/scanner=default:remove()
                  /subsystem=deployment-scanner/scanner=team_a:add(auto-deploy-exploded=false, auto-deploy-zipped=true, path="deployments/team_a" , relative-to="jboss.server.base.dir", scan-interval=5000, scan-enabled=true)
                  
                  • 6. Re: Deployment - Multiple war files with same name
                    rlmartinez

                    Great idea. I will try that. Thanks again.