aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/maven2-repository/src
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/plugins/maven2-repository/src')
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java4
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
index 94cfd4302..8dab2bfef 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
@@ -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(
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
index 696eb53d7..59c2a8cd4 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
@@ -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 );