Home Deploying SpringBoot toy projects with Heroku
Post
Cancel

Deploying SpringBoot toy projects with Heroku

Setup

Specify jar source in Procfile.

1
web: java -Dserver.port=$PORT $JAVA_OPTS -jar target/demo-0.0.1-SNAPSHOT.jar

Deploy

Deployment automatically starts with Heroku CLI with the following command:

1
2
3
git add .
git commit "message"
git push heroku master

Errors in initial build

Invalid target release

1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project demo: Fatal error compiling: invalid target release: 17 -> [Help 1]

Solution

Add matching java version to force the version in system.properties in root.

1
java.runtime.version=17

Success

Heroku Initial Build

This post is licensed under CC BY 4.0 by the author.

[Paper Review] Machine Learning for Query Optimization

Adding changes to last commit