Help creating project

101 views
Skip to first unread message

n n

unread,
Jun 16, 2011, 6:00:35 AM6/16/11
to maven-gae-plugin
Hi,

Im new to GAE and trying to get started with the maven-gae-plugin.

I tried the command from the tutorial:

mvn archetype:create -DarchetypeGroupId=net.kindleit -
DarchetypeArtifactId=gae-archetype-gwt -DarchetypeVersion=0.7.0 -
DgroupId=bt -DartifactId=bt

and get
...
[ERROR] ResourceManager : unable to find resource 'archetype-resources/
src/test/java/net/kindleit/gae/example/server/LocalServiceTest.java'
in any resource loader.
...

Guess I dont have the correct repository set up or something?
I tried adding as repository and pluginRepository: http://oss.sonatype.org
but that didnt help.

What am I missing please?

Rodolfo Hansen

unread,
Jun 16, 2011, 9:19:35 AM6/16/11
to maven-ga...@googlegroups.com
Please use a more recent archetype version (0.8.5)

Nikolay Rychkov

unread,
Jun 16, 2011, 9:47:43 AM6/16/11
to maven-ga...@googlegroups.com
In reality I had a lot of problems with this plugin. Use my example. There a not last libraries, but you can just correct versions numbers. 

That is a simple project on the basis of RichFaces showcase.

Integrated:

1. JSF mojarra 2.0.3

2. RichFaces 4 M5

3. Weld 1.0.1

4. Objectify

5. Maven-gae-plugin 0.8.1

6. GAE 1.4.0

7. CDI ViewScoped and FlashScoped by https://github.com/verborghs/jsf-cdi

 

 

Please note that you should make your own weld servlet library. Just remove all package com. In weld servlet.1.0.1.Final in your local repository.

To run application "mvn clean" after "gae:run". To deploy modify appengine-web.xml and "mvn clean package" after "mvn gae:deploy"

 

http://groups.google.com/group/maven-gae-plugin/browse_thread/thread/b09010a7870b299f


2011/6/16 n n <rop...@gmail.com>

rop rop

unread,
Jun 16, 2011, 5:53:35 PM6/16/11
to maven-gae-plugin
Thanks,

Using a more recent archetype-version I could actually create a
project.

But then the behaviour of this plugin seems really weird to me...

It first puts the java-files in a directory structure that doesnt
match the
package... ;
and
import ... ;
statements in the java-files.

The directory structure is, for example,
bt/net/kindleit/...
while in the files it only says:
package net.kindle....
import net.kindle...
(the bt component is missing)
etc

After fixing this by manual editing, it turns out that after running
mvn eclipse:eclipse
I can actually build the project in eclipse (except an error on
"ApiProxy.Environment: class not found" in a test-class)-

But trying both
mvn clean install
and
mvn gae:run
gives me a bunch of compilation-errors of "cannot find symbol" and
"package javax jdo... does not exist".

Very confusing...

Rodolfo Hansen

unread,
Jun 16, 2011, 6:02:09 PM6/16/11
to maven-ga...@googlegroups.com
Patches wellcome?

There are several archetypes and I don't use all of the project types;
so patches for the archetypes are more than welcome!

Nikolay Rychkov

unread,
Jun 16, 2011, 6:22:39 PM6/16/11
to maven-ga...@googlegroups.com
Just use my example. Unfortunately I don't use JDO or JPA. I recommend objectify instead.

2011/6/17 rop rop <rop...@gmail.com>

rop rop

unread,
Jun 16, 2011, 6:34:37 PM6/16/11
to maven-gae-plugin
Hi Nikolay,

OK, but Im used to Struts2+JPA --- never used any of JSF, Weld or
Objectify --- so it does not look like the right starting-point for
me.
Thats basically all Im trying to achieve:

GAE + Struts2 + maven (JPA is already supported in GAE, I
think)

Any pointer how to go about this?




On Jun 17, 12:22 am, Nikolay Rychkov <nikolay.rych...@gmail.com>
wrote:

Manish Dhiman

unread,
Jun 17, 2011, 4:23:00 AM6/17/11
to maven-ga...@googlegroups.com
Hello rop,
Please use the maven command given below. To generate a project structure of your choice.

mvn archetype:generate -DarchetypeGroupId=xyz -DgroupId=com.abc -DartifactId=asd


Thanks & Regards,
Manish Dhiman 

rop rop

unread,
Jun 17, 2011, 7:49:22 AM6/17/11
to maven-gae-plugin
Hi again,

I now got something running by starting with a different artifactId:
gae-archetype-jsp
which I can modify to add struts2.

I just wonder...

When I create a GAE-project in eclipse, using
Google Development Tools => New Web Application Project...
I can then start the application in the builtin GAE-container from
inside eclipse by doing
(rightclick project) => Debug As => gae Web Applicaton

But when the project is made with
mvn eclipse:eclipse
and then imported into eclipse, I dont get that choice included in the
Debug As-menu.

I tried to use
Debug As => Debug Configurations...
but cannot figure it out....

Any clue on how to start the built-in server on a maven-based project?
Or is it not possible?

Rodolfo Hansen

unread,
Jun 17, 2011, 8:05:06 AM6/17/11
to maven-ga...@googlegroups.com

The maven eclipse plugin doesn't know about the eclipse gae.
You would need to send those guys a patch or correctly setup the configuration for it.

Since you started out with an archetype, you could argue the archetype should contain the needed code; send us a patch, and we will include it in all our archetypes.

On Jun 17, 2011 7:59 AM, "rop rop" <rop...@gmail.com> wrote:

rop rop

unread,
Jun 19, 2011, 1:12:02 PM6/19/11
to maven-gae-plugin
Hi,

Have another question here...

In the GAE doc, it says, that when you run the local-server
dev_appserver.cmd,
the datastore is physically kept in a file called local_db.bin.

But when I run with
mvn gae:run
I find no such file...

Anyone knows which file is used instead?
I would like to delete it to reset my datastore -- I suspect it has
got corrupted...

Taylor Leese

unread,
Jun 19, 2011, 3:11:43 PM6/19/11
to maven-ga...@googlegroups.com

Just do a clean before gae:run.

Reply all
Reply to author
Forward
0 new messages