Package org.apache.camel.tooling.maven
Interface MavenDownloader
- All Known Implementing Classes:
MavenDownloaderImpl
public interface MavenDownloader
Pragmatic Maven download/resolution API that should replace usage of Ivy/Grape and Shrinkwrap across Camel.
-
Method Summary
Modifier and TypeMethodDescriptionExisting, configuredMavenDownloadercan be used as a template to create customized version which shares most of the configuration except underlyingorg.eclipse.aether.RepositorySystemSession, which can't be shared.resolveArtifacts(List<String> dependencyGAVs, Set<String> extraRepositories, boolean transitively, boolean useApacheSnapshots) Main resolution method.resolveAvailableVersions(String groupId, String artifactId, String repository) Resolves available versions for groupId + artifactId from single remote repository.voidTo use a listener when downloading from remote repositories.
-
Method Details
-
resolveArtifacts
List<MavenArtifact> resolveArtifacts(List<String> dependencyGAVs, Set<String> extraRepositories, boolean transitively, boolean useApacheSnapshots) throws MavenResolutionException Main resolution method. Using Maven Resolver, a list of maven coordinates (in the form ofgroupId:artifactId[:packaging[:classifier]]:version) is used to download artifacts from configured Maven repositories.- Parameters:
dependencyGAVs- a list of Maven coordinatesextraRepositories- nullable list of additional repositories to use (except the discovered ones)transitively- whether to download/resolve dependencies transitivelyuseApacheSnapshots- whether to include Apache Snapshots repository in the list of used repositories- Throws:
MavenResolutionException
-
resolveAvailableVersions
List<MavenGav> resolveAvailableVersions(String groupId, String artifactId, String repository) throws MavenResolutionException Resolves available versions for groupId + artifactId from single remote repository.- Parameters:
groupId- groupIdartifactId- artifactIdrepository- external repository to use (defaults to Maven Central ifnull)- Throws:
MavenResolutionException
-
customize
Existing, configuredMavenDownloadercan be used as a template to create customized version which shares most of the configuration except underlyingorg.eclipse.aether.RepositorySystemSession, which can't be shared. -
setRemoteArtifactDownloadListener
To use a listener when downloading from remote repositories.
-