Class VersionResolverFactory
java.lang.Object
org.wildfly.channel.maven.VersionResolverFactory
- All Implemented Interfaces:
Closeable,AutoCloseable,MavenVersionsResolver.Factory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Function<Repository, org.eclipse.aether.repository.RemoteRepository> static final org.eclipse.aether.repository.RepositoryPolicy -
Constructor Summary
ConstructorsConstructorDescriptionVersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session) VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session, SignatureValidator signatureValidator) VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session, SignatureValidator signatureValidator, Function<Repository, org.eclipse.aether.repository.RemoteRepository> repositoryFactory) -
Method Summary
Modifier and TypeMethodDescriptionresolveChannels(List<ChannelCoordinate> channelCoords, List<org.eclipse.aether.repository.RemoteRepository> repositories) Resolve and read the channels at the specified coordinates.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.channel.spi.MavenVersionsResolver.Factory
close
-
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
- Specified by:
createin interfaceMavenVersionsResolver.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 theChannelCoordinatespecifies a URL, the channel will be fetched from this URL (without reading the Maven coordinates). If theurlisnull, the channel will be resolved as a Maven coordinate. If theversionis null, the channel artifact will be resolved as the latest version according to the Maven repositories metadata, otherwise the exact artifact for the specifiedversionwill be resolved.- Parameters:
channelCoords- A list of Channel coordinates- Returns:
- a List of resolved channels
- Throws:
UnresolvedMavenArtifactException- if the channels can not be resolvedMalformedURLException- if the channel's rul is not properly formed
-