Package org.dru.clay.respository

Examples of org.dru.clay.respository.Configuration


      final String extending = Xml.getAttribute(node, "extends", null);

      // final boolean transitive = Xml.getBooleanAttribute(conf, "transitive", true);
      // final String deprecated = Xml.getAttribute(conf, "deprecated");

      final Configuration configuration = new Configuration(name, description, visibility);
      configurations.put(name, configuration);
      if (extending != null) {
        configurationExtensionMap.put(name, extending);
      }
    }
View Full Code Here


          for (Configuration configuration : configurations.values()) {
            configuration.addArtifact(artifact);
          }
          break;
        } else {
          final Configuration configuration = configurations.get(token);
          if (configuration == null) {
            throw new IllegalArgumentException("The artifact " + artifact + " specified unknown configuration " + token);
          }
          configuration.addArtifact(artifact);
        }
      }
    }
  }
View Full Code Here

    return new Dependency(new Group(group), artifact, mapping, transitive);
  }

  private void resolveExtensions() {
    for (Map.Entry<String, String> entry : configurationExtensionMap.entrySet()) {
      final Configuration configuration = configurations.get(entry.getKey());
      if (configuration == null) {
        throw new IllegalArgumentException("Invalid configuration " + entry.getKey() + " used in configuration extension.");
      }

      final StringTokenizer tokenizer = new StringTokenizer(entry.getValue(), ",");
      while (tokenizer.hasMoreTokens()) {
        final String token = tokenizer.nextToken().trim();
        final Configuration source = configurations.get(token);
        if (source == null) {
          throw new IllegalArgumentException("Invalid configuration " + token + " used in configuration extension.");
        }

        for (Artifact artifact : source.getArtifacts()) {
          configuration.addArtifact(artifact);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.dru.clay.respository.Configuration

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.