How do you package a project via maven, upload and run it over ftp and ssh, on a remote server?

Answered

I've got a raspberry pi ready to roll with jdk 1.8, mysql server, maven and configured it to have a static ip of 192.168.0.101 (I can also add an entry on the hostnames but whatever).

I'd like to configure IntelliJ IDEA ULTIMATE (student license :) ) to package the project via maven (It's a spring boot project by the way so a single jar executable is produced) , upload it to the raspberry pi. I have already configured a remote server:





How do I mess with run configurations to achieve this? I'd also like to run a couple of shell scripts (already located at the pi -  if possible :)

0
1 comment

You can use command line tools (https://www.jetbrains.com/help/idea/2016.3/using-command-line-tools.html) or External Tools feature to run the batch file that will start your app on the remote server via SSH.

The same can be done via Maven: http://stackoverflow.com/questions/12412519/run-remote-command-via-ssh-using-maven3.

If you start the remote app with the JVM options for debugging (suggested in the Remote configuration), you'll be able to connect and debug the app on the server from IDEA using the Remote configuration type.

0

Please sign in to leave a comment.