public class ArtifactManager extends Object implements AutoCloseable, ArtifactProvider
ArtifactProviders 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) |
URL |
provide(ArtifactId id)
Provide the artifact with the given id.
|
void |
shutdown()
Shutdown the artifact manager.
|
FeatureProvider |
toFeatureProvider()
Return a feature provider based on this 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 AutoCloseablepublic URL provide(ArtifactId id)
ArtifactProviderprovide in interface ArtifactProviderid - The artifact idnullpublic FeatureProvider toFeatureProvider()
public ArtifactHandler getArtifactHandler(String url) throws IOException
url - Artifact url or relative path.IOException - If something goes wrong or the artifact can't be found.protected String getFileContents(ArtifactHandler handler) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.