2 lostchris LostChris 于 2016.02.04 00:39 提问

关于maven无法从nexus私服导包

我自己搭好了一个私服能用。。。图片说明但是eclipse无法导包图片说明究竟是什么原因???希望各位大大指教下。。。我eclipse ----maven已经 配置好了installations 和user settings
我的settings.xml如下

 <?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:\mavenRepository</localRepository>

  <mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://localhost:8081/nexus/content/groups/public</url>
        </mirror>
    </mirrors>
    <servers>
        <server>
            <id>nexus-releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>nexus-snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>central</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>
    <profiles>
        <profile>
            <id>nexus</id>
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://localhost:8081/nexus/content/groups/public</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://localhost:8081/nexus/content/groups/public</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>
</settings>

3个回答

yanlong10829
yanlong10829   2016.02.04 09:23

你的项目的pom文件里是不是得引入这个repository呀,

                <repository>
                    <id>central</id>
                    <url>http://localhost:8081/nexus/content/groups/public</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </repository>
    </repositories>

yanlong10829
yanlong10829   2016.02.04 09:23
                <repository>
                    <id>central</id>
                    <url>http://localhost:8081/nexus/content/groups/public</url>
                </repository>
            </repositories>

LostChris
LostChris 不用啊
接近 2 年之前 回复
xianglingchuan
xianglingchuan   2017.06.20 19:15

有解决吗?哥们,我也遇到同样的问题了。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!