use of org.eclipse.ceylon.cmr.resolver.aether.ExclusionDescriptor in project ceylon by eclipse.
the class AetherUtils method createArtifactResult.
protected ArtifactResult createArtifactResult(final RepositoryManager manager, CmrRepository repository, final String groupId, final String artifactId, final String classifier, final String dVersion, final boolean shared, final boolean optional, final ModuleScope scope, final String repositoryDisplayString, final List<ExclusionDescriptor> exclusions) {
final String dName = MavenUtils.moduleName(groupId, artifactId, classifier);
return new MavenArtifactResult(repository, dName, dVersion, groupId, artifactId, classifier, repositoryDisplayString) {
private ArtifactResult result;
{
if (exclusions != null) {
List<Exclusion> ret = new ArrayList<>(exclusions.size());
for (ExclusionDescriptor xDescr : exclusions) {
ret.add(new Exclusion(xDescr.getGroupId(), xDescr.getArtifactId()));
}
setExclusions(ret);
}
}
@Override
public boolean exported() {
return shared;
}
@Override
public boolean optional() {
return optional;
}
@Override
public ModuleScope moduleScope() {
return scope;
}
private synchronized ArtifactResult getResult() {
if (result == null) {
result = fetchDependencies(manager, (CmrRepository) repository(), groupId, artifactId, classifier, dVersion, false, repositoryDisplayString);
}
return result;
}
protected File artifactInternal() throws RepositoryException {
return getResult().artifact();
}
public List<ArtifactResult> dependencies() throws RepositoryException {
return getResult().dependencies();
}
};
}
Aggregations