If you access Maven repositories using proxies, you will need to ensure that Fuse IDE is configured to use the correct proxies. Fuse IDE can use the same Maven configuration as your command-line installation or Fuse IDE can use an alternate Maven configuration.
By default, Fuse IDE's Maven integration looks for its configuration in
. For example on
Windows XP the default location would be userHome
/.m2/settings.xmlc:\Documents and Settings\jdoe\.m2\settings.xml
.
On OS X the default location would be /Users/jdoe/.m2/settings.xml
.
To configure Fuse IDE to use a Maven proxy:
Maven stores user configuration information in an XML file. By default, Maven and the
Fuse IDE Maven tooling look for the file in the user's .m2/settings.xml
file. The Fuse IDE Maven tooling can be configured to use a different Maven configuration
file if needed.
Because this is a user specific configuration file, this file is not created when Maven or the Fuse IDE Maven tooling is installed. If it does not exist, you will need to create it. Example C.1 shows the minimum required entries for a Maven configuration file.
Example C.1. Minimum Maven configuration file
<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"> ... </settings>
To configure Maven to use a proxy you add a proxies
element
to the settings file. The proxies
element is a container for one
or more proxy
elements that configure individual proxy
instances.
The proxy
element uses the children described in
Table C.1 to provide the information for a
proxy.
Table C.1. Maven proxy configuration elements
Element | Description |
---|---|
active | Specifies if the proxy is active. |
protocol | Specifies the protocol used by the proxy. |
host | Specifies the proxy's host address. |
port | Specifies the port on which the proxy listens. |
username | Specifies the username, if required, to access the proxy. |
password | Specifies the password, if required, to access the proxy. |
nonProxyHosts | Specifies a | separated list of hosts for which the proxy
can be bypassed. The addresses can include wild cards. |
Example C.2 shows a sample proxy configuration.
Example C.2. Maven configuration for a proxy
<settings ... >
...
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.sample.fusesource.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.fusesource.com</nonProxyHosts>
</proxy>
...
</proxies>
...
</settings>
Complete documentation for the Maven configuration file can be found at http://maven.apache.org/guides/mini/guide-configuring-maven.html.
To specify the Maven configuration file and reload your user configuration:
Select
| .The Eclipse Preferences editor opens.
Select
| .Enter the full path to your Maven configuration file in the User Settings: field.
Tip The
button will open a file browser to help you locate the file.Click
to load the new configuration from the configuration file.Click Preferences editor.
to close the