1. 打开maven配置表,配置远程仓库,这里配置使用阿里的仓库。
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
2.去mvn网站查看包的 groupId artifactId version
网址 http://mvnrepository.com/
<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.17.Final</version>
</dependency>
3. eclipse 右键项目 maven -add version dependency
填入相应的 groupId artifactId version
4.下载成功后 项目下生成目录 maven dependencies 以及下载的jar包,
5.。或者将</dependency> 信息 复制到pom 文件中,CTRL+S 保存后 maven会自动加载 jar