Class VersionResolverFactory

java.lang.Object
org.wildfly.channel.maven.VersionResolverFactory
All Implemented Interfaces:
Closeable, AutoCloseable, MavenVersionsResolver.Factory

public class VersionResolverFactory extends Object implements MavenVersionsResolver.Factory
  • Field Details

    • DEFAULT_REPOSITORY_POLICY

      public static final org.eclipse.aether.repository.RepositoryPolicy DEFAULT_REPOSITORY_POLICY
    • DEFAULT_REPOSITORY_MAPPER

      public static final Function<Repository, org.eclipse.aether.repository.RemoteRepository> DEFAULT_REPOSITORY_MAPPER
  • Constructor Details

    • VersionResolverFactory

      public VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session)
    • VersionResolverFactory

      public VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session, SignatureValidator signatureValidator)
    • VersionResolverFactory

      public VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session, SignatureValidator signatureValidator, Function<Repository, org.eclipse.aether.repository.RemoteRepository> repositoryFactory)
  • Method Details

    • create

      public MavenVersionsResolver create(Channel channel)
      Specified by:
      create in interface MavenVersionsResolver.Factory
    • resolveChannels

      public List<Channel> resolveChannels(List<ChannelCoordinate> channelCoords, List<org.eclipse.aether.repository.RemoteRepository> repositories) throws UnresolvedMavenArtifactException, MalformedURLException
      Resolve and read the channels at the specified coordinates. If the ChannelCoordinate specifies a URL, the channel will be fetched from this URL (without reading the Maven coordinates). If the url is null, the channel will be resolved as a Maven coordinate. If the version is null, the channel artifact will be resolved as the latest version according to the Maven repositories metadata, otherwise the exact artifact for the specified version will be resolved.
      Parameters:
      channelCoords - A list of Channel coordinates
      Returns:
      a List of resolved channels
      Throws:
      UnresolvedMavenArtifactException - if the channels can not be resolved
      MalformedURLException - if the channel's rul is not properly formed