简体   繁体   中英

How to run a maven Java app on a server

I have a standalone application which I have deployed using the Maven release plugin. I now need to run it on the remote server... Would you recommend using the mvn exec plugin? Otherwise whats the best way of running the app (ie working out the correct classpath etc).

Thxs

You can use the Maven Assembly Plugin with jar-with-dependencies descriptor (it's one of default descriptors). It should include all dependencies, allowing you to easily run the jar on the server.

无论是exec插件,还是使用依赖项插件(或任何jarjar- / onejar类型实用程序)来创建一体化jar并只是分发它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM