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>

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

  • 相关阅读:
    C语言第三天,《常量指针和指针常量》
    树莓派系统烧入总结
    c 语言第一天
    7. Vue
    6. Vue
    5. Vue
    4. Vue
    3. Vue
    1. Vue
    2. Vue
  • 原文地址:https://www.cnblogs.com/yes-V-can/p/5614877.html
Copyright © 2011-2022 走看看