簡體   English   中英

通過為Maven使用備用存儲庫,我無法下載Java項目中的某些依賴項?

[英]By using alternative repository for Maven I am not able to download some dependencies in java project?

我在代理后面工作,並且遇到SSL問題。 因此,我無法正確使用HTTPS,因此在Eclipse的maven的settings.xml文件中,將存儲庫設置為“ http://repo1.maven.org/maven2 ”,即HTTP,如下所示:

<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中添加一個依賴關系時,特別是這個依賴關系:

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

我希望您理解這兩個都是存儲庫,其中包括開發人員通過distributionManagement上傳的工件。

在端點范圍方面,它們並不相同。

首選的是用於Maven Central的服務器-http: //repo1.maven.org/maven2 ,可以在https://search.maven.org/上找到。

有一個有用的鏈接供消費者開始使用。 -central.sonatype.org/pages/consumers和共享的代碼似乎很可能跟在后面( Consumer-Apache Maven

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM