zoukankan      html  css  js  c++  java
  • 完美解决idea继承maven后,构建项目慢的问题

    1.修改远程仓库的位置(maven默认仓库是国外,所以我们下载jar包很慢)

    找到我们安装的maven路径下的conf文件夹下的settings.xml文件

    将文件复制到 C:UsersAdministrator.m2下  ,修改文件中的仓库位置,我用的是阿里云的一个镜像仓库

    <mirror>
          <id>mirrorId</id>
          <mirrorOf>repositoryId</mirrorOf>
          <name>Human Readable Name for this Mirror.</name>
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        </mirror>    
    maven镜像仓库配置

    2.设置archetypeCatalog=local(下面有图示)

    1.由于默认情况下,根据archetype创建maven项目会从网络下载catalog文件,导致创建maven项目缓慢

    Searching for remote catalog: http://repo1.maven.org/maven2/archetype-catalog.xml

    2.解决办法可以设置使用本地catalog文件,在IDEA中设置archetype的使用方式为local;

    -DarchetypeCatalog=local

    直接使用360浏览器新建一个下载项

    将archetypeCatalog的下载地址复制进去

    下载后放到哪里呢,这里与本地仓库的位置有关,假如本地仓库是maven默认的,并没有修改 那么就需要放到 C:Usersdel-berlin.m2 epositoryorgapachemavenarchetypearchetype-catalog2.4下  ,本地仓库的默认位置:Default: ${user.home}/.m2/repository

    选择defalut Settings进行设置,否则你设置的是你当前项目

     

     

  • 相关阅读:
    [LeetCode]3Sum Closest
    [LeetCode]3Sum
    [LeetCode]Roman to Integer
    [LeetCode]Integer to Roman
    [LeetCode]Container With Most Water
    [LeetCode]Palindrome Number
    [LeetCode]String to Integer (atoi)
    [LeetCode]Reverse Integer
    Elasticserch与Elasticsearch_dsl用法
    es 查询更新操作
  • 原文地址:https://www.cnblogs.com/zqr99/p/8064383.html
Copyright © 2011-2022 走看看