Idea 使用maven 创建SpringMVC 下载jar 失败

来源:互联网 发布:mac电脑的顿号怎么打 编辑:程序博客网 时间:2024/05/22 03:32

最近从.net 专做Java ,开始各种配置,发现创建springMVC的使用下载jar包总是失败,各种搞了2天终于搞定,废话不说直接上图

下载失败的jar包:http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar


解决办法:在 settings.xml中配置下面的镜像,有2个settings.xml 我配置的是maven安装目录下的settings.xml。

<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>





1 0
原创粉丝点击