0

As per title. Right now my workflow is as follows:

To deploy: Open terminal from IDEA, go mvn appengine:deploy.

To run in localhost: Open terminal, go mvn appengine:devserver.

To debug in localhost: thanks to this answer, open terminal, go

mvn appengine:devserver
mvn appengine:devserver_stop
mvn appengine:devserver_start

And then run the remote configuration which is described in that answer.

Question

Can these 3 tasks be simplified by defining three configurations, so to avoid having to open terminal and type commands?

I’d like to have two run configurations to deploy and run in localhost, and one debug configuration to debug locally. Is that possible? How?

Note: I am using the Community Edition of IntelliJ.

For what it’s worth, I have commented in the appropriate lines in pom.xml:

<plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>${appengine.version}</version>
    <configuration>
        <enableJarClasses>false</enableJarClasses>
        <version>${app.version}</version>
        <!-- Comment in the below snippet to bind to all IPs instead of just localhost -->
        <!-- address>0.0.0.0</address>
        <port>8080</port -->
        <!-- Comment in the below snippet to enable local debugging with a remote debugger
             like those included with Eclipse or IntelliJ -->
        <jvmFlags>
          <jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
        </jvmFlags>
    </configuration>
</plugin>
Community
  • 1
  • 1
natario
  • 24,954
  • 17
  • 88
  • 158
  • Looks like you're using the community edition of IntelliJ. IntelliJ Ultimate has built-in support for appengine and you can simply hit debug in IntelliJ, there is no need to start the devserver yourself. May I suggest you add this piece of information somewhere in you question? – konqi Feb 25 '16 at 09:39
  • @konqi sure, will do it now. – natario Feb 25 '16 at 09:40
  • So, have you tried to add a maven goal to the "Before launch" section in your Run/Debug Configurations? I've worked with the community edition for a good while but that all seems like a bad dream now - anyways, i never had a problem with attaching the debugger manually but i understand the wish to simplify this. In my last days of community edition i added code hotswap capability to my appengine project and therefor reduced to times i had to reattach the debugger because i had to stop and start the devserver. If you're interested, the thing i used was springloaded and i enabled auto-make in – konqi Feb 25 '16 at 09:54
  • IntelliJ. There's a pom.xml file in one of the projects in my public git repository, which has this configured (https://github.com/konqi/fit-precinct/blob/master/pom.xml) search for "spring" in the file and you should find everything you need. If you find this approach to your liking i can post this as an answer. Since it doesn't answer your question directly though I'm writing this epic-2-comment-post here ;-) – konqi Feb 25 '16 at 09:55
  • @konqi it might be me, but the before launch section just says “There are no tasks to run before launch” and is not editable in any way. Thank you, I’ll check it out. – natario Feb 25 '16 at 09:57

0 Answers0