I've been using IntelliJ successfully for quite a while to develop App Engine projects that contain a single service (formerly 'module'), but am having difficulty setting up a project up that contains more than one service (a default front-end service plus one or more backend services).
I understand the multi-module EAR deployment folder structure, which is different from the single WAR structure, but I have not been able to figure out how to successfully launch the development server with this configuration to debug before I deploy.
Any help would be greatly appreciated.
From the main menu, select Run | Show Running List. In the top-right corner of the editor, IntelliJ IDEA shows a list with all active applications.
A project can contain one or more related modules. Each module is a separate library, application and can be a jar, ear or war. Also modules aren't just Java either.
Import an existing module From the main menu, select File | New | Module from Existing Sources. In the dialog that opens, specify the path the . iml file of the module that you want to import, and click Open. By doing so, you are attaching another module to the project without physically moving any files.
Develop Web services client applicationsCreate a Java module and enable support of the desired Web services client in it. Generate the client-side XML-Java binding. Modify the generated code to have the client properly initialized.
My application is structured as a multi module Gradle project. I have a top level Gradle Build file and three subprojects. One project contains the EAR project, and two projects are Goolge App Engine War projects.
I would propose that you start with trying to setup such a project. You will find a good example with a corresponding project structure at Googles Github
https://github.com/GoogleCloudPlatform/appengine-modules-sample-java
You will deploy the ear to your locale dev server by running the ear gradle task appengineRun
You need to add the following entry to your ear gradle build file (keep the other entries)
appengine {
jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']
}
Next step is to configure a Remote Debug configuration similar to this
https://stackoverflow.com/a/18692212/2062634
After you started your application you have to start your remote debug configuration which will attach the debugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With