Package org.apache.maven.settings

Examples of org.apache.maven.settings.Server


  protected boolean hasServerSettings() {
      if (serverId == null) {
          return false;
      } else {
          final Server srv = settings.getServer(serverId);
          return srv != null;
      }
  }
View Full Code Here


  protected boolean hasServerSettings() {
      if (serverId == null) {
          return false;
      } else {
          final Server srv = settings.getServer(serverId);
          return srv != null;
      }
  }
View Full Code Here

  protected boolean hasServerSettings() {
      if (serverId == null) {
          return false;
      } else {
          final Server srv = settings.getServer(serverId);
          return srv != null;
      }
  }
View Full Code Here

    return this.awsCredentials;
  }

  protected Expose exposeSettings(String serverId) {
    Server server = settings.getServer(serverId);
   
    Validate.notNull(server, "Settings for serverId ('" + serverId + "') not found. See http://beanstalker.ingenieux.com.br/beanstalk-maven-plugin/security.html for more information");

    Expose expose = new Expose();
   
    expose.setServerId(serverId);
    expose.setAccessKey(server.getUsername());
    expose.setSharedKey(getDecryptedAwsKey(server.getPassword().trim()));

    return expose;
  }
View Full Code Here

  private boolean hasServerSettings() {
    if (serverId == null) {
      return false;
    } else {
      final Server srv = settings.getServer(serverId);
      return srv != null;
    }
  }
View Full Code Here

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

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

            if (server != null) {
                if (username == null) {
                    username = this.settings.getServer(host).getUsername();
                }
View Full Code Here

//        }
//      }
//    }

    if (StringUtils.isEmpty(serverPassword)) {
      Server server = getServer(settings, serverId);
      if (server == null)
        throw new MojoExecutionException(MessageFormat.format(
            "Server ''{0}'' not found in settings", serverId));

      if (isDebug())
        debug(MessageFormat.format("Using ''{0}'' server credentials", serverId));

      serverUsername = server.getUsername();
      serverPassword = server.getPassword();
    }
   
    if(!StringUtils.isEmpty(serverUsername) && StringUtils.isEmpty(serverPassword) && System.console() != null){
      serverPassword = new String(System.console().readPassword("Input password for " + serverUsername + ": "));
    }
View Full Code Here

       
        configureScpWagonIfRequired(wagon, log);

        // MSITE-25: Make sure that the server settings are inserted
        for ( Object o : settings.getServers() ) {
          Server server = (Server) o;
            String id = server.getId();

            log.debug( "configureWagon server " + id );

            if ( id != null && id.equals( repositoryId ) && ( server.getConfiguration() != null ) ) {
                final PlexusConfiguration plexusConf =
                    new XmlPlexusConfiguration( (Xpp3Dom) server.getConfiguration() );

                ComponentConfigurator componentConfigurator = null;
                try{
                    componentConfigurator = (ComponentConfigurator) container.lookup( ComponentConfigurator.ROLE );
                    componentConfigurator.configureComponent( wagon, plexusConf, container.getContainerRealm() );
View Full Code Here

            }

            if ( settings != null )
            {
                // TODO: this is a bit dodgy - id is not host, but since we don't have a <host> field we make an assumption
                Server server = settings.getServer( host );

                if ( server != null )
                {
                    if ( username == null )
                    {
                        username = server.getUsername();
                    }

                    if ( password == null )
                    {
                        password = decrypt( server.getPassword(), host );
                    }

                    if ( privateKey == null )
                    {
                        privateKey = server.getPrivateKey();
                    }

                    if ( passphrase == null )
                    {
                        passphrase = decrypt( server.getPassphrase(), host );
                    }
                }
            }
        }
View Full Code Here

                    getLogger().info( "checking for settings auth setup" );
                    if ( settings != null && settings.getServer( url.getHost() ) != null )
                    {
                        getLogger().info( "found setting based auth setup, using" );
                        Server server = settings.getServer( url.getHost() );

                        username = server.getUsername();
                        password = server.getPassword();
                    }
                }
                catch ( SettingsConfigurationException se )
                {
                    getLogger().warn( "problem with settings file, disabling scm resolution of username and password" );
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.