zoukankan      html  css  js  c++  java
  • Maven使用Nexus私服的配置

    工作记录
    ——————————————————————————————
    配置文件 apache-maven-3.3.3confsettings.xml
    在mirrors(镜像)之间配置。
    url为私服地址
    <!-- 配置maven只使用私服时,第一个mirrorOf之间写*就行。osgeo和geosolutions不能使用nexus,必须绕过-->
    <mirror>
        <id>nexus</id>
        <mirrorOf>external:*,!osgeo,!geosolutions</mirrorOf>
         <name>MyNexus</name> 
         <url>http://192.168.202.27:8081/nexus/content/groups/public</url>
    </mirror>
     <mirror>
        <id>osgeo</id>
        <mirrorOf>osgeo</mirrorOf>
        <name>Open Source Geospatial Foundation Repository</name>
         <url>http://download.osgeo.org/webdav/geotools/</url>
     </mirror>
    <mirror>
        <id>geosolutions</id>
        <mirrorOf>geosolutions</mirrorOf>
        <name>geosolutions repository</name>
         <url>http://maven.geo-solutions.it/</url>
    </mirror>

    在profiles之间配置

    <!-- id为central:覆盖超级POM中中央仓库位置 -->
                <profile>
                    <id>nexus</id>
                    <repositories>
                        <repository>
                            <id>central</id>
                            <name>MyNexus</name>
                            <url>http://central</url>
                            <releases>
                                <enabled>true</enabled>
                            </releases>
                            <snapshots>
                                <enabled>true</enabled>
                            </snapshots>
                        </repository>
                    </repositories>
                    <pluginRepositories>
                        <pluginRepository>
                            <id>central</id>
                            <url>http://central</url>
                            <releases>
                                <enabled>true</enabled>
                            </releases>
                            <snapshots>
                                <enabled>true</enabled>
                            </snapshots>
                        </pluginRepository>
                    </pluginRepositories>
                </profile>

    然后在profiles之后配置一个

    <activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>

    -----------------------------------------

  • 相关阅读:
    HTML简介
    Tomcat创建项目
    旅游移动端网站—慢!慢!慢!
    云服务正在吞噬世界!
    2016运维团队所需解决方案的5个关键因素
    关于 OneAPM Cloud Test DNS 监控的几个重要问题
    不可忽视的 .NET 应用5大性能问题
    从 IT 中断中学到的最佳监控实践
    衡量企业应用数据库性能的6大指标
    云监控崛起,你落伍了么?
  • 原文地址:https://www.cnblogs.com/yes-V-can/p/5614877.html
Copyright © 2011-2022 走看看