public void expose()

in src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java [72:91]


    public void expose(JarIdentification identification, JarAnalyzer jarAnalyzer) {
        List<Artifact> repohits = new ArrayList<>();

        String hash = fileHashAnalyzer.computeHash(jarAnalyzer);
        if (hash != null) {
            repohits.addAll(repositoryHashSearch.searchFileHash(hash));
        }

        String bytecodehash = bytecodeHashAnalyzer.computeHash(jarAnalyzer);
        if (bytecodehash != null) {
            repohits.addAll(repositoryHashSearch.searchBytecodeHash(bytecodehash));
        }

        // Found hits in the repository.
        for (Artifact artifact : repohits) {
            identification.addAndSetGroupId(artifact.getGroupId());
            identification.addAndSetArtifactId(artifact.getArtifactId());
            identification.addAndSetVersion(artifact.getVersion());
        }
    }