配置maven组件时,提前创建存放jar文件的文件夹:一般名字称为:repository
maven管理jar文件时,需要配置window-preference-maven-installitions和下面的window-preference-maven-setting,
window-preference-maven-installitions:安装maven的路径
window-preference-maven-setting:里面需要更改本地类库的路径:<localRepository>F:/lis7/soft/repository</localRepository>
存放jar文件的地址(注意/)
maven阿里云网址:当本地类库没有对应的jar文件时,去该网址进行下载,根据下列坐标
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<mirrorOf>central</mirrorOf>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
当配置没有问题时,若在pom.xml中写入坐标出现<dependency>报错时,可能是jar包下载错误,此时需要手动添加jar文件到本地类库 ,可以参考:https://blog.csdn.net/yin__yang/article/details/80545329
大神已经写的很清楚了,若添加完后在pom.xml中还会出现上述错误时,可以找到成功添加的jar文件,复制其中的.pom文件的坐标到编译工具中,这样就可以解决问题了