英文:
Heroku deploy JAVA Maven dyno not running
问题
我有一个JAVA应用程序,在本地运行时完美运行。我使用IntelliJ IDEA IDE和Heroku部署配置,使用以下命令 heroku:deploy
,我还有一个带有以下片段的pom.xml文件:
<build>
<plugins>
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>3.0.3</version>
<configuration>
<appName>discord-bot-uskompuf</appName>
<processTypes>
<web>java $JAVA_OPTS -Dserver.port=$PORT -cp target/classes:target/dependency/* Bot</web>
</processTypes>
</configuration>
</plugin>
</plugins>
</build>
我的启动代码是 <web>java $JAVA_OPTS -Dserver.port=$PORT -cp target/classes:target/dependency/* Bot</web>
我的主类名为Bot,当我尝试编译并部署到Heroku时,应用程序成功编译并上传到Heroku,我收到了构建成功的消息。在我的Heroku仪表板上,我可以看到我的dyn0 web java $JAVA_OPTS -Dserver.port=$PORT -cp target/classes:target/dependency/* Bot
,但它总是显示为关闭状态。查看Heroku日志只显示我的构建成功的消息。
我在这里漏掉了什么?
英文:
I have a JAVA application which works perfectly when running locally. I am using IntelliJ IDEA IDE and the Heroku deploy configuration with the following command heroku:deploy
, I also have a pom.xml file with the following snippet:
<build>
<plugins>
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>3.0.3</version>
<configuration>
<appName>discord-bot-uskompuf</appName>
<processTypes>
<web>java $JAVA_OPTS -Dserver.port=$PORT -cp target/classes:target/dependency/* Bot</web>
</processTypes>
</configuration>
</plugin>
</plugins>
</build>
My starting code is <web>java $JAVA_OPTS -Dserver.port=$PORT -cp target/classes:target/dependency/* Bot</web>
My main class is named Bot, when I go to compile to Heroku deploy the application successfully compiles and gets uploaded to Heroku and I receive a build success message. On my Heroku dashboard, I can see my dyn0 web java $JAVA_OPTS -Dserver.port=$PORT -cp target/classes:target/dependency/* Bot
however it is always listed as OFF. Looking at Heroku logs just shows that my build has succeeded.
What am I missing here?
答案1
得分: 3
我必须在Heroku上启用动态资源。
英文:
I had to enable dyno on heroku
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论