Browse Source

use constant

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550043 13f79535-47bb-0310-9956-ffa450edef68
tags/archiva-2.0.0-RC1
Olivier Lamy 10 years ago
parent
commit
664497ee03

+ 2
- 2
archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java View File

@@ -786,7 +786,7 @@ public class Maven2RepositoryStorage
return filePath;
}

if ( StringUtils.endsWith( artifactReference.getVersion(), "SNAPSHOT" ) )
if ( StringUtils.endsWith( artifactReference.getVersion(), VersionUtil.SNAPSHOT ) )
{
// read maven metadata to get last timestamp
File metadataDir = new File( managedRepositoryContent.getRepoRoot(), filePath ).getParentFile();
@@ -809,7 +809,7 @@ public class Maven2RepositoryStorage
filePath =
StringUtils.replace( filePath, artifactReference.getArtifactId() + "-" + artifactReference.getVersion(),
artifactReference.getArtifactId() + "-" + StringUtils.remove(
artifactReference.getVersion(), "-SNAPSHOT" ) + "-" + timestamp + "-"
artifactReference.getVersion(), "-" + VersionUtil.SNAPSHOT ) + "-" + timestamp + "-"
+ buildNumber );

throw new RelocationException(

+ 2
- 2
archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java View File

@@ -176,8 +176,8 @@ public class RepositoryModelResolver
int buildNumber = snapshotVersion.getBuildNumber();
String snapshotPath =
StringUtils.replaceChars( groupId, '.', '/' ) + '/' + artifactId + '/' + version + '/'
+ artifactId + '-' + StringUtils.remove( version, "-SNAPSHOT" ) + '-' + lastVersion + '-'
+ buildNumber + ".pom";
+ artifactId + '-' + StringUtils.remove( version, "-" + VersionUtil.SNAPSHOT )
+ '-' + lastVersion + '-' + buildNumber + ".pom";

log.debug( "use snapshot path {} for maven coordinate {}:{}:{}", snapshotPath, groupId, artifactId,
version );

Loading…
Cancel
Save