Class MvnRepoLookup
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.mvnrepo.MvnRepoLookup
- All Implemented Interfaces:
ResourceProvider
Depending on the request, this provider provides two types of resources.
-
The artifacts to be resolved as
CompilationResources<MavenRepoDependencies>. The artifacts to be resolved are those added withresolve(org.jdrupes.builder.mvnrepo.MvnRepoDependency.Scope,java.lang.String...). -
The
CompilationResources<LibraryJarFile>orRuntimeResources<LibraryJarFile>(depending on the request) that result from resolving the artifacts to be resolved. The resources returned implement the additional marker interfaceMvnRepoJarFile.
-
Field Summary
Fields inherited from class AbstractProvider
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoProvide(ResourceRequest<T> requested) Provide.downloadJavadoc(boolean enable) Whether to also download the javadoc.downloadSources(boolean enable) Whether to also download the sources.Add artifacts, specified by their coordinates (groupId:artifactId:version) as compilation resources.resolve(MvnRepoDependency.Scope scope, String... coordinates) Add artifacts, specified by their coordinates (groupId:artifactId:version) with the given scope.Returns the snapshot repository.snapshotRepository(URI uri) Sets the Maven snapshot repository URI.Methods inherited from class AbstractProvider
provide, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
provide
-
Constructor Details
-
MvnRepoLookup
public MvnRepoLookup()Instantiates a new mvn repo lookup.
-
-
Method Details
-
snapshotRepository
Sets the Maven snapshot repository URI.- Parameters:
uri- the snapshot repository URI- Returns:
- the mvn repo lookup
-
snapshotRepository
Returns the snapshot repository. Defaults tohttps://central.sonatype.com/repository/maven-snapshots/.- Returns:
- the uri
-
resolve
Add artifacts, specified by their coordinates (groupId:artifactId:version) with the given scope.- Parameters:
scope- the scopecoordinates- the coordinates- Returns:
- the mvn repo lookup
-
resolve
Add artifacts, specified by their coordinates (groupId:artifactId:version) as compilation resources.- Parameters:
coordinates- the coordinates- Returns:
- the mvn repo lookup
-
downloadSources
Whether to also download the sources. Defaults totrue.- Parameters:
enable- the enable- Returns:
- the mvn repo lookup
-
downloadJavadoc
Whether to also download the javadoc. Defaults totrue.- Parameters:
enable- the enable- Returns:
- the mvn repo lookup
-
doProvide
Provide.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
requested- the requested resources- Returns:
- the stream
-