【问题标题】:Adding a Maven repository to settings.xml将 Maven 存储库添加到 settings.xml
【发布时间】:2016-03-12 00:52:25
【问题描述】:

我正在尝试将存储库添加到我的 settings.xml 文件,以便我可以在我正在处理的项目中使用该存储库中的库。这是我当前的 settings.xml 文件。

<settings>
  .
  .

  <profiles>
    <profile>
      <id>standard-extra-repos</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      ...
      <repositories>

      <repository>
          <id>xuggle repo</id>
          <name>Xuggler Repository</name>
          <url>http://xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
          <layout>default</layout>
          <releases><enabled>true</enabled><updatePolicy>never</updatePolicy></releases>
          <snapshots><enabled>true</enabled><updatePolicy>never</updatePolicy></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
      ...
      </pluginRepositories>

    </profile>
  </profiles>
  .
</settings>

我想将 Xuggler 存储库添加到我的 settings.xml 中,以便我可以在 M2E (Maven 2 Eclipse) 中搜索适当的依赖项并将它们添加到我的项目中。当我转到windo->show view->Maven->maven 存储库时,xuggle 存储库是可见的,但完全是空的。找不到我需要的罐子。

【问题讨论】:

    标签: java maven m2e


    【解决方案1】:

    为了支持search 和从 m2e 浏览远程仓库,仓库必须提供 m2e 索引。这里是somewhat outdated docs

    【讨论】:

      【解决方案2】:

      推荐的方法是使用 Maven 存储库管理器(例如 Nexus)来管理您需要的存储库。

      查看这里如何配置设置文件:http://books.sonatype.com/nexus-book/reference/config-maven.html#ex-maven-nexus-simple

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-01-01
        • 2013-11-23
        • 2020-11-24
        • 1970-01-01
        • 2014-08-22
        • 1970-01-01
        • 2014-11-22
        • 2019-04-30
        相关资源
        最近更新 更多