我正在使用基于Eclipse 3.7的springsource工具套件2.7.2.Maven插件现在开箱即用Eclipse,这很棒,即使使用以前的Eclipse版本也会出现这个问题.
所以这是我的问题:
我已经在我的settings.xml文件中设置了代理信息,并且在命令行上Maven工作得很好.我也在Eclipse配置本身设置了相同的代理详细信息,我知道它是正确的,并且更新与它一起工作,而不是没有.
当然,Eclipse安装中的Maven插件设置为使用正确的settings.xml文件.
但是eclipse中的maven只是没有使用其中任何一个地方的代理设置,每次更改pom文件时这都非常烦人.有没有人有这个问题的解决方案?
这是我的settings.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>general</id>
<repositories>
<repository>
<snapshots><enabled>false</enabled></snapshots>
<id>ibiblio</id>
<name>Maven ibiblio</name>
<url>http://www.ibiblio.org/maven2</url>
</repository>
<repository>
<snapshots><enabled>true</enabled></snapshots>
<id>ibiblio2</id>
<name>Maven ibiblio2</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</repository>
<repository>
<snapshots><enabled>true</enabled></snapshots>
<id>maven</id>
<name>Maven sunsite</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<snapshots><enabled>true</enabled></snapshots>
<id>jboss</id>
<name>Maven jboss</name>
<url>http://repository.jboss.org/maven2/</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>general</activeProfile>
</activeProfiles>
<proxies>
<proxy>
<id>proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>myproxyserver</host>
<port>80</port>
<username>myusername</username>
<password>mypassword</password>
</proxy>
</proxies>
</settings>
Run Code Online (Sandbox Code Playgroud) 我正在开发一款需要客户端证书身份验证(包含PKCS 12文件)的Android应用.随着所有这些的弃用apache.http.*,我们已经开始在我们的网络层上进行重构,我们决定使用OkHttp作为替代品,到目前为止我非常喜欢它.
但是,我没有找到任何其他方法来处理客户端证书auth而不使用SSLSocketFactoryOkHttp或其他任何事情.那么在这种特殊情况下,最好的做法是什么?OkHttp有另一种方法来处理这种身份验证吗?