编译:mvn compile --src/main/java目录java源码编译生成class (target目录下) 测试:mvn test --src/test/java 目录编译 清理:mvn clean --删除target目录,也就是将class文件等删除 打包:mvn package --生成压缩文件:java项目#jar包;web项目#war包,也是放在target目录下 安装:mvn install --将压缩文件(jar或者war)上传到本地仓库 发布:mvn deploy --将压缩文件上传私服 ctrl+s 后maven会自动compile 如果项目间有依赖,需要手动 install