简体   繁体   中英

Java app deploying on heroku

I have troubles with my Procfile, I think. I can`t deploy my app on heroku, always getting this in logs:

2016-03-25T12:46:43.601893+00:00 heroku[web.1]: Starting process with command java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port 45751 target/*.war 2016-03-25T12:46:46.615217+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them. 2016-03-25T12:46:46.617375+00:00 app[web.1]: Error: Unable to access jarfile target/dependency/webapp-runner.jar 2016-03-25T12:46:47.819108+00:00 heroku[web.1]: Process exited with status 1 2016-03-25T12:46:47.877603+00:00 heroku[web.1]: State changed from starting to crashed

This is my Procfile: web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

This is my project on gitHub

I dont see webapp-runner.jar in your pom.

Heroku seems not able to find this dependency too.

<!--  https://devcenter.heroku.com/articles/java-webapp-runner  -->
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.3</version>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                    <goal>copy</goal>
                </goals>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>com.github.jsimone</groupId>
                            <artifactId>webapp-runner</artifactId>
                            <version>8.0.24.0</version>
                            <destFileName>webapp-runner.jar</destFileName>
                        </artifactItem>
                    </artifactItems>
                </configuration>
            </execution>
        </executions>
    </plugin>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM