Example usage for org.apache.maven.settings SettingsConfigurationException SettingsConfigurationException

List of usage examples for org.apache.maven.settings SettingsConfigurationException SettingsConfigurationException

Introduction

In this page you can find the example usage for org.apache.maven.settings SettingsConfigurationException SettingsConfigurationException.

Prototype

public SettingsConfigurationException(String message) 

Source Link

Usage

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());
    }
}