Skip to content

Migrating from the Google Plugin for Eclipse

Elliotte Rusty Harold edited this page Apr 20, 2017 · 33 revisions

The Google Plugin for Eclipse supported a broad range of Google products. It will not be supported past Eclipse 4.6 (Neon). This page describes supported alternatives for GPE users depending on which parts of GPE you're using.

App Engine Standard

App Engine standard environment development is supported by Cloud Tools for Eclipse. To migrate your existing GPE project to Cloud Tools for Eclipse:

  1. If you're using Eclipse 4.4 or earlier, upgrade to Eclipse 4.5 or later.

  2. Install Cloud Tools for Eclipse. This will uninstall GPE.

  3. Select the Eclipse project you want to convert in the Package Explorer or Project Explorer.

  4. Open the context menu and select Configure > Convert to App Engine Project.

Local run, local debugging, and deployment will now be available for the project.

Apps Script

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

All of your Apps Script projects are already available in Google Drive. No additional export or conversion is required.

GWT

Install the GWT Eclipse plugin.

You will probably 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

Android

Android Studio is the official IDE for Android development.

Android Studio can convert your existing Eclipse Android projects into Android Studio projects with Gradle-based build files. For detailed instructions, read Migrating from Eclipse.

Cloud Endpoints

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

No IDE, Eclipse included, currently provides integrated support for Cloud Endpoints v2. You can work with Cloud 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 Cloud 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 adds a pom.xml file to the project and sets the project up 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.51</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, you need those dependencies too.

  1. Add this plugin to the plugins section:
<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>endpoints-framework-maven-plugin</artifactId>
    <version>1.0.0-beta3</version>
</plugin>

To generate discovery docs use the endpoints-framework:discoveryDocs goal.

$ mvn endpoints-framework:discoveryDocs

To generate client libraries use the goal endpoints-framework:clientLibs

$ mvn endpoints-framework:clientLibs

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

Clone this wiki locally