hot_ice_cool 2019-07-22 16:50 采纳率: 0%
浏览 918

maven不能从nexus上下载依赖问题?

在jenkins构建项目,想让maven连接nexus下载依赖包,但是一直都是冲apach.maven网站上下载的依赖,具体情况如下:

setting.xml配置:

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

   <pluginGroups/>
  <proxies/>
  <servers>
    <server>
      <id>webserver-releases</id>
      <username>admin</username>
      <password>12345678</password>
    </server>
    <server>
      <id>webserver-snapshots</id>
      <username>admin</username>
      <password>12345678</password>
    </server>
  </servers>
  <mirrors/>
  <profiles>
    <profile>
      <id>webserver</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <!-- 私有库地址-->
      <repositories>
        <repository>
          <id>webserver</id>
          <url>http://10.129.231.113:8081/repository/maven-public/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
      <!--插件库地址-->
      <pluginRepositories>
        <pluginRepository>
          <id>webserver</id>
          <url>http://10.129.231.113:8081/repository/maven-public/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>webserver</activeProfile>
  </activeProfiles>
</settings>

jenkins构建截图:
图片说明

红框是nexus私服的地址,实际下载的地址是蓝框的地址,求大神给指导一下。

  • 写回答

1条回答 默认 最新

  • jasondyoung 2019-07-23 14:50
    关注

    私服没有这个资源,它会从中央仓库下载。

    评论

报告相同问题?

悬赏问题

  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法