Class MvnRepoLookup

java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.mvnrepo.MvnRepoLookup
All Implemented Interfaces:
ResourceProvider

public class MvnRepoLookup extends AbstractProvider implements ResourceProvider

Depending on the request, this provider provides two types of resources.

  1. The artifacts to be resolved as MvnRepoDependencies. The artifacts to be resolved are those added with resolve(java.lang.String...).

  2. The CompilationResources or RuntimeResources (depending on the request) that result from resolving the artifacts to be resolved.

  • Constructor Details

    • MvnRepoLookup

      public MvnRepoLookup()
      Instantiates a new mvn repo lookup.
  • Method Details

    • resolve

      public MvnRepoLookup resolve(String... coordinates)
      Add artifacts, specified by their coordinates (groupId:artifactId:version).
      Parameters:
      coordinates - the coordinates
      Returns:
      the mvn repo lookup
    • downloadSources

      public MvnRepoLookup downloadSources(boolean enable)
      Whether to also download the sources. Defaults to true.
      Parameters:
      enable - the enable
      Returns:
      the mvn repo lookup
    • downloadJavadoc

      public MvnRepoLookup downloadJavadoc(boolean enable)
      Whether to also download the javadoc. Defaults to true.
      Parameters:
      enable - the enable
      Returns:
      the mvn repo lookup
    • doProvide

      protected <T extends Resource> Stream<T> doProvide(ResourceRequest<T> requested)
      Provide.
      Specified by:
      doProvide in class AbstractProvider
      Type Parameters:
      T - the generic type
      Parameters:
      requested - the requested resources
      Returns:
      the stream