IDEA创建maven项目jar更新缓慢问题

转自:http://www.cnblogs.com/ae6623/p/4416256.html

国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用。

 

最新更新:2016年11月11日 18:05:40 阿里云提供Maven私服,我把配置文件贴一下,自己放在maven的conf下就行,setting.xml

https://github.com/ae6623/Zebra/blob/master/maven-repo-settings-ali.xml

IDEA中maven设置:

IDEA创建maven项目jar更新缓慢问题_第1张图片

 

xml version="1.0" encoding="UTF-8"?>




<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  
  <localRepository>D:\Repositories\MavenlocalRepository>

  

  

  
  <pluginGroups>
    
    <pluginGroup>org.mortbay.jettypluginGroup>
  pluginGroups>

  
  <proxies>
    
  proxies>

  
  <servers>
    
    
    
    <server>
        <id>releasesid>
        <username>aliusername>
        <password>alipassword>
      server>
      <server>
        <id>Snapshotsid>
        <username>aliusername>
        <password>alipassword>
      server>
  servers>

  
  <mirrors>
    
    <mirror>
      
      <id>nexusid>
      <mirrorOf>*mirrorOf> 
      <url>http://maven.aliyun.com/nexus/content/groups/public/url>
    mirror>
    <mirror>
      
      <id>nexus-public-snapshotsid>
      <mirrorOf>public-snapshotsmirrorOf> 
      <url>http://maven.aliyun.com/nexus/content/repositories/snapshots/url>
    mirror>
  mirrors>
  
  
  <profiles> 
    <profile>
      <id>developmentid>
      <repositories>
        <repository>
          <id>centralid>
          <url>http://centralurl>
          <releases><enabled>trueenabled><updatePolicy>alwaysupdatePolicy>releases>
          <snapshots><enabled>trueenabled><updatePolicy>alwaysupdatePolicy>snapshots>
        repository>
      repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>centralid>
          <url>http://centralurl>
          <releases><enabled>trueenabled><updatePolicy>alwaysupdatePolicy>releases>
          <snapshots><enabled>trueenabled><updatePolicy>alwaysupdatePolicy>snapshots>
        pluginRepository>
      pluginRepositories>
    profile>
    <profile>
      
      <id>public-snapshotsid>
      <repositories>
        <repository>
          <id>public-snapshotsid>
          <url>http://public-snapshotsurl>
          <releases><enabled>falseenabled>releases>
          <snapshots><enabled>trueenabled><updatePolicy>alwaysupdatePolicy>snapshots>
        repository>
      repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>public-snapshotsid>
          <url>http://public-snapshotsurl>
          <releases><enabled>falseenabled>releases>
          <snapshots><enabled>trueenabled><updatePolicy>alwaysupdatePolicy>snapshots>
        pluginRepository>
      pluginRepositories>
    profile>
  profiles>
 
   <activeProfiles>
    <activeProfile>developmentactiveProfile>
    <activeProfile>public-snapshotsactiveProfile>
   activeProfiles>
settings>

 

你可能感兴趣的:(IDEA创建maven项目jar更新缓慢问题)