- Create a maven launcher for the codeserver.
- Create a maven launcher for your server.
- And you can create maven launches for thinks like your DB.
- Then create a compound launcher to start everything with one click. IntelliJ also gives you a "Stop All" button to stop everything with one click.
Much easier!
To create a maven launcher for your DB, you use "exec-maven-plugin". For example, I'm using Google App Engine, so I added this to my pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<executions>
<execution>
<id>start-datastore-emulator</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>gcloud</executable>
<arguments>
<argument>beta</argument>
<argument>emulators</argument>
<argument>datastore</argument>
<argument>start</argument>
<argument>--use-firestore-in-datastore-mode</argument>
<argument>--data-dir=local_db</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
Now I just create a maven launcher in IntelliJ "exec:exec@start-datastore-emulator" and it'll start my local DB.
If anyone has any tips for improving it, please let me know.