java应用程序在heroku上的部署

x8goxv8g  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(318)

我想我的程序文件有问题。我无法在heroku上部署我的应用程序,总是在日志中记录:
2016-03-25t12:46:43.601893+00:00 heroku[web.1]:使用命令启动进程 java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port 45751 target/*.war 2016-03-25t12:46:46.615217+00:00应用程序[web.1]:基于dyno大小设置java工具选项默认值。自定义设置将覆盖它们。2016-03-25t12:46:46.617375+00:00应用程序[web.1]:错误:无法访问jarfile target/dependency/webapp-runner.jar 2016-03-25t12:46:47.819108+00:00 heroku[web.1]:进程退出,状态为1 2016-03-25t12:46:47.877603+00:00 heroku[web.1]:状态从开始更改为崩溃
这是我的procfile:web:java$java\u opts-jar target/dependency/webapp-runner.jar--port$port target/*.war
这是我在github上的项目

zvokhttg

zvokhttg1#

我在你的pom中没有看到webapp-runner.jar。
heroku似乎也找不到这种依赖性。

<!--  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>

相关问题