コード例 #1
0
ファイル: AetherUtils.java プロジェクト: ysb33r/ceylon
  private ArtifactResult findDependencies(
      RepositoryManager manager, Node node, Boolean fetchSingleArtifact) {
    final ArtifactContext ac = ArtifactContext.fromNode(node);
    if (ac == null) return null;

    final String name = ac.getName();
    String[] groupArtifactIds = nameToGroupArtifactIds(name);
    if (groupArtifactIds == null) {
      return null;
    }
    final String groupId = groupArtifactIds[0];
    final String artifactId = groupArtifactIds[1];
    final String version = ac.getVersion();

    String repositoryDisplayString = NodeUtils.getRepositoryDisplayString(node);
    CmrRepository repository = NodeUtils.getRepository(node);

    if (CeylonUtils.arrayContains(ac.getSuffixes(), ArtifactContext.LEGACY_SRC)) {
      return fetchWithClassifier(
          repository, groupId, artifactId, version, "sources", repositoryDisplayString);
    }

    return fetchDependencies(
        manager,
        repository,
        groupId,
        artifactId,
        version,
        fetchSingleArtifact != null ? fetchSingleArtifact : ac.isIgnoreDependencies(),
        repositoryDisplayString);
  }