Use maven to extract the dependent jar of the project to the specified folder
Sometimes it is necessary for maven to extract all dependent jar files of the current project to a specified folder. You can use maven-dependency-plugin to implement
1. Add the following to pom.xml:
Maven-dependency-plugin
${project.build.directory} / lib
False
True
...
* where ${project.build.directory} is the maven variable, indicating the target directory. If you do not write, the lib directory will be created under the root directory.
* excludeTransitive, indicating whether there are no indirectly dependent packages
* stripVersion means that the version information is removed from the copied jar file.
two。 Execute mvn dependency:copy-dependencies
All dependent jar will be extracted to the lib directory