google-app-engine – 在当前项目和插件组[org.apache.maven.plugins,org.codehaus.mojo]中找不到前缀’gcloud’的插件

我正在尝试通过
this读取文件在Google应用引擎中部署和运行Google-pubsub示例代码.运行deploy命令时遇到下面的构建错误.

E:\java\cloud-pubsub-samples-java-master>mvn gcloud:deploy -Dgcloud.version=1 -DskipTests=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pubsub-pull-sample
[INFO] Example for the Google Cloud Pub/Sub on Google App Engine.
[INFO] Cloud Dataflow Examples
[INFO] cloud-pubsub-samples-java
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.jar
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Could not find artifact org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in central (https://repo.maven.apache.org/maven2)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 9.8 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 8.9 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] pubsub-pull-sample ................................. SKIPPED
[INFO] Example for the Google Cloud Pub/Sub on Google App Engine. SKIPPED
[INFO] Cloud Dataflow Examples ............................ SKIPPED
[INFO] cloud-pubsub-samples-java .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.167 s
[INFO] Finished at: 2016-08-21T22:20:45+05:30
[INFO] Final Memory: 13M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'gcloud' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\JAISON.G\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

最佳答案 这意味着您没有在pom.xml中包含gcloud maven插件.但你不应该再使用gcloud,而是使用appengine.见
documentation here.

点赞