The*_*ann 64 java eclipse proxy plugins maven
我正在使用基于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)
Alf*_*avo 108
Maven插件使用可以设置配置的设置文件.其路径在Eclipse中可用Window|Preferences|Maven|User Settings
.如果该文件不存在,请创建它并添加如下内容:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>192.168.1.100</host>
<port>6666</port>
<username></username>
<password></password>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
<profiles/>
<activeProfiles/>
</settings>
Run Code Online (Sandbox Code Playgroud)
编辑完文件后,只需单击Update Settings
按钮即可完成.我刚刚完成它并且它有效:)
Pra*_*ams 34
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
</settings>
Run Code Online (Sandbox Code Playgroud)
窗口>首选项> Maven>用户设置
默认情况下,Eclipse 不知道您的外部 Maven 安装并使用嵌入式安装。因此,为了让 Eclipse 使用全局设置,您需要在菜单Settings \xe2\x86\x92 Maven \xe2\x86\x92 Installations中进行设置。
\n 归档时间: |
|
查看次数: |
110382 次 |
最近记录: |