catch (IOException e) {
throw new LocalStorageException("Could not get the content from the ContentLocator!", e);
}
StorageFileItem storedFile =
(StorageFileItem) getMavenRepository().retrieveItem(false, new ResourceStoreRequest(item));
ResourceStoreRequest req = new ResourceStoreRequest(storedFile);
String sha1Hash = storedFile.getRepositoryItemAttributes().get(DigestCalculatingInspector.DIGEST_SHA1_KEY);
String md5Hash = storedFile.getRepositoryItemAttributes().get(DigestCalculatingInspector.DIGEST_MD5_KEY);
if (!StringUtils.isEmpty(sha1Hash)) {
req.setRequestPath(item.getPath() + ".sha1");
getMavenRepository().storeItem(
false,
new DefaultStorageFileItem(getMavenRepository(), req, true, true, new StringContentLocator(
sha1Hash)));
}
if (!StringUtils.isEmpty(md5Hash)) {
req.setRequestPath(item.getPath() + ".md5");
getMavenRepository().storeItem(
false,
new DefaultStorageFileItem(getMavenRepository(), req, true, true, new StringContentLocator(
md5Hash)));