Google应用程序引擎Maven原型HelloWorld端点项目

问题描述 投票:0回答:1

我正在尝试使用安装了google cloud插件的Eclipse在本地构建和运行此项目,但是该项目显示错误。

我已经在Github上上传了该项目。你可以在这里找到它。

Github maven based google app engine endpoints project

仅修改了Maven存储库中的一个普通项目,什么都没做。

这里是错误的屏幕截图。enter image description here

java eclipse maven google-app-engine google-cloud-endpoints
1个回答
0
投票

根据MojoHaus documentation

“ versions:display-dependency-updates扫描项目的依赖关系,生成有关具有较新版本的依赖项的报告可用。“

AND

“ versions:display-plugin-updates扫描项目的插件,然后生成有关具有较新版本的插件的报告可用,照顾了Maven版本的先决条件。“

为了解决此问题,请尝试在pom.xml文件中进行以下更改:

  1. 将版本更新为2.2.1:

    <dependency>
        <groupId>com.google.endpoints</groupId>
        <artifactId>endpoints-framework</artifactId>
        <!-- Update version -->
        <version>2.0.7</version>                         
    </dependency>
    
  2. 将版本更新到v 1.0.2,并添加您的projectID:

    <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>endpoints-framework-maven-plugin</artifactId>
        <!-- Update version -->
        <version>1.0.0</version>
        <configuration>
            <!-- add project id here -->
            <hostname>YOUR-PROJECT-ID.appspot.com</hostname>             
        </configuration>
    </plugin>
    
  3. 将App Engine Maven插件更新为最新版本。

请记住,根据Google Documentation

具有组com.google.appengine的旧App Engine Maven插件与Endpoints Frameworks插件不兼容。您必须使用新版本。

您将找到最新版本here

        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <!-- Update version here -->
            <version>1.3.1</version>
            <configuration>
                <!-- deploy configuration -->
            </configuration>
        </plugin>
© www.soinside.com 2019 - 2024. All rights reserved.