无法执行目标com.google.appengine:appengine-maven-plugin:1.9.67:devserver [英] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver

查看:91
本文介绍了无法执行目标com.google.appengine:appengine-maven-plugin:1.9.67:devserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我在devserver上启动我的maven项目并更新调用时遇到问题. 我将我的Maven项目与Google Cloud Engine一起运行,但是我遇到了这个问题,无法启动我的服务器. 这是我的pom.xml:

Hey i have a problem starting my maven project on devserver and update calls. I buils my maven project to run with google cloud engine, but im getting this issue and cant start my server. This is my pom.xml :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>

  <groupId>trainingBuddyServer</groupId>
  <artifactId>Training-Buddy-Server</artifactId>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
    <archiveClasses>true</archiveClasses>
  </properties>

  <prerequisites>
    <maven>3.5</maven>
  </prerequisites>

  <dependencies>
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-1.0-sdk</artifactId>
      <version>1.9.67</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <type>jar</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>22.0</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.objectify</groupId>
      <artifactId>objectify</artifactId>
      <version>5.1.17</version>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-1.0-sdk</artifactId>
      <version>1.9.67</version>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-endpoints</artifactId>
      <version>1.9.67</version>
    </dependency>
    <dependency>
      <groupId>com.google.endpoints</groupId>
      <artifactId>endpoints-framework</artifactId>
      <version>2.0.7</version>
    </dependency>
    <dependency>
      <groupId>com.google.endpoints</groupId>
      <artifactId>endpoints-management-control-appengine</artifactId>
      <version>1.0.3</version>
    </dependency>
    <dependency>
      <groupId>com.google.endpoints</groupId>
      <artifactId>endpoints-framework-auth</artifactId>
      <version>1.0.3</version>
    </dependency>

    <!-- Test Dependencies -->
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-testing</artifactId>
      <version>1.9.67</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-stubs</artifactId>
      <version>1.9.67</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-tools-sdk</artifactId>
      <version>1.9.67</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>0.33</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <!-- for hot reload of the web application-->
    <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
    <plugins>
      <plugin>
        <groupId>com.google.appengine</groupId>
        <artifactId>appengine-maven-plugin</artifactId>
        <version>1.9.67</version>
        <configuration>
          <appId>trainingbuddy-221215</appId> <!-- Override appengine-web.xml <project> -->
          <version>1</version>
          <fullScanSeconds>1</fullScanSeconds>
          <retainUploadDir>true</retainUploadDir>
        </configuration>
      </plugin>

      <plugin>
           <groupId>com.google.cloud.tools</groupId>
           <artifactId>appengine-maven-plugin</artifactId>
           <version>1.3.1</version>
           <configuration>
              <deploy.promote>true</deploy.promote>
              <deploy.stopPreviousVersion>true</deploy.stopPreviousVersion>
            </configuration>
        </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.5</version>
                </requireMavenVersion>
                <requirePluginVersions>
                   <message>Best Practice is to always define plugin versions!</message>
                   <banLatest>true</banLatest>
                   <banRelease>true</banRelease>
                   <phases>clean,deploy,verify,appengine:run,appengine:deploy,appengine:update,appengine:devappaserver,site</phases>
                </requirePluginVersions>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

我认为pom文件有问题,因为错误表明它找不到此元素"com.google.appengine:appengine-maven-plugin:1.9.67:devserver".所以这是错误的,如果有帮助的话:

I think its something wrong with pom file, because error says that it cant find this element "com.google.appengine:appengine-maven-plugin:1.9.67:devserver". So this is teh error if it will help :

[INFO] --- appengine-maven-plugin:1.9.67:devserver (default-cli) @ Training-Buddy-Server ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.212 s
[INFO] Finished at: 2018-11-01T23:37:27+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver (default-cli) on project Training-Buddy-Server: The parameters 'project' for goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver are missing or invalid -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException

也许有人知道如何解决此问题?

Maybe someone know how to fix this?

推荐答案

添加

    <project>YOUR PROJECT ID</project>

确实也为我解决了这个问题,但是我没有使用更新的gclod maven插件,而是使用了较旧的appengine插件:

Indeed solves it for me also, however I'm not using the newer gclod maven plugin but the older appengine one:

    <groupId>com.google.cloud.tools</groupId>
    <artifactId>appengine-maven-plugin</artifactId>

与我的

    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>

在某个时候,我可能应该继续使用gcloud插件,但是现在我没有时间.

At some point I should probably move on to the gcloud plugin but right now I haven't got time.

旧的appengine插件还可以与(未记录)项目"配置标记一起使用.自从Google收到(开始的示例)不起作用.另外,如果从现在起需要它,我们应该已经获得了一些信息.

The old appengine plugin also works with the (undocumented) "project" configuration tag. Really confusing and also poor work by google since their getting (started examples) doesn't work, from 1.9.67 and above. Also if it's required from now on we should have gotten some information about it.

为了记录在案,我要发布多模块/服务的父pom代码段,其中包括使用旧的appengine插件的插件管理:

For the record I'm posting my multi module/services parent pom snippet including the pluginmanagement with the old appengine plugin:

    <pluginManagement>
      <plugins>
          <plugin>
              <groupId>com.google.appengine</groupId>
              <artifactId>appengine-maven-plugin</artifactId>
              <version>${appengine.target.version}</version>
              <configuration>
                  <project>YOUR PROJECT ID</project> <!-- WHAT DO WE NEED THIS FOR-->
                  <jvmFlags>
                      <jvmFlag>-Ddatastore.backing_store=${project.basedir}/local_db.bin</jvmFlag>
                  </jvmFlags>
                  <fullScanSeconds>-1</fullScanSeconds>
              </configuration>
          </plugin>
      </plugins>
  </pluginManagement>

这篇关于无法执行目标com.google.appengine:appengine-maven-plugin:1.9.67:devserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆