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

时间:2016-05-25 20:43:40

标签: google-app-engine maven-3 maven-plugin gcloud

当我运行mvn clean编译时,我在我的项目中获取“target”文件夹下的文件。之后我运行mvn gcloud:运行并且我收到此错误。

 [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_project\HelloSpringWorld\target/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 to指向“target”文件夹而不是“target / 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:\Users\RPalliyalil\AppData\Local\Google\Cloud SDK\google-cloud-sdk</gcloud_directory>
                    <verbosity>debug</verbosity>
                    <staging_directory>D:\Maven_project\HelloSpringWorld\target</staging_directory>
                </configuration>

            </plugin>
        </plugins>
    </build>

1 个答案:

答案 0 :(得分:3)

您是否遵循指南? https://github.com/GoogleCloudPlatform/gcloud-maven-plugin

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

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