List of usage examples for org.apache.maven.settings SettingsConfigurationException SettingsConfigurationException
public SettingsConfigurationException(String message)
From source file:hudson.maven.MavenEmbedder.java
License:Apache License
/** * {@link WagonManager} can't configure itself from {@link Settings}, so we need to baby-sit them. * So much for dependency injection.//from w w w. j av a 2 s.co m */ private void resolveParameters(WagonManager wagonManager, Settings settings) throws ComponentLookupException, ComponentLifecycleException, SettingsConfigurationException { // TODO todo or not todo ? Proxy proxy = settings.getActiveProxy(); if (proxy != null) { if (proxy.getHost() == null) { throw new SettingsConfigurationException("Proxy in settings.xml has no host"); } //wagonManager.addProxy(proxy.getProtocol(), proxy.getHost(), proxy.getPort(), proxy.getUsername(), // proxy.getPassword(), proxy.getNonProxyHosts()); } for (Server server : (List<Server>) settings.getServers()) { //wagonManager.addAuthenticationInfo(server.getId(), server.getUsername(), server.getPassword(), // server.getPrivateKey(), server.getPassphrase()); //wagonManager.addPermissionInfo(server.getId(), server.getFilePermissions(), // server.getDirectoryPermissions()); if (server.getConfiguration() != null) { //wagonManager.addConfiguration(server.getId(), (Xpp3Dom) server.getConfiguration()); } } for (Mirror mirror : (List<Mirror>) settings.getMirrors()) { //wagonManager.addMirror(mirror.getId(), mirror.getMirrorOf(), mirror.getUrl()); } }