I'm deploying a Spring MVC app to Heroku using jetty-runner.jar, but I get an error in the deployment. The Heroku logs only show:
Error: unable to access jarfile target/dependency/jetty-runner.jar
State changed from starting to crashed
Process exited with status 1
However, the app is working correctly if I run it locally using either:
heroku local web -f Procfile.windows
or
java -jar target\dependency\jetty-runner.jar target\*.war
The file under "target/dependency/jetty-runner.jar" is created correctly in my computer when running the "mvn package" command.
My Procfile looks like this:
web: java $JAVA_OPTS -jar target/dependency/jetty-runner.jar --port $PORT target/*.war
My pom.xml file and project code are located in: https://github.com/gfigueroa/nlp-tools-spring-heroku
ADDITIONAL DETAILS
I ran the command heroku run ls target
after deploying and it only shows the .war
file. The dependency
folder was not created when deploying, even though it was when I packaged my project locally.
heroku run ls target/dependency/jetty-runner.jar
? – codefingerls: cannot access targetdependencyjetty-runner.jar: No such file
...for some reason it's removing the backslashes. (running on Windows by the way). – Gerardo FigueroaUnable to access jarfile target/dependency/webapp-runner.jar
in the Heroku logs after deploying. – Gerardo Figueroaheroku run ls target
and it only shows the.war
file. Thedependency
folder and other folders are not created on the Heroku repository as they are locally. – Gerardo Figueroa