Class NexusV3Search
java.lang.Object
org.owasp.dependencycheck.data.nexus.NexusV3Search
- All Implemented Interfaces:
NexusSearch
Class of methods to search Nexus v3 repositories.
- Author:
- Hans Aikema
-
Constructor Summary
ConstructorsConstructorDescriptionNexusV3Search(Settings settings, boolean useProxy) Creates a NexusV3Search 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
-
NexusV3Search
Creates a NexusV3Search 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
-