@ThreadSafe
public class ArtifactorySearch
extends java.lang.Object
Constructor and Description |
---|
ArtifactorySearch(Settings settings)
Creates a NexusSearch for the given repository URL.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
init(com.fasterxml.jackson.core.JsonParser parser) |
boolean |
preflightRequest()
Performs a pre-flight request to ensure the Artifactory service is
reachable.
|
protected java.util.List<MavenArtifact> |
processResponse(Dependency dependency,
java.net.HttpURLConnection conn)
Process the Artifactory response.
|
java.util.List<MavenArtifact> |
search(Dependency dependency)
Searches the configured Central URL for the given hash (MD5, SHA1 and
SHA256).
|
public ArtifactorySearch(Settings settings)
settings
- the configured settingspublic java.util.List<MavenArtifact> search(Dependency dependency) throws java.io.IOException
MavenArtifact
is
populated with the GAV.dependency
- the dependency for which to search (search is based on
hashes)java.io.FileNotFoundException
- if the specified artifact is not foundjava.io.IOException
- if it's unable to connect to the specified repositoryprotected java.util.List<MavenArtifact> processResponse(Dependency dependency, java.net.HttpURLConnection conn) throws java.io.IOException
dependency
- the dependencyconn
- the HTTP URL Connectionjava.io.IOException
- thrown if there is an I/O errorprotected boolean init(com.fasterxml.jackson.core.JsonParser parser) throws java.io.IOException
java.io.IOException
public boolean preflightRequest()
true
if Artifactory could be reached; otherwise
false
.Copyright© 2012-21 Jeremy Long. All Rights Reserved.