Lab 023

「长期更新」Maven Command Tips

# 查看当前生效的配置文件
mvn help:effective-settings
# 打包跳过单元测试
mvn clean package -Dmaven.test.skip=true
# 解决项目依赖
mvn dependency:resolve
# 显示树状依赖
mvn dependency:tree
# 发布到Nexus 需要在settings里面配置鉴权
mvn deploy:deploy-file \
    -DgroupId=com.xxxx \
    -DartifactId=interclient \
    -Dversion=7u4  \
    -Dpackaging=jar \
    -Durl=http://192.168.1.100:8081/nexus/content/repositories/xx-repositories/ \
    -DrepositoryId=xx-repositories \
    -Dusername=admin \
    -Dpassword=adminpass \
    -Dfile=/home/a/b/interclient.jar
# 安装到本地仓库
mvn install:install-file \
-DgroupId=dom4j \
-DartifactId=dom4j \
-Dversion=1.6.1 \
-Dpackaging=jar \
-Dfile=/media/Software/Software/Cross/lib/poi-3.7/ooxml-lib/dom4j-1.6.1.jar