public interface MavenClient
To access get an instance of the client use MavenClientProvider.discoverProvider(ClassLoader) which will resolve the
implementation through SPI by loading an instance of MavenClientProvider that must be in the classpath.
| Modifier and Type | Method and Description |
|---|---|
org.apache.maven.model.Model |
getEffectiveModel(File artifactFile,
Optional<File> temporaryFolder)
Creates the effective pom model by reading the pom inside the artifact.
|
MavenConfiguration |
getMavenConfiguration() |
org.apache.maven.model.Model |
getRawPomModel(File artifactFile)
Creates the pom model by reading the pom inside the artifact.
|
List<BundleDependency> |
resolveArtifactDependencies(File artifactFile,
boolean includeTestDependencies,
boolean includeProvidedDependencies,
Optional<File> localRepositoryLocationSupplier,
Optional<File> temporaryFolder)
Resolves the artifact dependencies for an artifact.
|
List<BundleDependency> |
resolveArtifactDependencies(File artifactFile,
boolean includeTestDependencies,
boolean includeProvidedDependencies,
Optional<File> localRepositoryLocationSupplier,
Optional<MavenReactorResolver> mavenReactorResolver,
Optional<File> temporaryFolder)
Resolves the artifact dependencies for an artifact.
|
List<BundleDependency> |
resolveArtifactDependencies(List<BundleDescriptor> dependencies,
Optional<File> localRepositoryLocationSupplier,
Optional<MavenReactorResolver> mavenReactorResolver)
Resolves the artifact dependencies from the list for the given descriptor.
|
BundleDependency |
resolveBundleDescriptor(BundleDescriptor bundleDescriptor)
Retrieves the
BundleDependency for a BundleDescriptor. |
List<BundleDependency> |
resolveBundleDescriptorDependencies(boolean includeTestDependencies,
boolean includeProvidedDependencies,
BundleDescriptor bundleDescriptor)
Resolves dependencies of a bundle.
|
List<BundleDependency> |
resolveBundleDescriptorDependencies(boolean includeTestDependencies,
BundleDescriptor bundleDescriptor)
Resolves dependencies of a bundle.
|
List<BundleDependency> |
resolvePluginBundleDescriptorsDependencies(List<BundleDescriptor> bundleDescriptors)
Resolve the effective list of plugins.
|
VersionRangeResult |
resolveVersionRange(BundleDescriptor bundleDescriptor)
Resolves for a bundle descriptor with a version range the available versions from remote repositories.
|
MavenConfiguration getMavenConfiguration()
VersionRangeResult resolveVersionRange(BundleDescriptor bundleDescriptor)
bundleDescriptor - descriptor of the artifactVersionRangeResultList<BundleDependency> resolveArtifactDependencies(File artifactFile, boolean includeTestDependencies, boolean includeProvidedDependencies, Optional<File> localRepositoryLocationSupplier, Optional<File> temporaryFolder)
MavenConfiguration.getActiveProfiles() and MavenConfiguration.getInactiveProfiles().artifactFile - the artifact file to resolve the dependencies for. It may be an exploded archive
following the mule deployable artifact structure or a compressed artifact following
the maven conventions.includeTestDependencies - true if the test dependencies must be included in the list of direct dependencies,
false otherwise.includeProvidedDependencies - true if the provided dependencies must be included in the list of direct dependencies,
false otherwise.localRepositoryLocationSupplier - a supplier of the local repository folder location. It may be empty in which case the
one of the provided maven configuration will be used.temporaryFolder - to be used if the file is compressed. If present, it will be used as target to extract
required files. Otherwise, files will be handled in memory.List<BundleDependency> resolveArtifactDependencies(File artifactFile, boolean includeTestDependencies, boolean includeProvidedDependencies, Optional<File> localRepositoryLocationSupplier, Optional<MavenReactorResolver> mavenReactorResolver, Optional<File> temporaryFolder)
MavenConfiguration.getActiveProfiles() and MavenConfiguration.getInactiveProfiles().artifactFile - the artifact file to resolve the dependencies for. It may be an exploded archive
following the mule deployable artifact structure or a compressed artifact following
the maven conventions.includeTestDependencies - true if the test dependencies must be included in the list of direct dependencies,
false otherwise.includeProvidedDependencies - true if the provided dependencies must be included in the list of direct dependencies,
false otherwise.localRepositoryLocationSupplier - a supplier of the local repository folder location. It may be empty in which case the
one of the provided maven configuration will be used.mavenReactorResolver - MavenReactorResolver to look for artifacts first.temporaryFolder - to be used if the file is compressed. If present, it will be used as target to extract
required files. Otherwise, files will be handled in memory.List<BundleDependency> resolveArtifactDependencies(List<BundleDescriptor> dependencies, Optional<File> localRepositoryLocationSupplier, Optional<MavenReactorResolver> mavenReactorResolver)
dependencies - list of dependencies to be resolved, all treated as compile scope.localRepositoryLocationSupplier - a supplier of the local repository folder location. It may be empty in which case the
one of the provided maven configuration will be used.mavenReactorResolver - MavenReactorResolver to look for artifacts first.List<BundleDependency> resolveBundleDescriptorDependencies(boolean includeTestDependencies, BundleDescriptor bundleDescriptor)
MavenConfiguration.getActiveProfiles() and
MavenConfiguration.getInactiveProfiles() will not be considered when resolving the dependencies and building the pom
model.includeTestDependencies - true if the test dependencies must be included in the list, false otherwise.bundleDescriptor - descriptor of the artifactList<BundleDependency> resolveBundleDescriptorDependencies(boolean includeTestDependencies, boolean includeProvidedDependencies, BundleDescriptor bundleDescriptor)
MavenConfiguration.getActiveProfiles() and
MavenConfiguration.getInactiveProfiles() will not be considered when resolving the dependencies and building the pom
model.includeTestDependencies - true if the test dependencies must be included in the list, false otherwise.includeProvidedDependencies - true if the provided dependencies must be included in the list of direct dependencies,
false otherwise.bundleDescriptor - descriptor of the artifactBundleDependency resolveBundleDescriptor(BundleDescriptor bundleDescriptor)
BundleDependency for a BundleDescriptor.bundleDescriptor - the bundle descriptor.BundleDependencyList<BundleDependency> resolvePluginBundleDescriptorsDependencies(List<BundleDescriptor> bundleDescriptors)
bundleDescriptors - a list of plugins to resolve the effective list of plugins considering their dependenciesorg.apache.maven.model.Model getRawPomModel(File artifactFile)
The artifact can be a compressed file or an exploded artifact. The only requirement is that it contains the expected maven structure.
artifactFile - the compressed artifactorg.apache.maven.model.Model getEffectiveModel(File artifactFile, Optional<File> temporaryFolder)
The artifact can be a compressed file or an exploded artifact. The only requirement is that it contains the expected maven structure.
artifactFile - the compressed artifacttemporaryFolder - a folder to be used for creating temporary files.Copyright © 2025 MuleSoft, Inc.. All rights reserved.