美文网首页Maven
向Sonatype Nexus oss3.x上添加第三方jar

向Sonatype Nexus oss3.x上添加第三方jar

作者: qwfys | 来源:发表于2017-09-12 13:59 被阅读39次

这里假定需要将

        <dependency>
            <groupId>faceid</groupId>
            <artifactId>faceid</artifactId>
            <version>1.0.0.RELEASE</version>
        </dependency>

对应的组件添加到maven私服http://127.0.0.1:8081/上的标识为thirdparty仓库中去。

配置settings.xml文件,在servers节点下添加一个server节点,具体如下:

    <servers>
        <server>
            <id>nexus</id>
            <username>admin</username>
            <password>123456</password>
        </server>
    </servers>

切换到FaceId.jar所在目录,执行如下命令:

mvn deploy:deploy-file -DgroupId=faceid -DartifactId=faceid -Dversion=1.0.0.RELEASE -Dpackaging=jar -Dfile=FaceId.jar -Durl=http://127.0.0.1:8081/repository/thirdparty/ -DrepositoryId=nexus

其中,repositoryId需要与settings.xml文件中servers/server/id节点匹配。

相关文章

网友评论

    本文标题:向Sonatype Nexus oss3.x上添加第三方jar

    本文链接:https://www.haomeiwen.com/subject/stecsxtx.html