GAE Endpoints: Mismatch between built and expected exploded directory on gradle deploy

425 views
Skip to first unread message

Jonas Hartmann

unread,
May 14, 2017, 3:50:40 AM5/14/17
to Google App Engine
Hey,

I cannot deploy my app engine endpoints java project via app engine gradle script in Android Studio anymore:
Unable to find the webapp directory ../build/exploded-app

If I look at the directory tree within my project I can see the exploded directory  "../build/exploded-backend" based on the module name "backend".
I am wondering how this mismatch happened. Do you guys know how or where I can change the exploded directory name?

Thanks for the help!

Justin Beckwith

unread,
May 15, 2017, 3:15:59 PM5/15/17
to google-a...@googlegroups.com, Les Vogel, Amir Rouzrokh, Rajeev Dayal, Patrick Flynn
Greetings!  I've added a few folks from our Java team who should be able to help :)

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/afc37f30-afdf-4bb4-a540-7fae9e2fa909%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Justin Beckwith | Google Cloud Platform | @justinbeckwith | http://jbeckwith.com

Les Vogel

unread,
May 15, 2017, 3:25:36 PM5/15/17
to Justin Beckwith, Google App Engine, Amir Rouzrokh, Rajeev Dayal, Patrick Flynn
Hi Jonas,

1. Which Gradle plugin are you using?   (There is the Java SDK version or the Cloud SDK version)
2. The cloud SDK gradle plugin now has an Endpoints plugin added?  Have you see it?

What version of Gradle are you using?


--

  •  
Les Vogel
  •  Cloud Developer Relations
  •  le...@google.com
  •  +1-408-676-7023 

Appu Goundan

unread,
May 15, 2017, 4:29:55 PM5/15/17
to Patrick Flynn, Les Vogel, Justin Beckwith, Google App Engine, Amir Rouzrokh, Rajeev Dayal
- This was a change required to use the newer multimodule tooling in the dev appserver.  This change is only in the newer cloudsdk based plugin com.google.cloud.tools:appengine-gradle-plugin.
- The one included in android studio com.google.appengine:gradle-appengine-plugin is not affected.

It's not clear what the user is doing here. Can we get more details? I think we're getting bounced by the Google App Engine (google-a...@googlegroups.com) list.

On Mon, May 15, 2017 at 4:23 PM, Patrick Flynn <paf...@google.com> wrote:
+appu

This looks like it could be related to a gradle change we made recently to support running multiple services at the same time. 

Although I think it was only in the newer cloud SDK based plugin, which shouldn't have affected Android Studio users.

Appu can you comment?

Jonas Hartmann

unread,
May 16, 2017, 8:27:08 AM5/16/17
to Google App Engine, paf...@google.com, le...@google.com, beck...@google.com, arou...@google.com, rda...@google.com
Thanks for getting back to me!
I am using Gradle version 3.4.1, my gradle setup looks like following: 

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.1'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta9'
classpath 'com.google.appengine:appengine-java-sdk:1.9.49'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
repositories {
jcenter()
mavenCentral();
}

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'war'
apply plugin: 'com.google.cloud.tools.appengine'
apply plugin: 'com.google.cloud.tools.endpoints-framework-server'

dependencies {
compile 'com.google.endpoints:endpoints-framework:2.0.7'
compile 'jstl:jstl:1.2'
compile 'javax.servlet:servlet-api:2.5'
compile 'javax.inject:javax.inject:1'
compile 'org.json:json:20160810'
compile 'com.googlecode.objectify:objectify:5.1.14'
compile 'org.apache.commons:commons-lang3:3.5'
compile 'org.apache.httpcomponents:httpcore:4.4.6'
compile 'org.slf4j:slf4j-jdk14:1.7.6'

compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

Jonas Hartmann

unread,
May 24, 2017, 9:38:23 PM5/24/17
to Google App Engine, paf...@google.com, le...@google.com, beck...@google.com, arou...@google.com, rda...@google.com
I've downgraded to com.google.cloud.tools:appengine-gradle-plugin:1.1.1 and it works again.

It's not clear what the user is doing here. 

I've basically upgraded to Cloud Endpoints Frameworks v2.0 Gradle client library generation plugins with Cloud Endpoints Frameworks v1.0 as explained in following repo: https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/appengine/endpoints-frameworks-v2/migration-example

appu

unread,
May 25, 2017, 3:07:28 PM5/25/17
to Google App Engine, paf...@google.com, le...@google.com, beck...@google.com, arou...@google.com, rda...@google.com
@Jonas, downgrading seems like a sub-optimal solution for all of us. How are you doing deploys?

Jonas Hartmann

unread,
May 25, 2017, 10:16:18 PM5/25/17
to Google App Engine, paf...@google.com, le...@google.com, beck...@google.com, arou...@google.com, rda...@google.com
Via Android Studio -> Build -> Deploy Module to App Engine...

Frank Natividad

unread,
Jun 30, 2017, 5:30:57 PM6/30/17
to Google App Engine, paf...@google.com, le...@google.com, beck...@google.com, arou...@google.com, rda...@google.com
Jonas if you're still having this issue. I was able to fix this by modifying the backend/backend.iml 

Change:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-app" />

To:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-backend" />

Jonas Hartmann

unread,
Jul 4, 2017, 10:06:50 PM7/4/17
to Google App Engine
Yes, that works. Thanks for the hint!
In the meantime a few things changed. For people who are also slightly confused how to upgrade to the current version, here are the important parts:

Android app gradle:

ADD: apply plugin: 'com.google.cloud.tools.endpoints-framework-client'

CHANGE: 
compile project(path: ':backend', configuration: 'android-endpoints')
TO
endpointsServer project(path: ":backend", configuration: "endpoints")
Project gradle:

ADD:
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.2'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0'

Backend gradle:

REMOVE:
appengine buildscript dependencies
apply plugin: 'appengine'
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.53'
compile 'com.google.appengine:appengine-endpoints:1.9.53'

ADD:
apply plugin: 'com.google.cloud.tools.appengine'
apply plugin: 'com.google.cloud.tools.endpoints-framework-server'
providedCompile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
compile 'com.google.endpoints:endpoints-framework:2.0.7'
compile 'jstl:jstl:1.2'
compile 'javax.inject:javax.inject:1'

appengine {  // App Engine tasks configuration
deploy { // deploy configuration
version = findProperty("appengine.deploy.version")

def promoteProp = findProperty("appengine.deploy.promote")
if (promoteProp != null) {
promote = new Boolean(promoteProp)
}
}
}
Reply all
Reply to author
Forward
0 new messages