You will require the following:
- Install the Heroku toolbelt
- Heroku account
Use the following command to install the heroku-deploy
plugin:
### Git URL needs to be finalized
heroku plugins:install https://github.com/heroku/heroku-deploy
Note: If you have a previous version of Heroku client, please ensure you update to the latest version. You should have ver 2.24.0
of the Heroku command line. To verify your version, type the following command:
$ heroku version
2.24.0
or
C:\>heroku version
2.24.0
Use the following command to create a new application on Heroku
heroku create --stack cedar [app_name]
You can use any method to generate a WAR file. You can use maven
,ant
or simply export your application from your IDE as a WAR file.
The only requirement is that the WAR file is a standard Java web application and adheres to the standard web application structure and conventions.
In order to deploy your WAR use the following command:
heroku deploy:war --war <absolute_path_to_war_file> --app <app_name>
Note: app_name
should be in all lowercase.
If you are in an application directory, you can use the following command instead::
heroku deploy:war --war <absolute_path_to_war_file>
Use the following command to open the application on the browser:
heroku open