diff options
author | Olivier Lamy <olamy@apache.org> | 2014-06-11 02:44:41 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-06-11 02:44:41 +1000 |
commit | 7972d750820c9e725fbd7894f288afdbe44660c6 (patch) | |
tree | 6baa9c050a12ce5e2496f80b1ad1bcb3448873b6 /archiva-modules/plugins/maven2-repository/src | |
parent | 6b1e26c792b6189347af48105148d4d1e43a276e (diff) | |
download | archiva-7972d750820c9e725fbd7894f288afdbe44660c6.tar.gz archiva-7972d750820c9e725fbd7894f288afdbe44660c6.zip |
[MRM-1846] Regression in 2.0.1 : uniqueVersion false not supported
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.java | 29 |
1 files changed, 15 insertions, 14 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 6db2b79ab..f1027f255 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 @@ -102,12 +102,12 @@ import java.util.Map; * Maven 2 repository format storage implementation. This class currently takes parameters to indicate the repository to * deal with rather than being instantiated per-repository. * FIXME: instantiate one per repository and allocate permanently from a factory (which can be obtained within the session). - * <p> + * <p/> * The session is passed in as an argument to obtain any necessary resources, rather than the class being instantiated * within the session in the context of a single managed repository's resolution needs. - * <p> + * <p/> */ -@Service( "repositoryStorage#maven2" ) +@Service("repositoryStorage#maven2") public class Maven2RepositoryStorage implements RepositoryStorage { @@ -129,7 +129,7 @@ public class Maven2RepositoryStorage private NetworkProxyAdmin networkProxyAdmin; @Inject - @Named( "repositoryPathTranslator#maven2" ) + @Named("repositoryPathTranslator#maven2") private RepositoryPathTranslator pathTranslator; @Inject @@ -139,7 +139,7 @@ public class Maven2RepositoryStorage private ApplicationContext applicationContext; @Inject - @Named( "pathParser#default" ) + @Named("pathParser#default") private PathParser pathParser; private static final String METADATA_FILENAME_START = "maven-metadata"; @@ -402,8 +402,7 @@ public class Maven2RepositoryStorage private List<org.apache.archiva.metadata.model.Dependency> convertDependencies( List<Dependency> dependencies ) { - List<org.apache.archiva.metadata.model.Dependency> l = - new ArrayList<>(); + List<org.apache.archiva.metadata.model.Dependency> l = new ArrayList<>(); for ( Dependency dependency : dependencies ) { org.apache.archiva.metadata.model.Dependency newDependency = @@ -461,8 +460,7 @@ public class Maven2RepositoryStorage private List<org.apache.archiva.metadata.model.MailingList> convertMailingLists( List<MailingList> mailingLists ) { - List<org.apache.archiva.metadata.model.MailingList> l = - new ArrayList<>(); + List<org.apache.archiva.metadata.model.MailingList> l = new ArrayList<>(); for ( MailingList mailingList : mailingLists ) { org.apache.archiva.metadata.model.MailingList newMailingList = @@ -810,11 +808,14 @@ public class Maven2RepositoryStorage // org/apache/archiva/archiva-checksum/1.4-M4-SNAPSHOT/archiva-checksum-1.4-M4-SNAPSHOT.jar // -> archiva-checksum-1.4-M4-20130425.081822-1.jar - filePath = - StringUtils.replace( filePath, artifactReference.getArtifactId() + "-" + artifactReference.getVersion(), - artifactReference.getArtifactId() + "-" + StringUtils.remove( - artifactReference.getVersion(), "-" + VersionUtil.SNAPSHOT ) + "-" + timestamp - + "-" + buildNumber ); + filePath = StringUtils.replace( filePath, // + artifactReference.getArtifactId() // + + "-" + artifactReference.getVersion(), // + artifactReference.getArtifactId() // + + "-" + StringUtils.remove( artifactReference.getVersion(), + "-" + VersionUtil.SNAPSHOT ) // + + "-" + timestamp // + + "-" + buildNumber ); throw new RelocationException( "/repository/" + managedRepositoryContent.getRepository().getId() + ( StringUtils.startsWith( filePath, "/" ) ? "" : "/" ) + filePath, |