Export the jar package that Maven project depends on (Graphic tutorial)

Note that the MVN command is an environment variable that needs to be configured for Maven

1、 Export to custom directory

在maven项目下创建lib文件夹,输入以下命令:
mvn dependency:copy-dependencies -DoutputDirectory=lib
maven项目所依赖的jar包都会复制到项目目录下的lib目录下

This is the jar package I need to export:

Root directory of the project:

Open CMD, enter the project root directory (pom.xml file is also here), and execute the directory. If the Lib file is not created manually, it will be created automatically:

After a few moments, Maven finished copying

2、 Export to default directory started / dependency

从Maven项目中导出项目依赖的jar包:进入工程pom.xml 所在的目录下,执行如下命令:

3、 Set dependency level

At the same time, you can set the dependency level, usually using the compile level

Description: the method searched from the Internet has added its own supplement

The above jar package (Graphic tutorial) for exporting Maven project is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>