Closed Robin-Hoodie closed 7 years ago
If you're starting an appengine project from scratch, I would not use this plugin. Use the newer plugin based on gcloud : github.com/GoogleCloudPlatform/app-gradle-plugin. It has multimodule support that is not based on EARs (I wouldn't recommend EARs for multimodule projects)
@loosebazooka That's newer? I thought that was the older one :P Why would you not recommend EARS? How else would I build an appengine project with multiple services?
There should be a deprecation notice on the README of this repository?
I think the older model with EARs was a nifty hack to mash the EAR model and the appengine model together. For running, the application-web.xml was just a descriptor to tell the server where all the modules were. For deployment, it would just deploy each one separately. It just involved a lot of extra set up to really not do anything.
The new model is just having separate gradle modules. Deployments can happen for each module as you update them, or running appengine:deploy
on the root project will run the task on all subprojects. Running happens by referencing all the modules that you want to run together [see : multimodule-running]
@loosebazooka Thankyou for the detailed explanation, I'll set that up using the new plugin
I've started an app engine standard project and tried to deploy an EAR file to the local development server using the appengineRun task.
I am using version 1.9.53
My basic directory structure looks like this:
The relevant code in my root build.gradle file looks like this:
My build.gradle file in the web folder:
My build.gradle file in the ear folder:
Finally, I added the appengine-web.xml file under web/src/main/webapp/WEB-INF and the application.xml file under ear/META-INF/application.xml. (Wasn't sure if application.xml is needed since the gradle-appengine-plugin seems to generate it)
So far so good. However, upon running appengineRun I get following exception:
Caused by: com.google.apphosting.utils.config.AppEngineConfigException: Invalid appengine-web.xml(/home/robin/Development/project-y/ear/build/exploded-app/WEB-INF/appengine-web.xml) - Could not locate /home/robin/Development/project-y/ear/build/exploded-app/WEB-INF/appengine-web.xml
It's looking for appengine-web.xml under exploded-app instead of exploded-app/web-0-0-1/WEB-INF where the actual file resides. Any idea what I might've done wrong?