DependencyResolver
public class MavenDependencyResolver extends Object implements DependencyResolver
There was an initial attempt to use maven-resolver for this, but that depends on a newer version of Apache Http Client that is not compatible with the one expected to be on the classpath for Android 16-18.
This uses only basic HttpURLConnection
for fetching. In general using an HTTP
client library here could create conflicts with the ones in the Android system.
Constructor | Description |
---|---|
MavenDependencyResolver() |
|
MavenDependencyResolver(String repositoryUrl,
String repositoryId,
String repositoryUserName,
String repositoryPassword) |
Modifier and Type | Method | Description |
---|---|---|
protected ExecutorService |
createExecutorService() |
|
protected MavenArtifactFetcher |
createMavenFetcher(String repositoryUrl,
String repositoryUserName,
String repositoryPassword,
File localRepositoryDir,
ExecutorService executorService) |
|
URL |
getLocalArtifactUrl(DependencyJar dependency) |
|
URL[] |
getLocalArtifactUrls(DependencyJar dependency) |
Returns URLs representing the full transitive dependency graph of the given Maven dependency.
|
URL[] |
getLocalArtifactUrls(DependencyJar... dependencies) |
Get an array of local artifact URLs for the given dependencies.
|
protected File |
getLocalRepositoryDir() |
Locates the local maven repo.
|
public URL[] getLocalArtifactUrls(DependencyJar dependency)
DependencyResolver
getLocalArtifactUrls
in interface DependencyResolver
public URL[] getLocalArtifactUrls(DependencyJar... dependencies)
public URL getLocalArtifactUrl(DependencyJar dependency)
getLocalArtifactUrl
in interface DependencyResolver
protected File getLocalRepositoryDir()
protected MavenArtifactFetcher createMavenFetcher(String repositoryUrl, String repositoryUserName, String repositoryPassword, File localRepositoryDir, ExecutorService executorService)
protected ExecutorService createExecutorService()