您的位置:首页 > 其它

用idea建立maven项目时用模板建立慢的解决方法

2017-05-21 16:36 447 查看
首先去maven的conf文件夹中找到setting.xml文件,然后在相应的位置加入以下配置,因为在国内还是aliyun快很多,如下所示:

setting.xml中添加这些配置:

<mirrors>

     <mirror>

      <id>alimaven</id>

      <name>aliyun maven</name>

      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>

      <mirrorOf>central</mirrorOf>        

    </mirror>

  </mirrors>

 </profiles>

 <profile>

        <id>aliyun</id>

        <repositories>

            <repository>

                <id>nexus</id>

                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>

                <releases>

                    <enabled>true</enabled>

                </releases>

                <snapshots>

                    <enabled>false</enabled>

                </snapshots>

            </repository>

        </repositories>

        <pluginRepositories>

            <pluginRepository>

                <id>admin</id>

                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>

                <releases>

                    <enabled>true</enabled>

                </releases>

                <snapshots>

                    <enabled>false</enabled>

                </snapshots>

            </pluginRepository>

        </pluginRepositories>

    </profile>

  </profiles>

 <activeProfiles>

    <activeProfile>aliyun</activeProfile>

</activeProfiles>

从网上下载一个archetype-catalog.xml文件

覆盖C:\Users\uds\.m2\repository\org\apache\maven\archetype\archetype-catalog\3.0.1中的xml文件

此路径为个人本地仓库位置
然后建立项目就贼快!贼快!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐