示例#1
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();
  }
示例#2
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();
  }
示例#3
0
 public void addDescriptorLocation(URI baseUri, String pattern) {
   String descriptorPattern = transport.convertToPath(baseUri) + pattern;
   addIvyPattern(descriptorPattern);
 }
示例#4
0
 public void addArtifactLocation(URI baseUri, String pattern) {
   String artifactPattern = transport.convertToPath(baseUri) + pattern;
   addArtifactPattern(artifactPattern);
 }