Package org.ops4j.pax.url.mvn
Interface MavenResolver
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AetherBasedResolver
public interface MavenResolver extends Closeable
A Maven resolver service
This is the main OSGi service entry point of this bundle. It can be tracked and used to perform Maven resolution for artifacts and metadata.
While the underlying
RepositorySystemis more powerful, not all functionality is exposed in this service (Maven/Resolver packages are not exported).The URLs handled must use
mvn:scheme.- Author:
- Guillaume Nodet, Grzegorz Grzybek
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMavenResolver.RetryChanceEnumeration of retry hints that may be used by client code when trying to repeat failed resolution attempt
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MavenResolver.RetryChanceisRetryableException(Exception exception)Returns a hint about possible retry of operation that ended withexceptionFileresolve(String url)Resolve and download a maven based urlFileresolve(String url, Exception previousException)Resolve and download a maven based url - possibly as another attempt.Fileresolve(String groupId, String artifactId, String classifier, String extension, String version)Resolve and download an artifactFileresolve(String groupId, String artifactId, String classifier, String extension, String version, Exception previousException)Resolve and download an artifact - possibly as another attempt.FileresolveMetadata(String groupId, String artifactId, String type, String version)Resolve the maven metadata xml for the specified groupId:artifactId:versionFileresolveMetadata(String groupId, String artifactId, String type, String version, Exception previousException)Resolve the maven metadata xml for the specified groupId:artifactId:version - possibly as another attempt.voidupload(String groupId, String artifactId, String classifier, String extension, String version, File artifact)Install the specified artifact in the local repositoryvoiduploadMetadata(String groupId, String artifactId, String type, String version, File artifact)Install the specified artifact metadata in the local repository
-
-
-
Method Detail
-
resolve
File resolve(String url) throws IOException
Resolve and download a maven based url- Throws:
IOException
-
resolve
File resolve(String url, Exception previousException) throws IOException
Resolve and download a maven based url - possibly as another attempt. SpecifyingpreviousExceptionis a hint for resolver.- Throws:
IOException
-
resolve
File resolve(String groupId, String artifactId, String classifier, String extension, String version) throws IOException
Resolve and download an artifact- Throws:
IOException
-
resolve
File resolve(String groupId, String artifactId, String classifier, String extension, String version, Exception previousException) throws IOException
Resolve and download an artifact - possibly as another attempt. SpecifyingpreviousExceptionis a hint for resolver.- Throws:
IOException
-
resolveMetadata
File resolveMetadata(String groupId, String artifactId, String type, String version) throws IOException
Resolve the maven metadata xml for the specified groupId:artifactId:version- Throws:
IOException
-
resolveMetadata
File resolveMetadata(String groupId, String artifactId, String type, String version, Exception previousException) throws IOException
Resolve the maven metadata xml for the specified groupId:artifactId:version - possibly as another attempt. SpecifyingpreviousExceptionis a hint for resolver.- Throws:
IOException
-
upload
void upload(String groupId, String artifactId, String classifier, String extension, String version, File artifact) throws IOException
Install the specified artifact in the local repository- Throws:
IOException
-
uploadMetadata
void uploadMetadata(String groupId, String artifactId, String type, String version, File artifact) throws IOException
Install the specified artifact metadata in the local repository- Throws:
IOException
-
isRetryableException
MavenResolver.RetryChance isRetryableException(Exception exception)
Returns a hint about possible retry of operation that ended withexception- Parameters:
exception-- Returns:
-
-