DD.
DD.

Reputation: 22011

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 (i.e. working out the correct classpath etc).

Thxs

Upvotes: 1

Views: 93

Answers (2)

konradstrack
konradstrack

Reputation: 3002

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.

Upvotes: 3

Dave Newton
Dave Newton

Reputation: 160321

Either the exec plugin, or use the dependencies plugin (or any of the jarjar-/onejar-type utilities) to create an all-in-one jar and just distribute that.

Upvotes: 1

Related Questions