gcloud:运行错误 应用程序不存在



当我运行 mvn 干净编译时,我在项目中的"目标"文件夹下获取文件。在此之后,当我运行 mvn gcloud:run 并收到此错误时。

 [ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.10
6.v20160420:run (default-cli) on project HelloSpringWorld: The application direc
tory does not exist : D:Maven_projectHelloSpringWorldtarget/HelloSpringWorld-
0.1.0 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

我的目标文件夹中没有任何"HelloSpringWorld-0.1.0"文件夹。我不知道它为什么指向它。如何更改 gcloud:run 以指向"目标"文件夹而不是"目标/HelloSpringWorld-0.1.0"?

我的pom.xml,用于gcloud插件

<

build>
         <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.google.appengine</groupId>
                <artifactId>gcloud-maven-plugin</artifactId>
                <version>2.0.9.106.v20160420</version>
                <configuration>
                    <gcloud_directory>C:UsersRPalliyalilAppDataLocalGoogleCloud SDKgoogle-cloud-sdk</gcloud_directory>
                    <verbosity>debug</verbosity>
                    <staging_directory>D:Maven_projectHelloSpringWorldtarget</staging_directory>
                </configuration>
            </plugin>
        </plugins>
    </build>

你遵循指南了吗? https://github.com/GoogleCloudPlatform/gcloud-maven-plugin

根据该指南,您应该在实际运行mvn gcloud:run之前运行mvn clean install。还要验证您有一个 WAR 项目,即具有 <packaging>war</packaging> 的项目。

如果正确执行此操作,package阶段 maven-war-plugin 将生成文件夹/target/${project.build.finalName} 。在您的情况下,这意味着 /target/HelloSpringWorld-0.1.0 .

最新更新