无法将服务推送到 PCF,在 buildpack 编译阶段错误暂存应用程序

Unable to push service to PCF, error staging application in buildpack compile phase

我正在尝试使用 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

jar 没有正确生成。我添加了这个插件并能够解决问题。

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
</plugin>