aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-02-04 22:08:28 +0000
committerOlivier Lamy <olamy@apache.org>2012-02-04 22:08:28 +0000
commit5d6774f5f2560c02911c6e9846eccd08a12b86a8 (patch)
tree37f8fddca14439a8eba47861d6d5b65e32779ff6 /archiva-modules/metadata
parente258bfb349b02210a7de84821c798fa1fb75c5d8 (diff)
downloadarchiva-5d6774f5f2560c02911c6e9846eccd08a12b86a8.tar.gz
archiva-5d6774f5f2560c02911c6e9846eccd08a12b86a8.zip
[MRM-1599] NTLM proxy no longer works
use a new wagon with spring bean http-ntlm if proxy use ntlm git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1240623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/pom.xml4
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java19
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java22
3 files changed, 30 insertions, 15 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/pom.xml b/archiva-modules/metadata/metadata-repository-api/pom.xml
index b9c997704..d1847ce83 100644
--- a/archiva-modules/metadata/metadata-repository-api/pom.xml
+++ b/archiva-modules/metadata/metadata-repository-api/pom.xml
@@ -45,6 +45,10 @@
<artifactId>metadata-model</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-admin-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
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 36fd5dc3d..f56d72c16 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
@@ -19,6 +19,7 @@ package org.apache.archiva.metadata.repository;
* under the License.
*/
+import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.metadata.model.ArtifactMetadata;
import org.apache.archiva.metadata.model.ProjectMetadata;
import org.apache.archiva.metadata.model.ProjectVersionMetadata;
@@ -30,10 +31,8 @@ import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataN
import org.apache.archiva.repository.events.RepositoryListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
-import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.ArrayList;
@@ -71,8 +70,6 @@ public class DefaultMetadataResolver
* TODO: Also need to accommodate availability of proxy module
* ... could be a different type since we need methods to modify the storage metadata, which would also allow more
* appropriate methods to pass in the already determined repository configuration, for example, instead of the ID
- *
- *
*/
@Inject
@Named( value = "repositoryStorage#maven2" )
@@ -103,10 +100,8 @@ public class DefaultMetadataResolver
{
metadata = repositoryStorage.readProjectVersionMetadata( repoId, namespace, projectId, projectVersion );
- if ( log.isDebugEnabled() )
- {
- log.debug( "Resolved project version metadata from storage: " + metadata );
- }
+ log.debug( "Resolved project version metadata from storage: {}", metadata );
+
// FIXME: make this a more generic post-processing that plugins can take advantage of
// eg. maven projects should be able to process parent here
if ( !metadata.getDependencies().isEmpty() )
@@ -140,6 +135,14 @@ public class DefaultMetadataResolver
}
throw new MetadataResolutionException( e.getMessage(), e );
}
+ catch ( RepositoryAdminException e )
+ {
+ for ( RepositoryListener listener : listeners )
+ {
+ listener.addArtifactProblem( session, repoId, namespace, projectId, projectVersion, e );
+ }
+ throw new MetadataResolutionException( e.getMessage(), e );
+ }
catch ( RepositoryStorageMetadataNotFoundException e )
{
for ( RepositoryListener listener : listeners )
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java
index 1c894816b..f31f14aaf 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java
@@ -19,6 +19,7 @@ package org.apache.archiva.metadata.repository.storage;
* under the License.
*/
+import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.metadata.model.ArtifactMetadata;
import org.apache.archiva.metadata.model.ProjectMetadata;
import org.apache.archiva.metadata.model.ProjectVersionMetadata;
@@ -33,19 +34,26 @@ public interface RepositoryStorage
ProjectVersionMetadata readProjectVersionMetadata( String repoId, String namespace, String projectId,
String projectVersion )
- throws RepositoryStorageMetadataInvalidException, RepositoryStorageMetadataNotFoundException;
+ throws RepositoryStorageMetadataInvalidException, RepositoryStorageMetadataNotFoundException,
+ RepositoryAdminException;
- Collection<String> listRootNamespaces( String repoId, Filter<String> filter );
+ Collection<String> listRootNamespaces( String repoId, Filter<String> filter )
+ throws RepositoryAdminException;
- Collection<String> listNamespaces( String repoId, String namespace, Filter<String> filter );
+ Collection<String> listNamespaces( String repoId, String namespace, Filter<String> filter )
+ throws RepositoryAdminException;
- Collection<String> listProjects( String repoId, String namespace, Filter<String> filter );
+ Collection<String> listProjects( String repoId, String namespace, Filter<String> filter )
+ throws RepositoryAdminException;
- Collection<String> listProjectVersions( String repoId, String namespace, String projectId, Filter<String> filter );
+ Collection<String> listProjectVersions( String repoId, String namespace, String projectId, Filter<String> filter )
+ throws RepositoryAdminException;
Collection<ArtifactMetadata> readArtifactsMetadata( String repoId, String namespace, String projectId,
- String projectVersion, Filter<String> filter );
+ String projectVersion, Filter<String> filter )
+ throws RepositoryAdminException;
// FIXME: reconsider this API, do we want to expose storage format in the form of a path?
- ArtifactMetadata readArtifactMetadataFromPath( String repoId, String path );
+ ArtifactMetadata readArtifactMetadataFromPath( String repoId, String path )
+ throws RepositoryAdminException;
}