[英]By using alternative repository for Maven I am not able to download some dependencies in java project?
I am working behind a proxy and I am facing SSL issues. 我在代理后面工作,并且遇到SSL问题。 Therefore, I can't use HTTPS propertly, so in Eclipse in the settings.xml file of maven I set the repository to " http://repo1.maven.org/maven2 ", ie HTTP, as follows: 因此,我无法正确使用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>
It worked for some dependencies but when I added one dependency to the pom.xml specifically this one: 它适用于某些依赖关系,但是当我向pom.xml中添加一个依赖关系时,特别是这个依赖关系:
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-tiff</artifactId>
<version>3.3.2</version>
</dependency>
Eclipse couldn't download it (I don't know if this issue is from the proxy, from the repository itself, or some other issue) Eclipse无法下载它(我不知道此问题是来自代理,来自存储库本身还是其他问题)
My question: Does setting the repository to " http://repo1.maven.org/maven2 " limit the number of plugins, libraries, or anything I can download using the normal repository " https://mvnrepository.com/ ", or it is exactly the same without any limitation or difference except that the first one is through HTTP not HTTPS ? 我的问题:将存储库设置为“ http://repo1.maven.org/maven2 ”是否会限制插件,库或我可以使用常规存储库“ https://mvnrepository.com/ ”下载的任何内容的数量,或者它是完全一样的,没有任何限制或区别,只是第一个是通过HTTP而不是HTTPS?
I hope you understand that both of these are repositories which include artifacts uploaded via distributionManagement
by developers. 我希望您理解这两个都是存储库,其中包括开发人员通过distributionManagement
上传的工件。
They are not same in terms of the endpoint you would reach. 在端点范围方面,它们并不相同。
The preferred would be the one for maven central - http://repo1.maven.org/maven2 which can be looked in at https://search.maven.org/ 首选的是用于Maven Central的服务器-http: //repo1.maven.org/maven2 ,可以在https://search.maven.org/上找到。
There is a useful link for consumers to start using it. 有一个有用的链接供消费者开始使用。 - central.sonatype.org/pages/consumers and the code shared seems to be following that very likely ( Consumer - Apache Maven ) -central.sonatype.org/pages/consumers和共享的代码似乎很可能跟在后面( Consumer-Apache Maven )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.