updateMetadata( metadata, metadataFile, lastUpdatedTimestamp, artifact );
}
- Collection<ArtifactMetadata> artifacts =
- metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
- artifact.getVersion() );
+ Collection<ArtifactMetadata> artifacts = Collections.emptyList();
+
+ if ( snapshotVersion )
+ {
+ String baseVersion = VersionUtil.getBaseVersion( artifact.getVersion() );
+ artifacts =
+ metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
+ baseVersion );
+ }
+ else
+ {
+ artifacts =
+ metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
+ artifact.getVersion() );
+ }
+
+ log.debug( "artifacts: {}", artifacts );
for ( ArtifactMetadata artifactMetadata : artifacts )
{
}
finally
{
+
repositorySession.save();
repositorySession.close();