Reputation: 1157
I am new to maven tool. I would like to build a jar containing only dependency jars in pom and also parent pom and deploy this as shared library in the server.
Could you help me out about the maven plugin and the steps involved to build this jar.
Upvotes: 0
Views: 666
Reputation: 97359
The best setup for such purpose is to use the maven-shade-plugin which creates a jar which contains all project dependencies.
Upvotes: 1
Reputation: 19
I just verified this on one of my projects.
Make sure that your maven installation is on your path and change to the directory that contains your project using a terminal emulator or cmd.exe (in windows).
Run the following command:
mvn dependency:copy-dependencies
your dependencies will be downloaded to the target->dependency directory in your project
Upvotes: 0