Package org.apache.maven.settings

Examples of org.apache.maven.settings.Server


                                       proxy.getPassword(), proxy.getNonProxyHosts() );
            }

            for ( Iterator i = settings.getServers().iterator(); i.hasNext(); )
            {
                Server server = (Server) i.next();

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

            RepositoryPermissions defaultPermissions = new RepositoryPermissions();
View Full Code Here


    }

    private AuthenticationInfo getAuthenticationInfo( String repositoryId )
    {
        Settings settings = getSettings();
        Server server = settings.getServer( repositoryId );

        if ( server == null )
        {
            return null;
        }

        wagonManager.addAuthenticationInfo( repositoryId, server.getUsername(), server.getPassword(),
                                            server.getPrivateKey(), server.getPassphrase() );
        return wagonManager.getAuthenticationInfo( repositoryId );
    }
View Full Code Here

            repository.setId( mirror.getId() );
        }

        if ( repository.getAuthentication() == null )
        {
            Server server = getSettings().getServer( repository.getId() );
            if ( server != null )
            {
                repository.addAuthentication( new Authentication( server ) );
            }
        }
View Full Code Here

    /** */

    final String stackTemplate = safeTemplate(templateFile);

    /** */

    final Server server = settings.getServer(stackServerId);

    if (server == null) {
      throw new IllegalArgumentException(
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public Server getServer( String serverId )
    {
        return new Server()
        {
            /** {@inheritDoc} */
            public String getUsername()
            {
                return "anonymous";
View Full Code Here

            if ( port > 0 )
            {
                host += ":" + port;
            }

            Server server = this.settings.getServer( host );

            if ( server != null )
            {
                if ( username == null )
                {
View Full Code Here

        RemoteRepository r = new RemoteRepository();
        r.setId( pomRepository.getId() );
        r.setUrl( pomRepository.getUrl() );
        r.setLayout( pomRepository.getLayout() );

        Server server = getSettings().getServer( pomRepository.getId() );
        if ( server != null )
        {
            r.addAuthentication( new Authentication( server ) );
        }
View Full Code Here

                                       proxy.getPassword(), proxy.getNonProxyHosts() );
            }

            for ( Iterator i = settings.getServers().iterator(); i.hasNext(); )
            {
                Server server = (Server) i.next();

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

            RepositoryPermissions defaultPermissions = new RepositoryPermissions();
View Full Code Here

                }
            }

            for ( ArtifactRepository repository : repositories )
            {
                Server server = serversById.get( repository.getId() );

                if ( server != null )
                {
                    SettingsDecryptionRequest request = new DefaultSettingsDecryptionRequest( server );
                    SettingsDecryptionResult result = settingsDecrypter.decrypt( request );
                    server = result.getServer();

                    if ( logger.isDebugEnabled() )
                    {
                        for ( SettingsProblem problem : result.getProblems() )
                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here

        if ( servers != null )
        {
            for ( int i = 0; i < servers.size(); i++ )
            {
                Server server = servers.get( i );

                validateStringNotEmpty( problems, "servers.server[" + i + "].id", server.getId(), null );
            }
        }

        List<Mirror> mirrors = settings.getMirrors();
View Full Code Here

TOP

Related Classes of org.apache.maven.settings.Server

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.