idea新建maven项目

盘符下新建一个目录;

打开idea -> open目录;

右击目录 -> new -> module;

maven -> next;

 填包名和项目名 -> next -> finish;

 设置maven自动导入;

 pom里添加要导入的jar包并保存 -> 测试;

备注:

  1、scope为test的main目录下引入不了;

  2、maven仓库https://mvnrepository.com/

原文地址:https://www.cnblogs.com/linding/p/12225782.html