Package org.wildfly.channel.maven
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
-
-
Constructor Summary
Constructors Constructor Description VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session, List<org.eclipse.aether.repository.RemoteRepository> repositories)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MavenVersionsResolvercreate()List<Channel>resolveChannels(List<ChannelCoordinate> channelCoords)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, wait
-
Methods inherited from interface org.wildfly.channel.spi.MavenVersionsResolver.Factory
close
-
-
-
-
Constructor Detail
-
VersionResolverFactory
public VersionResolverFactory(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session, List<org.eclipse.aether.repository.RemoteRepository> repositories)
-
-
Method Detail
-
create
public MavenVersionsResolver create()
- Specified by:
createin interfaceMavenVersionsResolver.Factory
-
resolveChannels
public List<Channel> resolveChannels(List<ChannelCoordinate> channelCoords) 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
-
-