maven一些常用命令
安装包到本地
Dfile=D:\workspace\Marketing.MessagePush.Service\messagepush\lib\guava-18.0.jar -DgroupId=com.google.guava -DartifactId=guava -Dversion=18.0 -Dpackaging=jar
记录mvn命令执行信息到txt
mvn dependency:tree –> tree.txt
mvn install–> install.txt
查找包依赖tree
mvn dependency:tree -Dverbose -Dincludes=:commons-collections:jar
清理 编译 跳过单元测试
mvn clean -Dmaven.test.skip=true install
设置jar包统一版本
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
</dependencies>
</dependencyManagement>