简体   繁体   English

使用Maven-Gae和Google Eclipse插件时出错(GPE)

[英]Error using maven-gae and google plugin for eclipse (GPE)

I read the the last GPE integrated well with maven projects. 我读了最后一篇与Maven项目集成得很好的GPE。

So I create a maven project from cmd line using the maven-gae-plugin. 因此,我使用maven-gae-plugin从cmd行创建了一个maven项目。

Then imported into eclipse as a maven project. 然后作为Maven项目导入eclipse。

However when I run it as "Web Application" (GPE) it fails with this error: 但是,当我将其作为“ Web应用程序”(GPE)运行时,它将失败并显示以下错误:

Unable to discover the Google App Engine SDK root but was instead loaded from file:/Users/neo/.m2/repository/com/google/appengine/appengine-tools-sdk/1.6.6/appengine-tools-sdk-1.6.6.jar. 无法发现Google App Engine SDK根目录,而是从文件:/Users/neo/.m2/repository/com/google/appengine/appengine-tools-sdk/1.6.6/appengine-tools-sdk-1.6加载。 6.jar。 Specify -Dappengine.sdk.root to override the SDK location. 指定-Dappengine.sdk.root以覆盖SDK位置。

In project's Properties -> Google -> Google App Engine, I've the sdk point to /Users/neo/.m2/repository/com/google/appengine/appengine-java-sdk/1.6.6/appengine-java-sdk-1.6.6 (which is a valid sdk directory). 在项目的属性-> Google-> Google App Engine中,我将sdk指向/Users/neo/.m2/repository/com/google/appengine/appengine-java-sdk/1.6.6/appengine-java-sdk -1.6.6(有效的sdk目录)。

What I am doing wrong? 我做错了什么?

We also ran in the this problem. 我们也遇到了这个问题。 It seems to be a class loading problem. 这似乎是一个类加载问题。 Simply move tools up on the list so it loads first. 只需将工具移到列表中的第一位即可。

  1. Go to Run -> Run Confiurations ... 转到运行 -> 运行配置 ...
  2. Select your app under " Web Application " 在“ Web应用程序 ”下选择您的应用程序
  3. Click " Classpath " tab 点击“ 类路径 ”标签
  4. highlight the appengine-tools jar and choose " Up " so it moves above your project. 突出显示appengine-tools jar,然后选择“ 向上 ”,使其移到项目上方。

Unzip the file appengine-tools-sdk-1.6.6.jar and it will create a folder appengine-tools-sdk-1.6.6 解压缩文件appengine-tools-sdk-1.6.6.jar,它将创建一个文件夹appengine-tools-sdk-1.6.6

It will work if you put the following in VM arguments in your run configuration 如果在运行配置中的VM参数中输入以下内容,它将起作用

-Dappengine.sdk.root=/Users/neo/.m2/repository/com/google/appengine/appengine-tools-sdk/1.6.6/appengine-tools-sdk-1.6.6 -Dappengine.sdk.root = /用户/新/ .m2目录/库/ COM /谷歌/ AppEngine上/ AppEngine上的工具,SDK / 1.6.6 / AppEngine上的工具,SDK-1.6.6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM