Class NexusV2Search
java.lang.Object
org.owasp.dependencycheck.data.nexus.NexusV2Search
- All Implemented Interfaces:
NexusSearch
Class of methods to search Nexus repositories.
- Author:
- colezlaw
-
Constructor Summary
ConstructorsConstructorDescriptionNexusV2Search(Settings settings, boolean useProxy) Creates a NexusSearch for the given repository URL. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDo a preflight request to see if the repository is actually working.searchSha1(String sha1) Searches the configured Nexus repository for the given sha1 hash.
-
Constructor Details
-
NexusV2Search
Creates a NexusSearch for the given repository URL.- Parameters:
settings- the configured settingsuseProxy- flag indicating if the proxy settings should be used- Throws:
MalformedURLException- thrown if the configured URL is invalid
-
-
Method Details
-
searchSha1
Description copied from interface:NexusSearchSearches the configured Nexus repository for the given sha1 hash. If the artifact is found, aMavenArtifactis populated with the coordinate information.- Specified by:
searchSha1in interfaceNexusSearch- Parameters:
sha1- The SHA-1 hash string for which to search- Returns:
- the populated Maven coordinates
- Throws:
IOException- if it's unable to connect to the specified repository or if the specified artifact is not found.
-
preflightRequest
public boolean preflightRequest()Description copied from interface:NexusSearchDo a preflight request to see if the repository is actually working.- Specified by:
preflightRequestin interfaceNexusSearch- Returns:
- whether the repository is listening and returns the expected status response
-