Package org.apache.maven.bootstrap.settings

Examples of org.apache.maven.bootstrap.settings.Settings


    {
        File settingsXml = new File( parser.getArgumentValue( "--settings" ) );

        System.out.println( "Using settings from " + settingsXml );

        Settings settings = Settings.read( USER_HOME, settingsXml );

        // TODO: have an alternative implementation of ArtifactResolver for source compiles
        //      - if building from source, checkout and build then resolve to built jar (still download POM?)
        resolver = setupRepositories( settings );
    }
View Full Code Here


    {
        File settingsXml = new File( parser.getArgumentValue( "--settings" ) );

        System.out.println( "Using settings from " + settingsXml );

        Settings settings = Settings.read( USER_HOME, settingsXml );

        // TODO: have an alternative implementation of ArtifactResolver for source compiles
        //      - if building from source, checkout and build then resolve to built jar (still download POM?)
        resolver = setupRepositories( settings );
    }
View Full Code Here

   * @throws Exception the exception
   */
  public void init() throws Exception {
    System.setProperty("maven.repo.local", System.getProperty("repository.home"));

    Settings settings;
    try {
      settings = Settings.read(System.getProperty("user.home"), new File(System.getProperty("jlaunchpad.home") + File.separatorChar + "settings.xml"));
    }
    catch (Exception e) {
      settings = new Settings();

      if (settings.getLocalRepository() == null) {
        settings.setLocalRepository(System.getProperty("repository.home"));
      }

      String proxySetStr = System.getProperty("proxySet");

      if (proxySetStr != null && Boolean.valueOf(proxySetStr).equals(Boolean.TRUE)) {
        String proxyHost = System.getProperty("proxyHost");
        String proxyPort = System.getProperty("proxyPort");

        String proxyUser = "";
        String proxyPassword = "";

        String proxyAuthStr = System.getProperty("proxyAuth");

        if (proxyAuthStr != null && Boolean.valueOf(proxyAuthStr).equals(Boolean.TRUE)) {
          proxyUser = System.getProperty("proxyUser");
          proxyPassword = System.getProperty("proxyPassword");

          Proxy proxy = new Proxy();

          proxy.setHost(proxyHost);
          proxy.setPort(proxyPort);
          proxy.setUserName(proxyUser);
          proxy.setPassword(proxyPassword);
          proxy.setActive(true);

          settings.addProxy(proxy);
        }

        //downloader.setProxy(proxyHost, proxyPort, proxyUser, proxyPassword);
      }
    }

    // propagate proxy settings from settings.xml to system properties
    // (for the case when proxy was not presented as command line parameters)
    if (settings.getActiveProxy() != null) {
      Proxy proxy = settings.getActiveProxy();

      System.setProperty("proxySet", Boolean.TRUE.toString());
      System.setProperty("proxyHost", proxy.getHost());
      System.setProperty("proxyPort", proxy.getPort());

View Full Code Here

    {
        File settingsXml = new File( parser.getArgumentValue( "--settings" ) );

        System.out.println( "Using settings from " + settingsXml );

        Settings settings = Settings.read( USER_HOME, settingsXml );

        // TODO: have an alternative implementation of ArtifactResolver for source compiles
        //      - if building from source, checkout and build then resolve to built jar (still download POM?)
        resolver = setupRepositories( settings );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.bootstrap.settings.Settings

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.