前置要求:配置正确的settings.xml

    maven 推送 本地jar 到私服的命令示例:

    1. mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc -Dversion=11.2.0 -Dpackaging=jar -Dfile=ojdbc6.jar -Durl=http://${host-url}/repository/third/ -DrepositoryId=${id}

    重要参数释义:

    -Dfile : 这里是指的本地环境的文件地址(比如我电脑的当前路径有 ./ojdbc6.jar 这个文件)

    -Durl : nexus-repository 对应要上传的仓库路径(是真实的 URL,而非nexus进行了处理的的 url)
    如 在私服中显示 http://fake.nexus.cn/#browse/browse/components:third 则处理成 http://fake.nexus.cn/repository/third/

    -DrepositoryId : 此是maven/settings.xml中的标签中定义的 id 名称

    Hint:只有高级权限用户才可推送 jar 到私服