in maven2-server-impl/src/org/jetbrains/maven/embedder/MavenEmbedder.java [82:117]
private void loadSettings() {
// copied from DefaultMaven.resolveParameters
// copied because using original code spoils something in the container and configuration are get messed and not picked up.
WagonManager wagonManager = getComponent(WagonManager.class);
wagonManager.setOnline(!mySettings.isOffline());
if (wagonManager instanceof DefaultWagonManager) {
((DefaultWagonManager)wagonManager).setHttpUserAgent("Apache-Maven/2.2");
}
Proxy proxy = mySettings.getActiveProxy();
if (proxy != null && proxy.getHost() != null) {
String pass = decrypt(proxy.getPassword());
wagonManager.addProxy(proxy.getProtocol(), proxy.getHost(), proxy.getPort(), proxy.getUsername(), pass, proxy.getNonProxyHosts());
}
for (Server server : mySettings.getServers()) {
String passWord = decrypt(server.getPassword());
String passPhrase = decrypt(server.getPassphrase());
wagonManager.addAuthenticationInfo(server.getId(), server.getUsername(), passWord, server.getPrivateKey(), passPhrase);
wagonManager.addPermissionInfo(server.getId(), server.getFilePermissions(), server.getDirectoryPermissions());
if (server.getConfiguration() != null) {
wagonManager.addConfiguration(server.getId(), (Xpp3Dom)server.getConfiguration());
}
}
for (Mirror mirror : mySettings.getMirrors()) {
if (mirror.getUrl() == null) continue;
wagonManager.addMirror(mirror.getId(), mirror.getMirrorOf(), mirror.getUrl());
}
// end copied from DefaultMaven.resolveParameters
}