有成功使用过OSChina的Maven仓库的过来人吗,求帮我看看我怎么不能用

LonelyCoder 发布于 2014/06/11 15:09
阅读 6K+
收藏 0
我按照 http://maven.oschina.net/help.html这个上面的说明配出的settings.xml文件如下:
<?xml version="1.0"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository>D:\apache-maven-3.2.1\repos</localRepository>

    <mirrors>
        <mirror>
            <id>nexus-osc</id>
            <mirrorOf>central</mirrorOf>
            <name>Nexus osc</name>
            <url>http://maven.oschina.net/content/groups/public/</url>
        </mirror>
        <mirror>
            <id>nexus-osc-thirdparty</id>
            <mirrorOf>thirdparty</mirrorOf>
            <name>Nexus osc thirdparty</name>
            <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>osc</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>nexus-osc</id>
                    <url>http://maven.oschina.net/content/groups/public/</url>
                </repository>
                <repository>
                    <id>nexus-osc-thirdparty</id>
                    <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus-osc</id>
                    <url>http://maven.oschina.net/content/groups/public/</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
</settings> 

但是随便建了一个maven项目,然后招行mvn clean compile,还是会报以下错误:

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin🏺2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to nexus-osc (http://maven.oschina.net/content/groups/public/): Connection reset -> [Help 1]

[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

看起来根本没用上OSChina的maven仓库,是我配置有误吗?求过来人指点

@红薯

以下是问题补充:

@LonelyCoder:话说有没有哪位仁兄有现成的亲测可用的settings.xml文件,求一个,我试试看行不行 (2014/06/12 12:17)
加载中
0
NealFeng
NealFeng
可以把原来得setting.xml备份下,然后直接下载oschina那个帮助页面里的,覆盖原来的 setting.xml,这样可以保证至少这个文件是正确的,如果还有问题再分析。
LonelyCoder
LonelyCoder
已照做,结果是报一模一样的错误
0
osc_1165099
osc_1165099
该评论暂时无法显示,详情咨询 QQ 群:点此入群
LonelyCoder
LonelyCoder
修改后一样报上述错误
0
刘易
刘易
该评论暂时无法显示,详情咨询 QQ 群:点此入群
LonelyCoder
LonelyCoder
回复 @NealFeng : 我觉得应该不关防火墙的事。因为我连公司的maven仓库没有任何问题,只是因为在家老是要登VPN才能用,所以就想换用OSC的,结果还用不了。。。
NealFeng
NealFeng
回复 @LonelyCoder : 防火墙呢?
LonelyCoder
LonelyCoder
浏览器访问没有任何问题
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部