diff options
author | Olivier Lamy <olamy@apache.org> | 2013-12-11 03:40:08 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-12-11 03:40:08 +0000 |
commit | 664497ee03208ec1d35143eb038cbc58b7d36c1d (patch) | |
tree | 707a3ec778da90cf3b3d33e3d4a9a01a00e90739 | |
parent | 8039adacd02a213db57e3e52f702ed4819b52290 (diff) | |
download | archiva-664497ee03208ec1d35143eb038cbc58b7d36c1d.tar.gz archiva-664497ee03208ec1d35143eb038cbc58b7d36c1d.zip |
use constant
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550043 13f79535-47bb-0310-9956-ffa450edef68
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 ); |