if (!isLocalOnly) {
resolvedFile = helper.retrieveArtifact(gavRequest);
}
ArtifactResolveResource resource = new ArtifactResolveResource();
resource.setPresentLocally(resolvedFile != null);
if (resolvedFile != null) {
resource.setSha1(resolvedFile.getRepositoryItemAttributes().get(DigestCalculatingInspector.DIGEST_SHA1_KEY));
}
resource.setGroupId(resolvedGav.getGroupId());
resource.setArtifactId(resolvedGav.getArtifactId());
resource.setVersion(resolvedGav.getVersion());
resource.setClassifier(resolvedGav.getClassifier());
resource.setExtension(resolvedGav.getExtension());
resource.setFileName(resolvedGav.getName());
resource.setRepositoryPath(repositoryPath);
resource.setSnapshot(resolvedGav.isSnapshot());
if (resource.isSnapshot()) {
resource.setBaseVersion(resolvedGav.getBaseVersion());
if (resolvedGav.getSnapshotBuildNumber() != null) {
resource.setSnapshotBuildNumber(resolvedGav.getSnapshotBuildNumber());
resource.setSnapshotTimeStamp(resolvedGav.getSnapshotTimeStamp());
}
}
ArtifactResolveResourceResponse result = new ArtifactResolveResourceResponse();