将Maven存储库添加到settings.xml

时间:2012-07-12 15:06:16

标签: java maven m2e

我正在尝试将存储库添加到我的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-&gt; show view-&gt; Maven-&gt; maven存储库时,xuggle存储库是可见的但是完全为空。我需要的罐子没有找到。

2 个答案:

答案 0 :(得分:3)

推荐的方法是使用Nexus等Maven资源库管理器来管理所需的存储库。

请参阅此处如何配置设置文件:http://books.sonatype.com/nexus-book/reference/config-maven.html#ex-maven-nexus-simple

答案 1 :(得分:3)

为了支持search并从m2e浏览远程存储库,存储库必须提供m2e索引。以下是somewhat outdated docs

相关问题