public class ArtifactManager extends Object implements AutoCloseable
ArtifactProvider
s to get artifacts. The
providers are loaded using the service loader.Modifier and Type | Method and Description |
---|---|
void |
close() |
ArtifactHandler |
getArtifactHandler(String url)
Get the full artifact url and file for an artifact.
|
static ArtifactManager |
getArtifactManager(ArtifactManagerConfig config)
Get an artifact manager based on the configuration
|
protected String |
getFileContents(ArtifactHandler handler) |
static String |
getLatestSnapshot(String mavenMetadata) |
static String |
getValue(String xml,
String[] xpath) |
void |
shutdown()
Shutdown the artifact manager.
|
public static ArtifactManager getArtifactManager(ArtifactManagerConfig config) throws IOException
config
- The configurationIOException
- If the manager can't be initializedpublic void shutdown()
public void close()
close
in interface AutoCloseable
public ArtifactHandler getArtifactHandler(String url) throws IOException
url
- Artifact url or relative path.IOException
- If something goes wrong.protected String getFileContents(ArtifactHandler handler) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.