Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven + App Engine + Google Eclipse Plugin

Is there a way I can have a Maven compatible Google App Engine (Java) project that is also compatible with the Google Eclipse Plugin inside Eclipse?

Thanks!

EDIT:

Native support for a Maven plugin now:

https://developers.google.com/appengine/docs/java/tools/maven

like image 986
Mike Gleason jr Couturier Avatar asked Apr 13 '12 18:04

Mike Gleason jr Couturier


People also ask

How do I run the Google App Engine in eclipse?

Create New Web Application ProjectIn Eclipse toolbar, click on the Google icon, and select “New Web Application Project…” Figure – Deselect the “Google Web ToolKit“, and link your GAE Java SDK via the “configure SDK” link. Click finished, Google Plugin for Eclipse will generate a sample project automatically.

How do I download Google Plugin for Eclipse?

Installing Cloud Tools for Eclipse To install the plugin: Drag the install button into your running Eclipse workspace: Or from inside Eclipse, select Help > Eclipse Marketplace... and search for Google Cloud Tools for Eclipse. Restart Eclipse when prompted.

Which maven plugin and command will you add to compile and run your application?

As both goals of the compiler plugin are automatically bound to phases in the Maven default lifecycle, we can execute these goals with the commands mvn compile and mvn test-compile.


2 Answers

Depends on what you mean by "compatible" and it depends on what features you're using of GAE plugin. We use the appengine maven plugin http://code.google.com/p/maven-gae-plugin/ and eclipse and they seem to work fine together but we're not using GWT or JDO. As with most things maven/eclipse I find it's best to run your stuff from the command line and just use eclipse as an editor.

like image 61
Rick Mangi Avatar answered Nov 09 '22 23:11

Rick Mangi


I use maven and GAE since one year with JDO with no problems. Here is my configuration on MacOSX Snow Leopard:

  • Apache Maven 3.0.3
  • Eclipse Version: 3.7.1
  • m2e - Maven Integration for Eclipse 1.0.100.20110804-1717

An important thing to have fully integrated Eclipse with Maven (run all the tests both from command line "mvn test" and from JUnit interface inside Eclipse) is to have the .project file in this way:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>PROJECT_NAME</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.m2e.core.maven2Nature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

The plugin has moved here: https://github.com/maven-gae-plugin/maven-gae-plugin

like image 24
Michele Orsi Avatar answered Nov 09 '22 23:11

Michele Orsi