上传第三方包到maven仓库

在settings.xml文件中设置私有仓库用户名密码, .文件片段

<settings>
    <servers>
        <server>
            <id>xxx</id>
            <username>user</username>
            <password>password</password>
        </server>
    </servers>
</settings>

执行以下命令:

mvn deploy:deploy-file -DgroupId=<group-id> \
  -DartifactId=<artifact-id> \
  -Dversion=<version> \
  -Dpackaging=<type-of-packaging> \
  -Dfile=<path-to-file> \
  -DrepositoryId=<id-to-map-on-server-section-of-settings.xml> \
  -Durl=<url-of-the-repository-to-deploy>