首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过使用Maven的替代存储库,我无法在java项目中下载一些依赖项?

通过使用Maven的替代存储库,我无法在java项目中下载一些依赖项?
EN

Stack Overflow用户
提问于 2017-03-04 12:40:20
回答 1查看 1.6K关注 0票数 1

我在代理后面工作,我面临SSL问题。因此,我无法正确地使用HTTPS,因此在maven的settings.xml文件中,我将存储库设置为"http://repo1.maven.org/maven2",即HTTP,如下所示:

代码语言:javascript
复制
<settings>
  <activeProfiles>
    <activeProfile>securecentral</activeProfile>
  </activeProfiles>
  <profiles>
    <profile>
      <id>securecentral</id>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://repo1.maven.org/maven2</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://repo1.maven.org/maven2</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
</settings>

它适用于某些依赖项,但当我向pom.xml中添加一个依赖项(特别是这个依赖项)时:

代码语言:javascript
复制
<dependency>
    <groupId>com.twelvemonkeys.imageio</groupId>
    <artifactId>imageio-tiff</artifactId>
    <version>3.3.2</version>
</dependency>

Eclipse无法下载它(我不知道这个问题是来自代理、存储库本身还是其他问题)

我的问题是:是否将存储库设置为"http://repo1.maven.org/maven2“限制插件、库或我可以使用普通存储库"https://mvnrepository.com/”下载的任何东西的数量,或者完全相同,没有任何限制或区别,除了第一个是通过HTTP而不是HTTPS?

EN

回答 1

Stack Overflow用户

发布于 2017-03-04 15:14:35

我希望您理解,这两个库都是存储库,包括开发人员通过distributionManagement上传的工件。

它们在到达的端点方面是不一样的。

首选的是maven central - http://repo1.maven.org/maven2,它可以查看https://search.maven.org/

有一个有用的链接,让消费者开始使用它。- Cental.sonatype.org/pages/consumers和共享的代码似乎非常有可能遵循(消费者- Apache Maven)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42596137

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档