[MRM-161] move the query layer to a separate module

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@440260 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2006-09-05 05:12:31 +00:00
parent f85defbfa5
commit d29cdf4ab1
17 changed files with 78 additions and 18 deletions

View File

@ -57,6 +57,10 @@
<groupId>org.apache.maven.archiva</groupId> <groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-utils</artifactId> <artifactId>archiva-utils</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-repository-layer</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven.archiva</groupId> <groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-indexer</artifactId> <artifactId>archiva-indexer</artifactId>

View File

@ -16,6 +16,8 @@ package org.apache.maven.archiva.reporting;
* limitations under the License. * limitations under the License.
*/ */
import org.apache.maven.archiva.layer.RepositoryQueryLayer;
import org.apache.maven.archiva.layer.RepositoryQueryLayerFactory;
import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;

View File

@ -16,6 +16,7 @@ package org.apache.maven.archiva.reporting;
* limitations under the License. * limitations under the License.
*/ */
import org.apache.maven.archiva.layer.RepositoryQueryLayer;
import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;

View File

@ -16,6 +16,8 @@ package org.apache.maven.archiva.reporting;
* limitations under the License. * limitations under the License.
*/ */
import org.apache.maven.archiva.layer.CachedRepositoryQueryLayer;
import org.apache.maven.archiva.layer.RepositoryQueryLayerException;
import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;

View File

@ -17,6 +17,7 @@ package org.apache.maven.archiva.reporting;
*/ */
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.archiva.layer.Cache;
/** /**
* *

View File

@ -1,5 +1,7 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.reporting;
import org.apache.maven.archiva.layer.CachedRepositoryQueryLayer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.
* *

View File

@ -16,6 +16,7 @@ package org.apache.maven.archiva.reporting;
* limitations under the License. * limitations under the License.
*/ */
import org.apache.maven.archiva.layer.RepositoryQueryLayer;
import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.metadata.Snapshot; import org.apache.maven.artifact.repository.metadata.Snapshot;
@ -25,7 +26,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
/** /**
* *
*/ */
public class MockRepositoryQueryLayer public class MockRepositoryQueryLayer
implements RepositoryQueryLayer implements RepositoryQueryLayer

View File

@ -0,0 +1,43 @@
<?xml version="1.0"?>
<!--
~ Copyright 2005-2006 The Apache Software Foundation.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project>
<parent>
<artifactId>archiva</artifactId>
<groupId>org.apache.maven.archiva</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-repository-layer</artifactId>
<name>Archiva Repository Interface Layer</name>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.
@ -23,7 +23,7 @@ import org.apache.maven.artifact.repository.metadata.Snapshot;
/** /**
* *
*/ */
public class CachedRepositoryQueryLayer public class CachedRepositoryQueryLayer
extends AbstractRepositoryQueryLayer extends AbstractRepositoryQueryLayer

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.
@ -19,7 +19,7 @@ package org.apache.maven.archiva.reporting;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
/** /**
* *
*/ */
public class DefaultRepositoryQueryLayer public class DefaultRepositoryQueryLayer
extends AbstractRepositoryQueryLayer extends AbstractRepositoryQueryLayer

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.
@ -22,8 +22,8 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
* Gets the default implementation of a repository query layer for the given repository. * Gets the default implementation of a repository query layer for the given repository.
* *
* @author <a href="mailto:brett@apache.org">Brett Porter</a> * @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id$ * @version $Id:DefaultRepositoryQueryLayerFactory.java 437105 2006-08-26 17:22:22 +1000 (Sat, 26 Aug 2006) brett $
* @plexus.component role="org.apache.maven.archiva.reporting.RepositoryQueryLayerFactory" * @plexus.component role="org.apache.maven.archiva.layer.RepositoryQueryLayerFactory"
*/ */
public class DefaultRepositoryQueryLayerFactory public class DefaultRepositoryQueryLayerFactory
implements RepositoryQueryLayerFactory implements RepositoryQueryLayerFactory

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.
@ -30,9 +30,6 @@ public interface RepositoryQueryLayer
boolean containsArtifact( Artifact artifact ); boolean containsArtifact( Artifact artifact );
/**
* @todo I believe we can remove this [BP] - artifact should contain all the necessary version info!
*/
boolean containsArtifact( Artifact artifact, Snapshot snapshot ); boolean containsArtifact( Artifact artifact, Snapshot snapshot );
List getVersions( Artifact artifact ) List getVersions( Artifact artifact )

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.reporting; package org.apache.maven.archiva.layer;
/* /*
* Copyright 2005-2006 The Apache Software Foundation. * Copyright 2005-2006 The Apache Software Foundation.
@ -22,7 +22,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
* Gets the preferred implementation of a repository query layer for the given repository. * Gets the preferred implementation of a repository query layer for the given repository.
* *
* @author <a href="mailto:brett@apache.org">Brett Porter</a> * @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id$ * @version $Id:RepositoryQueryLayerFactory.java 437105 2006-08-26 17:22:22 +1000 (Sat, 26 Aug 2006) brett $
*/ */
public interface RepositoryQueryLayerFactory public interface RepositoryQueryLayerFactory
{ {

View File

@ -14,7 +14,8 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
@ -126,6 +127,7 @@
<module>archiva-core</module> <module>archiva-core</module>
<module>archiva-configuration</module> <module>archiva-configuration</module>
<module>maven-meeper</module> <module>maven-meeper</module>
<module>archiva-repository-layer</module>
</modules> </modules>
<dependencies> <dependencies>
<dependency> <dependency>
@ -212,6 +214,11 @@
<artifactId>archiva-discoverer</artifactId> <artifactId>archiva-discoverer</artifactId>
<version>${pom.version}</version> <version>${pom.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-repository-layer</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven.archiva</groupId> <groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-indexer</artifactId> <artifactId>archiva-indexer</artifactId>