Steps needed to deploy war on Heroku
- Create war file in Maven. You can do this by referring here
- Install the Heroku Toolbelt from here
- Open the command prompt (for Windows) and type "$heroku login".
it will prompt to enter user name and password. Enter the credentials of your heroku account. - Now, to install the heroku-deploy plugin, enter the code:
"$ heroku plugins:install heroku-cli-deploy" - Now deploy the war file to the heroku server by this code:
"$ heroku deploy:war --war path_to_war_file --app app_name" - If you are in an application directory, the --app parameter can be omitted:
"$ heroku deploy:war --war path_to_war_file"
Source : stackoverflow