我正在尝试使用cf push
命令将服务推送到PCF。我收到以下错误:
-----> Java Buildpack v4.16.1 (offline) | https://github.com/cloudfoundry/java-buildpack.git#41b8ff8
[Buildpack] ERROR Finalize failed with exception #<RuntimeError: No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. >
No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
Failed to compile droplet: Failed to run finalize script: exit status 1
Exit status 223
Cell 73976a3c-ee0d-4c45-8067-55f73fc1b90a stopping instance 13e76fc9-87be-40be-a3b7-0f0cb1efc55f
Cell 73976a3c-ee0d-4c45-8067-55f73fc1b90a destroying container for instance 13e76fc9-87be-40be-a3b7-0f0cb1efc55f
Cell 73976a3c-ee0d-4c45-8067-55f73fc1b90a successfully destroyed container for instance 13e76fc9-87be-40be-a3b7-0f0cb1efc55f
Error staging application: App staging failed in the buildpack compile phase
FAILED
我的yml文件中包含以下内容:
applications:
- name: Someapplication
buildpack: java_buildpack_offline
memory: 1G
path: target/someapp-SNAPSHOT.jar
instances: 1
env:
SPRING_PROFILES_ACTIVE: env1
答案 0 :(得分:0)
jar不能正确生成。我添加了此插件,并能够解决该问题。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>