Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
heroku-cli-deploy
Advanced tools
This project is a Heroku CLI plugin for deploying WAR files. It can also be used to deploy executable JAR files.
If you are using Maven, see the Heroku Maven plugin, which is a more robust method of WAR and JAR file deployment.
You will require the following:
Run the following command to confirm:
$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
heroku-deploy
CLI pluginUse the following command to install the heroku-deploy
plugin:
$ heroku plugins:install heroku-cli-deploy
Use the following command to create a new application on Heroku
$ heroku create
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 war:deploy <path_to_war_file> --app <app_name>
Uploading my-app.war....
---> Packaging application...
- app: my-app
- including: webapp-runner.jar
- including: my-app.war
---> Creating build...
- file: slug.tgz
- size: 1MB
---> Uploading build...
- success
---> Deploying...
remote:
remote: -----> Fetching custom tar buildpack... done
remote: -----> JVM Common app detected
remote: -----> Installing OpenJDK 1.8... done
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing... done, 50.3MB
remote: -----> Launching... done, v5
remote: https://my-app.herokuapp.com/ deployed to Heroku
remote:
---> Done
If you are in an application directory, you can use the following command instead:
heroku deploy:war <path_to_war_file>
Use the following command to open the application on the browser:
heroku open
You can learn how to customize the deploy (such as including files and setting Tomcat options) in Configuring WAR Deployment with the Heroku Toolbelt.
You can also use this tool to deploy executable JAR files. To do so, run a command like this:
$ heroku deploy:jar <path_to_jar> --app <appname>
Available options include:
-j, --jar FILE # jar or war to deploy
-v, --jdk VERSION # 7 or 8. defaults to 8
-o, --options OPTS # options passed to the jar file
-i, --includes FILES # list of files to include in the slug
You can customize the command used to run your application by creating a Procfile
in the same directory as your run the heroku deploy:jar
command. For example:
web: java -cp my-uberjar.jar com.foo.MyMain opt1 opt2
You can view your current Procfile command by running heroku ps
.
You can run your WAR file locally the way it is run on Heroku by executing this command:
$ heroku war:run <path_to_war>
To run the tests:
$ bash bin/test
To update the heroku-deploy-complete.jar:
$ bash update.sh <version>
For a list of versions see Maven Central.
To publish this plugin:
$ npm version <version>
$ npm publish
FAQs
Deploy WAR and JAR files to Heroku
We found that heroku-cli-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 113 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.