예제 #1
0
  public Set<ResolvedArtifact> getArtifacts() {
    Set<ComponentArtifactMetaData> componentArtifacts = resolveComponentArtifacts();
    Set<ResolvedArtifact> resolvedArtifacts =
        new LinkedHashSet<ResolvedArtifact>(componentArtifacts.size());
    for (ComponentArtifactMetaData artifact : componentArtifacts) {
      IvyArtifactName artifactName = artifact.getName();
      if (!selector.acceptArtifact(moduleVersionIdentifier.getModule(), artifactName)) {
        continue;
      }

      ResolvedArtifact resolvedArtifact = allResolvedArtifacts.get(artifact.getId());
      if (resolvedArtifact == null) {
        Factory<File> artifactSource =
            new LazyArtifactSource(artifact, moduleSource, artifactResolver);
        resolvedArtifact =
            new DefaultResolvedArtifact(
                new DefaultResolvedModuleVersion(moduleVersionIdentifier),
                artifactName,
                artifact.getId(),
                artifactSource);
        allResolvedArtifacts.put(artifact.getId(), resolvedArtifact);
      }
      resolvedArtifacts.add(resolvedArtifact);
    }
    return resolvedArtifacts;
  }
예제 #2
0
 public ModuleVersionResolveState getRevision(ModuleVersionIdentifier id) {
   return getModule(id.getModule()).getVersion(id);
 }