title: Migrating to Cloud Endpoints Frameworks 2.0 for App Engine
body: <p>I'm currently trying to migrate from <code>Cloud Endpoints 1.0</code> to <code>Cloud Endpoints Frameworks 2.0</code>.</p>
  
  <p>I've followed the steps outlined here:
  <a href="https://cloud.google.com/appengine/docs/java/endpoints/migrating?authuser=0" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/java/endpoints/migrating?authuser=0</a></p>
  
  <p>In my <code>build.gradle</code> I've replaced:</p>
  
  <pre><code>compile 'com.google.appengine:appengine-endpoints:1.9.42'
  compile 'com.google.appengine:appengine-endpoints-deps:1.9.42'
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>compile 'com.google.endpoints:endpoints-framework:2.0.0-beta.5'
  compile 'javax.inject:javax.inject:1'
  </code></pre>
  
  <p>And in <code>web.xml</code> I've replaced <code>SystemServiceServlet</code> with <code>EndpointsServlet</code> and <code>/_ah/spi/*</code> with <code>/_ah/api/*</code>.</p>
  
  <p>However on compile, I get the following error:</p>
  
  <blockquote>
  <pre><code>Error:Execution failed for task ':myapp_backend:appengineEndpointsGetClientLibs'.
  &gt; There was an error running endpoints command get-client-lib: web.xml must have 1 (found:0) SystemServiceServlet servlet
  </code></pre>
  </blockquote>
  
  <p>Am I missing something?</p>
  
  <p>Edit, as requested by @saiyr, here's my <code>build.gradle</code> file:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.google.appengine:gradle-appengine-plugin:1.9.42'
      }
  }
  
  repositories {
      jcenter();
  }
  
  apply plugin: 'java'
  apply plugin: 'war'
  apply plugin: 'appengine'
  
  sourceCompatibility = JavaVersion.VERSION_1_7
  targetCompatibility = JavaVersion.VERSION_1_7
  
  dependencies {
      // AppEngine
      appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.42'
      compile 'javax.servlet:servlet-api:2.5'
  
      //  Cloud Endpoints
      compile 'com.google.appengine:appengine-endpoints:1.9.42'
      compile 'com.google.appengine:appengine-endpoints-deps:1.9.42'
  
      // Cloud Endpoints Frameworks
      // compile 'com.google.endpoints:endpoints-framework:2.0.0-beta.7'
      // compile 'javax.inject:javax.inject:1'
  
      // Project
      compile files('src/main/webapp/WEB-INF/lib/gson-2.3.1.jar')
      compile 'com.googlecode.objectify:objectify:5.1.9'
      compile 'com.ganyo:gcm-server:1.0.2'
      compile 'com.google.appengine.tools:appengine-gcs-client:0.5'
  }
  
  appengine {
      downloadSdk = true
      appcfg {
          oauth2 = true
      }
      endpoints {
          getClientLibsOnBuild = true
          getDiscoveryDocsOnBuild = true
      }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p><strong>There is now a guide detailing the transition process here:</strong> <a href="https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md</a></p>
  
  <p>And here: <a href="https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating-android" rel="nofollow noreferrer">https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating-android</a></p>