错误 Finalize 失败,出现异常 #<RuntimeError:没有容器可以运行此应用程序。请确保您已推送有效的 JVM 工件或

PAA*_*PAA 3 pcf pcfdev

Spring Boot & SOAP我在 上部署项目时遇到以下错误Pivotal Cloud Foundry(PCF)。我在用Spring Boot v2.2.2.RELEASE。?

Staging app and tracing logs...
   Downloading java_buildpack_offline...
   Downloaded java_buildpack_offline
   Cell f56fc3fb-e622-43a8-96cf-9be14d95c348 creating container for instance f847285e-0bb1-4015-b01c-4b0d84f992bf
   Cell f56fc3fb-e622-43a8-96cf-9be14d95c348 successfully created container for instance f847285e-0bb1-4015-b01c-4b0d84f992bf
   Downloading app package...
   Downloaded app package (473.1K)
   [1m[31m----->[0m[22m [1m[34mJava Buildpack[0m[22m [34mv4.26[0m [34m(offline)[0m | https://github.com/cloudfoundry/java-buildpack.git#e06e00b
   [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 stopping instance
   Cell destroying container for instance 
   Cell successfully destroyed container for instance 
Error staging application: App staging failed in the buildpack compile phase
Run Code Online (Sandbox Code Playgroud)

awg*_*tek 6

repackage通过在 Maven 构建部分中向 Spring Boot Maven 插件添加目标来解决此问题:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.2.4.RELEASE</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)