mvn打包最简单:
右边窗口的maven->projectname->Lifecycle->package
run完以后就会在projectname\target目录下生成jar包
上传jar包到服务器,然后执行java -jar xx.jar即可

参考:
https://www.jb51.net/article/182755.htm

https://www.cnblogs.com/hsz-csy/p/9183336.html

https://www.cnblogs.com/blog5277/p/5920560.html