Create and deploy .WAR files

Approach

  1. From the Blu Age EC2 instance, open the windows PowerShell. You can locate the icon on the task bar (highlighted below).

PowerShell icon

  1. Run the following steps once the command-line shell was launched successfully.
    • Go to the pom folder for the application: cd C:\ws\bluage\Murach-Forward-pom
    • Build the project with command: mvn install

PowerShell command prompt

mvn install command takes up to a minute or two to create the .war files. Please be patient!

PowerShell mvn Build Successful

  1. The build process creates two .WAR files:
    • C:\ws\bluage\Murach-Forward-pom\Murach-Forward-web\target\Murach-Forward-web-1.0.0.war
    • C:\ws\bluage\Murach-Forward-pom\Murach-Forward-service\target\Murach-Forward-service-1.0.0.war

Web & Services .WAR files

  1. Login to the Tomcat manager to deploy the WAR files at url: http://127.0.0.1:8080/manager

    • Use the credentials, admin as the username and verysecret as the password (Alternatively, credentials are stored in C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\tomcat-users.xml)

Tomcat Sign in

  1. Under ‘Deploy directory or WAR file located on server’ (bottom part of the below screen shot).

    • Enter Context Path as: /Murach-Forward
    • Enter WAR or Directory path as: C:\ws\bluage\Murach-Forward-pom\Murach-Forward-web\target\Murach-Forward-web-1.0.0.war
    • Click Deploy (DO NOT click more than once)

    Note: After few seconds, you will notice “OK - Deployed application at context path [/Murach-Forward]” on top of the Tomcat applicaiton manager screen.

Deploy Murach-Forward

  1. Under ‘Deploy directory or WAR file located on server’ (bottom part of the below screen shot).

    • Enter Context Path as: /Murach-Forward-service
    • Enter WAR or Directory path: C:\ws\bluage\Murach-Forward-pom\Murach-Forward-service\target\Murach-Forward-service-1.0.0.war
    • Click Deploy (DO NOT click more than once)

    Note: After few seconds, you will notice “OK - Deployed application at context path [/Murach-Forward-service]” on top of the Tomcat applicaiton manager screen.

Deploy Murach-Forward-service

  1. Both the .WAR files should be deployed successfully.

Deploy .WAR files directory