diff options
author | Brett Porter <brett@apache.org> | 2009-12-24 04:02:11 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-12-24 04:02:11 +0000 |
commit | 1f1252456ab9bbf2b5575f8d22d993e91e7bccb1 (patch) | |
tree | 6ea9c3af1fdfeeb141ba7400eb688c70f211be4a /archiva-modules/metadata/metadata-repository-api/src | |
parent | 79de06cf3e28ff6e0bb6b917e2a6ddcd2cbeef4b (diff) | |
download | archiva-1f1252456ab9bbf2b5575f8d22d993e91e7bccb1.tar.gz archiva-1f1252456ab9bbf2b5575f8d22d993e91e7bccb1.zip |
[MRM-1283] keep track of incomplete metadata so that it can self correct and show a meaningful message to the user
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@893691 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-repository-api/src')
-rw-r--r-- | archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java index 15fd9c485..a0d7d7f90 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java @@ -68,7 +68,10 @@ public class DefaultMetadataResolver metadataRepository.getProjectVersion( repoId, namespace, projectId, projectVersion ); // TODO: do we want to detect changes as well by comparing timestamps? isProjectVersionNewerThan(updated) // in such cases we might also remove/update stale metadata, including adjusting plugin-based facets - if ( metadata == null ) + // This would also be better than checking for completeness - we can then refresh only when fixed (though + // sometimes this has an additional dependency - such as a parent - requesting the user to force an update + // may then work here and be more efficient than always trying again) + if ( metadata == null || metadata.isIncomplete() ) { metadata = storageResolver.getProjectVersion( repoId, namespace, projectId, projectVersion ); if ( metadata != null ) |