uploadContext.getGroupId(), uploadContext.getArtifactId(), uploadContext.getVersion(),
uploadContext.getPackaging(), uploadContext.getClassifier(),
uploadContext.getExtension());
}
final MavenRepository mr = gavRequest.getMavenRepository();
final ArtifactStoreHelper helper = mr.getArtifactStoreHelper();
// temporarily we disable SNAPSHOT upload
// check is it a Snapshot repo
if (RepositoryPolicy.SNAPSHOT.equals(mr.getRepositoryPolicy())) {
getLogger().info("Upload to SNAPSHOT maven repository {} attempted, returning Bad Request.",
mr);
throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,
"This is a Maven SNAPSHOT repository, and manual upload against it is forbidden!");
}
if (!versionMatchesPolicy(gavRequest.getVersion(), mr.getRepositoryPolicy())) {
getLogger().info("Artifact version {} and {} Repository Policy {} mismatch",
gavRequest.getVersion(), mr, mr.getRepositoryPolicy());
throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "The version "
+ gavRequest.getVersion() + " does not match the repository policy!");
}
if (isPom) {