Simplest way to run the code on remote machine from within IDEA

Hi all,

I'm working on my current assignment and the deployment part involves few steps, which I'd like to automate:

  1. work the code
  2. build jar (it's a standalone app, no application server involved)
  3. upload jar to the remote machine
  4. start the JVM with the JAR on the remote machine
  5. debug/test the started JVM

So far I've been able to automate a little bit using IDEA (13.1.6), but I believe it could be done better, I just don't know how:

  1. I work the code and once I'm done I build the JAR artifact (either via build artifact or mvn package)
  2. With the hit of Ctrl + S I upload the JAR
    • I've setup remote host with SFTP upload and mapping of the JAR
  3. I run my Debug configuration which connects me to the target JVM
    • Debug configuration runs my External SSH tool before that starts java with hardcoded jar path and debug options

I gues I am missing something like 'Upload' action in the 'Before launch' section of the run configuration; then I could specify make/build artifact/upload/externalSshRun 'Before launch' actions.

So my request is if any of you guys have experience with remote deployment and running of project from within IDEA - some smoother run configuration ideas would be welcome.

Thank you in advance.

Please sign in to leave a comment.