artifact.getClassifier());
JcrUtils.updateLastModified(fileNode);
+ // make sure there is a checksum
+ String shaNodeName = fileNode.getName() + ".sha1";
+ if (!fileNode.getParent().hasNode(shaNodeName)) {
+ String sha = JcrUtils.checksumFile(fileNode, "SHA-1");
+ JcrUtils.copyBytesAsFile(fileNode.getParent(), shaNodeName,
+ sha.getBytes());
+ }
+
// set higher levels
Node artifactVersionBase = fileNode.getParent();
if (!artifactVersionBase
artifact.getGroupId());
}
JcrUtils.updateLastModifiedAndParents(groupBase,
- RepoConstants.ARTIFACTS_BASE_PATH);
+ RepoConstants.DEFAULT_ARTIFACTS_BASE_PATH);
if (log.isTraceEnabled())
log.trace("Indexed artifact " + artifact + " on " + fileNode);
}
private String getRelativePath(String nodePath) {
- String basePath = RepoConstants.ARTIFACTS_BASE_PATH;
+ String basePath = RepoConstants.DEFAULT_ARTIFACTS_BASE_PATH;
if (!nodePath.startsWith(basePath))
return null;
String relativePath = nodePath.substring(basePath.length());