1.new-->project--->maven 填入GroupId和ArtifactId(相当于给你的项目起名字) 2.在pom.xml中<project>标签中建 立</dependencies>标签 3.在 http://mvnrepository.com/ 中找到你要添加的包 复制到pom.xml中的</dependencies>中,保存 4.删除test 以及main中的java文件夹