/** * Indexes all of the discovered artifacts using the given directory as the base directory * (for determining canonical archive paths). * @param workDir */ public void index(File workDir) { for (DiscoveredArtifact artifact : getArtifacts()) { String archivePath = determineArchivePath(workDir, artifact.getFile()); artifact.setArchivePath(archivePath); index.put(archivePath, artifact); } }