Migrating from the Google Plugin for Eclipse

The Google Plugin for Eclipse (GPE) is no longer available. This document describes how to migrate a project that uses GPE to Cloud Tools for Eclipse.

App Engine Standard

Cloud Tools for Eclipse supports development for the App Engine environment. To migrate your existing GPE project to Cloud Tools for Eclipse:

  1. Ensure you're running Eclipse IDE for Java EE Developers, version 4.8 to 4.21.

  2. Install Cloud Tools for Eclipse. This process uninstalls GPE.

  3. Open the Project Explorer in Eclipse.

  4. Right click the project you want to convert and select Configure > Convert to App Engine Project.

Apps Script

You can edit your Apps Script projects directly in your web browser using the Google Drive script editor.

All of your Apps Script projects are already available in Google Drive, without additional export or conversion.

GWT

Install the GWT Eclipse plugin.

You may see build errors in your GWT projects. To resolve them:

  1. Select the Project in the Project Explorer.

  2. Open the context menu.

  3. Select Configure > Enable GWT SDM builder.

App Engine + GWT

App Engine code runs on the server, and GWT code runs on the client, though it's compiled and served from the server. Ideally you should divide these into separate projects: an App Engine Eclipse project and a GWT Eclipse project.

Once you've done that, you can follow the App Engine standard migration steps and the GWT project migration steps, as described above.

Android

Android Studio is the official IDE for Android development.

You can convert your existing Eclipse Android projects into Android Studio projects with Gradle-based build files using the procedures to migrate from Eclipse.

Endpoints

GPE supported Endpoints v1. You may wish to upgrade to Endpoints v2. There's nothing IDE specific about this upgrade.

No IDE, Eclipse included, currently provides integrated support for Endpoints v2. You can work with Endpoints v2 projects in Eclipse, as you would with any other Java project. However, there are no Endpoints specific code inspections, code generators, new project wizards, editors, or deployment tools.

If you wish to continue using Endpoints v1, you can likewise import your backend project into Eclipse as you would any other Java project. The simplest approach for working with Endpoints v1 without GPE is to leverage the com.google.appengine:appengine-maven-plugin and the Eclipse m2e integration.

If your project is not already built with maven, you need to add a pom.xml file:

  1. If necessary, install the m2e plugin.

  2. Select the project in the Project Explorer.

  3. From the context menu, select Configure > Convert to Maven Project. This conversion adds a pom.xml file to the project and sets the project to use the Maven builder.

  4. Add the following dependencies to that pom.xml:

    <dependencies>
      <dependency>
        <groupId>com.google.appengine</groupId>
        <artifactId>appengine-endpoints</artifactId>
        <version>1.9.73</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>javax.persistence</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
      </dependency>
      <dependency>
        <groupId>com.google.appengine.orm</groupId>
        <artifactId>datanucleus-appengine</artifactId>
        <version>2.1.2</version>
      </dependency>
    </dependencies>
    

    If your application depends on other libraries, add those dependencies too.

  5. Add this plugin to the plugins section:

    <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>endpoints-framework-maven-plugin</artifactId>
        <version>1.0.0</version>
    </plugin>
    
  6. Once your pom.xml is set up, use the endpoints-framework:discoveryDocs goal to generate discovery docs:

    $ mvn endpoints-framework:discoveryDocs
    
  7. Use the endpoints-framework:clientLibs goal to generate client libraries:

    $ mvn endpoints-framework:clientLibs
    

You can map these goals to Eclipse Maven Build run configurations for easy access from the Run menu.

Eclipse Maven Build configuration

DataNucleus (JPA & JDO)

Cloud Tools for Eclipse does not auto enhance entity classes.

You can use Maven for this functionality.

Objectify

The development workflows in Cloud Tools for Eclipse support Objectify 5.x with no changes.

If you wish, you can migrate to Objectify 6.0. This migration requires updates to your project code. Local development with Objectify 6.0 also requires the Datastore emulator (gcloud beta emulators datastore), which must be launched outside of Eclipse and requires some additional configuration for your launch.

Refer to the Objectify documentation for more information.

What's Next

  • Now that you have successfully migrated your project to Cloud Tools for Eclipse, learn more about the available tools and resources.

  • Explore the plugin code or report issues on GitHub, or ask a question on Stack Overflow.