zoukankan      html  css  js  c++  java
  • SpringBoot之Maven私服

    公司叫使用公司的maven私服,即依赖的jar从公司的maven私服下载到自己的本地仓库,而不是阿里云、网易等。

    使用私服就是向私人服务器索取服务,修改intellij idea中maven的.setting文件。

    D:maven_local_rep

    <pluginGroups>
    
    <servers>
    	<server>  
    

    releases  
                xxxxx  
                xxxx  
            

                Snapshots  
                xxxx  
                xxxx  
            

    <mirrors>
    	<mirror>
    		<id>nexus</id>
    		<mirrorOf>maven-public</mirrorOf>
    		<name>Nexus Repository</name>
    		<url>http://ip:port/repository/maven-public/</url>
    	</mirror>
    </mirrors>
    
    
    <profiles>
    	<!--配置仓库的一些信息,其主要作用是用来覆写central中央仓库的一些配置信息-->
      <profile>
    	<!--profile的id-->
    	<id>nexusRep</id>
    	<repositories>
    		<repository>
    			<!--仓库id,repositories可以配置多个仓库,保证id不重复-->
    			<id>releases</id>
    			<!--仓库地址,即nexus仓库组的地址-->
    			<url>http://ip:port/repository/maven-public/</url>
    			<layout>default</layout>
    			<!--是否下载releases构件-->
    			<releases>
    				<enabled>true</enabled>
    			</releases>
    			<!--是否下载snapshots构件-->
                <snapshots>
    				<enabled>true</enabled>
    			</snapshots>
    		</repository>
    		<repository>
    			<id>Snapshots</id>
    			<url>http://ip:port/repository/maven-public/</url>
    			<releases>
    				<enabled>true</enabled>
    			</releases>
    			<snapshots>
    				<enabled>true</enabled>
    			</snapshots>
    		</repository>
    	</repositories>
    	<pluginRepositories>
    		<!-- 插件仓库,maven的运行依赖插件,也需要从私服下载插件 -->
    		<pluginRepository>
    			<!-- 插件仓库的id不允许重复,如果重复后边配置会覆盖前边 -->
    			<id>releases</id>
    			<name>Public Repositories</name>
    			<url>http://ip:port/repository/maven-public/</url>
    			<releases>
    				<enabled>true</enabled>
    			</releases>
    			<snapshots>
    				<enabled>true</enabled>
    			</snapshots>  
    		</pluginRepository>
    		<pluginRepository> 
    			<id>Snapshots</id>
    			<url>http://ip:port/repository/maven-public/</url>
    			<releases>
    				<enabled>true</enabled>
    			</releases>
    			<snapshots>
    				<enabled>true</enabled>
    			</snapshots>
    		</pluginRepository>
    	</pluginRepositories>
    </profile>
    
    <activeProfiles>  
        <activeProfile>nexusRep</activeProfile>  
    </activeProfiles>
    
  • 相关阅读:
    hdu 4027 Can you answer these queries? 线段树
    ZOJ1610 Count the Colors 线段树
    poj 2528 Mayor's posters 离散化 线段树
    hdu 1599 find the mincost route floyd求最小环
    POJ 2686 Traveling by Stagecoach 状压DP
    POJ 1990 MooFest 树状数组
    POJ 2955 Brackets 区间DP
    lightoj 1422 Halloween Costumes 区间DP
    模板 有源汇上下界最小流 loj117
    模板 有源汇上下界最大流 loj116
  • 原文地址:https://www.cnblogs.com/zd540/p/11434338.html
Copyright © 2011-2022 走看看