예제 #1
0
 public IvyResolver(
     String name,
     RepositoryTransport transport,
     LocallyAvailableResourceFinder<ArtifactRevisionId> locallyAvailableResourceFinder,
     CachedExternalResourceIndex<String> cachedExternalResourceIndex) {
   super(
       name,
       transport.getRepository(),
       new ResourceVersionLister(transport.getRepository()),
       locallyAvailableResourceFinder,
       cachedExternalResourceIndex);
   this.transport = transport;
   this.transport.configureCacheManager(this);
 }
예제 #2
0
 public IvyResolver(
     String name,
     RepositoryTransport transport,
     LocallyAvailableResourceFinder<ModuleVersionArtifactMetaData> locallyAvailableResourceFinder,
     boolean dynamicResolve,
     ResolverStrategy resolverStrategy) {
   super(
       name,
       transport.getRepository(),
       new ResourceVersionLister(transport.getRepository()),
       locallyAvailableResourceFinder,
       new DownloadedIvyModuleDescriptorParser(resolverStrategy),
       resolverStrategy);
   this.transport = transport;
   this.transport.configureCacheManager(this);
   this.dynamicResolve = dynamicResolve;
 }
예제 #3
0
  public void addArtifactLocation(URI baseUri, String pattern) {
    if (pattern != null && pattern.length() > 0) {
      throw new IllegalArgumentException(
          "Maven Resolver only supports a single pattern. It cannot be provided on a per-location basis.");
    }
    artifactRoots.add(transport.convertToPath(baseUri));

    updatePatterns();
  }
예제 #4
0
  public MavenResolver(
      String name,
      URI rootUri,
      RepositoryTransport transport,
      LocallyAvailableResourceFinder<ArtifactRevisionId> locallyAvailableResourceFinder,
      MetaDataParser metaDataParser,
      ModuleMetadataProcessor metadataProcessor) {
    super(
        name,
        transport.getRepository(),
        new ChainedVersionLister(
            new MavenVersionLister(transport.getRepository()),
            new ResourceVersionLister(transport.getRepository())),
        locallyAvailableResourceFinder,
        metaDataParser,
        metadataProcessor);
    transport.configureCacheManager(this);

    this.mavenMetaDataLoader = new MavenMetadataLoader(transport.getRepository());
    this.transport = transport;
    this.root = transport.convertToPath(rootUri);

    super.setM2compatible(true);

    // SNAPSHOT revisions are changing revisions
    setChangingMatcher(PatternMatcher.REGEXP);
    setChangingPattern(".*-SNAPSHOT");

    updatePatterns();
  }
예제 #5
0
 public void addDescriptorLocation(URI baseUri, String pattern) {
   String descriptorPattern = transport.convertToPath(baseUri) + pattern;
   addIvyPattern(descriptorPattern);
 }
예제 #6
0
 public void addArtifactLocation(URI baseUri, String pattern) {
   String artifactPattern = transport.convertToPath(baseUri) + pattern;
   addArtifactPattern(artifactPattern);
 }