Class CachedVersionResolver

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.wildfly.channel.spi.MavenVersionsResolver

    public class CachedVersionResolver
    extends Object
    implements org.wildfly.channel.spi.MavenVersionsResolver
    Attempts to resolve artifact from local installation cache first. If that's not possible falls back onto fallback MavenVersionsResolver. Installs locally resolved artifacts in LRM to allow galleon to start thin servers.
    • Constructor Detail

      • CachedVersionResolver

        public CachedVersionResolver​(org.wildfly.channel.spi.MavenVersionsResolver fallbackResolver,
                                     ArtifactCache cache,
                                     org.eclipse.aether.RepositorySystem system,
                                     org.eclipse.aether.RepositorySystemSession session,
                                     Function<org.wildfly.channel.ArtifactCoordinate,​String> manifestVersionProvider)
    • Method Detail

      • getAllVersions

        public Set<String> getAllVersions​(String groupId,
                                          String artifactId,
                                          String extension,
                                          String classifier)
        Specified by:
        getAllVersions in interface org.wildfly.channel.spi.MavenVersionsResolver
      • resolveArtifact

        public File resolveArtifact​(String groupId,
                                    String artifactId,
                                    String extension,
                                    String classifier,
                                    String version)
                             throws org.wildfly.channel.UnresolvedMavenArtifactException
        Specified by:
        resolveArtifact in interface org.wildfly.channel.spi.MavenVersionsResolver
        Throws:
        org.wildfly.channel.UnresolvedMavenArtifactException
      • resolveArtifacts

        public List<File> resolveArtifacts​(List<org.wildfly.channel.ArtifactCoordinate> coordinates)
                                    throws org.wildfly.channel.UnresolvedMavenArtifactException
        Specified by:
        resolveArtifacts in interface org.wildfly.channel.spi.MavenVersionsResolver
        Throws:
        org.wildfly.channel.UnresolvedMavenArtifactException
      • resolveChannelMetadata

        public List<URL> resolveChannelMetadata​(List<? extends org.wildfly.channel.ChannelMetadataCoordinate> manifestCoords)
                                         throws org.wildfly.channel.UnresolvedMavenArtifactException
        Specified by:
        resolveChannelMetadata in interface org.wildfly.channel.spi.MavenVersionsResolver
        Throws:
        org.wildfly.channel.UnresolvedMavenArtifactException
      • getMetadataReleaseVersion

        public String getMetadataReleaseVersion​(String groupId,
                                                String artifactId)
        Specified by:
        getMetadataReleaseVersion in interface org.wildfly.channel.spi.MavenVersionsResolver
      • getMetadataLatestVersion

        public String getMetadataLatestVersion​(String groupId,
                                               String artifactId)
        Specified by:
        getMetadataLatestVersion in interface org.wildfly.channel.spi.MavenVersionsResolver