我依赖于Hibernate 3.5.3,它只能从新的JBoss Maven 存储库中获得,它托管在Sonatype的Nexus上,并且所有 URL 都使用 HTTPS 保护。
我可以通过 Web 浏览器从公司防火墙后面访问此存储库。但 Maven 无法解析工件。
我在构建开始时看到以下警告:
[WARNING] Unable to get resource 'org.hibernate:hibernate-core:pom:3.5.3-Final' from repository jboss.org (https://repository.jboss.org/nexus/content/repositories/releases): Error transferring file: repository.jboss.org
我希望在 global settings.xml 的部分中添加以下内容应该对我有用:
<proxy>
<id>http.proxy</id>
<active>true</active>
<protocol>http</protocol>
<username>me</username>
<password>private</password>
<host>proxy.somecompany.com</password>
<port>80</port>
<nonProxyHosts>*.somecompany.com</nonProxyHosts>
</proxy>
<proxy>
<id>https.proxy</id>
<active>true</active>
<protocol>https</protocol>
<username>me</username>
<password>private</password>
<host>proxy.somecompany.com</password>
<port>80</port> <!-- tried 443 too -->
<nonProxyHosts>*.somecompany.com</nonProxyHosts>
</proxy>
但这对我不起作用。
在我的 pom.xml 中,我声明了以下存储库依赖项:
<repository>
<id>jboss.org</id>
<name>JBoss Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
</repository>
我被限制使用 Maven 2.0.8,但我已经检查过,它也不适用于 Maven 2.2.1。