user168237
user168237

Reputation:

What is the recommended way to deploy a Maven module?

I have a multi module Maven project, one of its modules has the main class. I want to package and deploy this module, but I have no idea what I should do now. I'm aware of this question, but I don't know if it's a good way to follow or not. Could you please show me what is the recommended way to deploy a Maven module? Thanks.

Upvotes: 2

Views: 437

Answers (1)

Pascal Thivent
Pascal Thivent

Reputation: 570285

I have a multi module Maven project, one of its modules has the main class. I want to package and deploy this module, but I have no idea what I should do now.

For the package part, I'm assuming you want to create an executable JAR including its dependencies (also known as an uberjar or megajar). There are several ways to do that:

Regarding the deploy part, it highly depends of what you mean by deploy. If what you mean is installing a package on some remote machine(s), Maven doesn't really provide any facility for that, this isn't really in the scope of Maven - which doesn't mean it can't be done at all (but this also doesn't mean it's a good idea to use Maven for that).

I'm aware of this question, but I don't know if it's a good way to follow or not.

Now that the accepted answer has been fixed (it was plain wrong during some time), it's one way. If it does the job for you, then it's a good way.

Upvotes: 1

Related Questions