其他分享
首页 > 其他分享> > maven下载jar通过nexus3.2,并且下载到私有仓库

maven下载jar通过nexus3.2,并且下载到私有仓库

作者:互联网

在setting中加
<profile>
        <!--profile 的 id-->
        <id>dev</id>
        <repositories>
            <repository>
                <!--仓库 id,repositories 可以配置多个仓库,保证 id 不重复-->
                <id>nexus</id>
                <!--仓库地址,即 nexus 仓库组的地址-->
                <url>http://127.0.0.1:8081/repository/maven-public/</url>
                <!--是否下载 releases 构件-->
                <releases>
                    <enabled>true</enabled>
                </releases>
                <!--是否下载 snapshots 构件-->
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <!-- 插件仓库,maven 的运行依赖插件,也需要从私服下载插件 -->
            <pluginRepository>
                <!-- 插件仓库的 id 不允许重复,如果重复后边配置会覆盖前边 -->
                <id>public</id>
                <name>Public Repositories</name>
                <url>http://127.0.0.1:8081/repository/maven-public/</url>
            </pluginRepository>
        </pluginRepositories>
</profile>


 <activeProfiles>
 	<activeProfile>dev</activeProfile>
 </activeProfiles>
注意:http://127.0.0.1:8081/repository/maven-public/  仓库的public地址,是关键。

标签:127.0,http,repository,0.1,jar,nexus3.2,maven,public,下载
来源: https://blog.csdn.net/nankangkang/article/details/118250092