Package org.sonatype.nexus.bootstrap

Examples of org.sonatype.nexus.bootstrap.PropertyMap


    log.info("Starting");

    List<LifeCycle> components = new ArrayList<>();

    PropertyMap props = new PropertyMap();
    props.putAll(JettyServer.this.properties);

    // For all arguments, load properties or parse XMLs
    XmlConfiguration last = null;
    for (String arg : args) {
      URL url = Resource.newResource(arg).getURL();

      if (url.getFile().toLowerCase(Locale.ENGLISH).endsWith(".properties")) {
        log.info("Loading properties: {}", url);

        props.load(url);
      }
      else {
        log.info("Applying configuration: {}", url);

        XmlConfiguration configuration = new XmlConfiguration(url);
        if (last != null) {
          configuration.getIdMap().putAll(last.getIdMap());
        }
        if (!props.isEmpty()) {
          configuration.getProperties().putAll(props);
        }
        Object component = configuration.configure();
        if (component instanceof LifeCycle) {
          components.add((LifeCycle) component);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.bootstrap.PropertyMap

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.