You can use jcabi-heroku-maven-plugin , which automates the entire deployment process:
<plugin> <groupId>com.jcabi</groupId> <artifactId>jcabi-heroku-maven-plugin</artifactId> <version>0.4.1</version> <configuration> <name>my-test-app</name> <artifacts> <artifact>com.example:example-app:jar::${project.version}</artifact> </artifacts> <procfile>web: java -Xmx256m -jar ./example-app.jar \${PORT}</procfile> </configuration> <executions> <execution> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin>
In addition, you need to deploy the artifact (JAR / WAR) to your repository so that Maven inside Heroku can load it during deployment.
yegor256
source share