我是 Maven 工具的新手。我想在pom和父 pom中构建一个仅包含依赖 jar 的 jar,并将其部署为服务器中的共享库。
你能帮我了解一下 maven 插件和构建这个 jar 所涉及的步骤吗?
用于此目的的最佳设置是使用maven-shade-plugin创建一个包含所有项目依赖项的 jar。
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