<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
mvn -v 查看maven版本
mvn -compile 编译
mvn -test 测试
mvn -package 打包
mvn -clean 删除target
mvn -install 安装jar包到本地仓库
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
groupId:groupId的值就是项目的标识,由反写的公司网址+项目名 ,相当于项目的包名
artifactId:artifactId的值就是模块的标识,这里一般建议使用项目名+模块名
version:version的值是版本名 一般是快照
scope:在maven的依赖管理中主要负责项目的部署
比如:provided,表示在打成jar的时候,连同依赖也打进去。如果运行的环境中有相关包,就需要把provided的去注解掉。
进入conf/ 修改setting.xml
<localRepository>D:/Maven/repo-im</localRepository>
原文:https://www.cnblogs.com/junzifeng/p/12677578.html