having problems getting maven-gae to work with GPE

74 views
Skip to first unread message

numan....@gmail.com

unread,
Jun 5, 2012, 3:51:36 PM6/5/12
to maven-ga...@googlegroups.com
This is what i am doing:
  • create maven-gae project: mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp  -DarchetypeVersion=0.9.3 -DgroupId=com.myapp.test -DartifactId=testapp  -DarchetypeRepository=http://maven-gae-plugin.googlecode.com/svn/repository
  • import into eclipse as a maven project. i am using STS 2.9.2 which comes installed with m2eclipse plugin + m2extras. I also have GPE installed.
  • run as "Web application" (GPE icon)
However it fails with this message:

"Unable to discover the Google App Engine SDK root. This code should be loaded from the SDK directory, but was instead loaded from file:/Users/numansalati/.m2/repository/com/google/appengine/appengine-tools-sdk/1.6.5/appengine-tools-sdk-1.6.5.jar.  Specify -Dappengine.sdk.root to override the SDK location" message

Under the Properties -> Google -> App Engine, I have SDK pointing to ${home}/.m2/repository/com/google/appengine/appengine-java-sdk/1.6.5/appengine-java-sdk-1.6.5

what am i am doing wrong?



Rodolfo Hansen

unread,
Jun 5, 2012, 4:43:27 PM6/5/12
to maven-ga...@googlegroups.com
Have you run gae:unpack ?  if you wish to use an embedded SDK version, you need to specify the SDK location;

in your pom.xml 

add 

<properties>
...
<gae.home>YOUR_PATH_TO_THE_SDK</gae.home>
...
</properties>

numan

unread,
Jun 5, 2012, 9:51:50 PM6/5/12
to maven-ga...@googlegroups.com
Rodolfo,

I tried what you suggested (adding <gae.home>) but I got the same error.

Then I tried passing in the -Dappengine.sdk.root in the run configuration and I was able to start the server.

But when I access the URL (http://localhost:8888/), i am getting 
java.lang.ClassNotFoundException: com.myapp.test.model.Message 
exception, indicating to me that the GPE doesn't sort out the classpath when importing this maven project.

i read that GPE is supposed to seamlessly import maven projects so i am wondering if i am making a silly mistake here.

what do you think?

numan

unread,
Jun 6, 2012, 8:46:49 PM6/6/12
to maven-ga...@googlegroups.com
Rodolfo,

I am not sure why my last message didn't show up in this thread...

Anyway, just wanted to say that specifying <gae.home> didn't work. 

I got it to work my directly passing the root dir as vm args in the run configuration like this -Dappengine.sdk.root



On Tuesday, June 5, 2012 4:43:27 PM UTC-4, Rodolfo Hansen wrote:
Reply all
Reply to author
Forward
0 new messages