Java heroku无法找到或加载主类
我已经被困了好几天了,对这个错误一无所知 heroku日志Java heroku无法找到或加载主类,java,maven,heroku,maven-3,Java,Maven,Heroku,Maven 3,我已经被困了好几天了,对这个错误一无所知 heroku日志 2017-05-19T18:11:44.288620+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=40569 -jar target/*.jar` 2017-05-19T18:11:46.509758+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno siz
2017-05-19T18:11:44.288620+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=40569 -jar target/*.jar`
2017-05-19T18:11:46.509758+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2017-05-19T18:11:46.513097+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8
2017-05-19T18:11:46.599805+00:00 app[web.1]: Error: Could not find or load main class SpringBootWebApplication
2017-05-19T18:11:46.770670+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-19T18:11:46.753975+00:00 heroku[web.1]: Process exited with status 1
2017-05-19T18:12:05.851023+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cleverzone.herokuapp.com request_id=bfe2c1c5-2f6d-4062-910d-2b01a597406e fwd="197.49.77.195" dyno= connect= service= status=503 bytes= protocol=https
当我尝试在heroku服务器上运行bash并在文件上运行jar tf时
这是主要课程
太大了,所以我选了那些重要的和专业的
guru/springframework/SpringBootWebApplication.class
META-INF/maven/
META-INF/maven/guru.springframework/
META-INF/maven/guru.springframework/CleverZone/
META-INF/maven/guru.springframework/CleverZone/pom.xml
META-INF/maven/guru.springframework/CleverZone/pom.properties
我的Maven代码
it is really big so i put only the maven part
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>SpringBootWebApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
web: java -Dserver.port=$PORT -jar target/*.jar
我的程序文件
it is really big so i put only the maven part
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>SpringBootWebApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
web: java -Dserver.port=$PORT -jar target/*.jar
如何在本地运行应用程序?另外,为什么不使用像这样的SpringBoot Maven插件使用sts ide?我选择了主类,我认为问题出在我的Maven文件中?@codefinger我已经尝试了该Maven插件,现在它让我遇到了更老的错误“no main manifest attribute”如何在本地运行应用程序,为什么不使用sts ide像这样使用SpringBoot Maven插件呢?我选择了主类,我认为问题出在我的Maven文件中?@codefinger我已经尝试过该Maven插件了,现在它让我遇到了更老的错误“no main manifest attribute”