archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1170883 - in /archiva/trunk/archiva-modules: archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/ archiva-base/archiva-indexer/src/test/...
Date Wed, 14 Sep 2011 22:52:24 GMT
Author: olamy
Date: Wed Sep 14 22:52:22 2011
New Revision: 1170883

URL: http://svn.apache.org/viewvc?rev=1170883&view=rev
Log:
more tests on search rest services
prevent copying files for test in archiva-indexer : with scan activated some results were false

Added:
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom
      - copied, changed from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom
Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractNexusRepositorySearch.java
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java (original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java Wed Sep 14 22:52:22 2011
@@ -187,6 +187,12 @@ public class NexusRepositorySearch
                    Occur.MUST );
         }
 
+        if ( StringUtils.isNotBlank( searchFields.getClassifier() ) )
+        {
+            q.add( indexer.constructQuery( MAVEN.CLASSIFIER, new StringSearchExpression( searchFields.getClassifier() ) ),
+                   Occur.MUST );
+        }
+
         if ( q.getClauses() == null || q.getClauses().length <= 0 )
         {
             throw new RepositorySearchException( "No search fields set." );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java (original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java Wed Sep 14 22:52:22 2011
@@ -83,6 +83,8 @@ public class SearchFields
      */
     private String bundleExportService;
 
+    private String classifier;
+
     public SearchFields()
     {
         // no op
@@ -200,13 +202,33 @@ public class SearchFields
         this.bundleExportService = bundleExportService;
     }
 
+    public String getClassifier()
+    {
+        return classifier;
+    }
+
+    public void setClassifier( String classifier )
+    {
+        this.classifier = classifier;
+    }
+
     @Override
     public String toString()
     {
-        return "SearchFields{" + "groupId='" + groupId + '\'' + ", artifactId='" + artifactId + '\'' + ", version='"
-            + version + '\'' + ", packaging='" + packaging + '\'' + ", className='" + className + '\''
-            + ", repositories=" + repositories + ", bundleVersion='" + bundleVersion + '\'' + ", bundleSymbolicName='"
-            + bundleSymbolicName + '\'' + ", bundleExportPackage='" + bundleExportPackage + '\''
-            + ", bundleExportService='" + bundleExportService + '\'' + '}';
+        final StringBuilder sb = new StringBuilder();
+        sb.append( "SearchFields" );
+        sb.append( "{groupId='" ).append( groupId ).append( '\'' );
+        sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
+        sb.append( ", version='" ).append( version ).append( '\'' );
+        sb.append( ", packaging='" ).append( packaging ).append( '\'' );
+        sb.append( ", className='" ).append( className ).append( '\'' );
+        sb.append( ", repositories=" ).append( repositories );
+        sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
+        sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
+        sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
+        sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
+        sb.append( ", classifier='" ).append( classifier ).append( '\'' );
+        sb.append( '}' );
+        return sb.toString();
     }
 }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java (original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java Wed Sep 14 22:52:22 2011
@@ -127,6 +127,7 @@ public class SearchResultHit
      */
     private String bundleRequireBundle;
 
+    private String classifier;
 
     public String getContext()
     {
@@ -333,6 +334,16 @@ public class SearchResultHit
         return getPackaging();
     }
 
+    public String getClassifier()
+    {
+        return classifier;
+    }
+
+    public void setClassifier( String classifier )
+    {
+        this.classifier = classifier;
+    }
+
     @Override
     public String toString()
     {
@@ -357,6 +368,7 @@ public class SearchResultHit
         sb.append( ", bundleDocUrl='" ).append( bundleDocUrl ).append( '\'' );
         sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
         sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
+        sb.append( ", classifier='" ).append( classifier ).append( '\'' );
         sb.append( '}' );
         return sb.toString();
     }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractNexusRepositorySearch.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractNexusRepositorySearch.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractNexusRepositorySearch.java (original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractNexusRepositorySearch.java Wed Sep 14 22:52:22 2011
@@ -24,25 +24,28 @@ import org.apache.archiva.admin.reposito
 import org.apache.archiva.common.plexusbridge.MavenIndexerUtils;
 import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.archiva.common.utils.FileUtil;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.Configuration;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.index.ArtifactContext;
 import org.apache.maven.index.ArtifactContextProducer;
+import org.apache.maven.index.ArtifactScanningListener;
 import org.apache.maven.index.NexusIndexer;
+import org.apache.maven.index.ScanningResult;
 import org.apache.maven.index.context.IndexingContext;
-import org.apache.maven.index.context.UnsupportedExistingLuceneIndexException;
 import org.easymock.MockControl;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import javax.inject.Inject;
 import java.io.File;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -55,6 +58,8 @@ public abstract class AbstractNexusRepos
     extends TestCase
 {
 
+    protected Logger log = LoggerFactory.getLogger( getClass() );
+
     public static String TEST_REPO_1 = "nexus-search-test-repo";
 
     public static String TEST_REPO_2 = "nexus-search-test-repo-2";
@@ -83,13 +88,11 @@ public abstract class AbstractNexusRepos
     {
         super.setUp();
 
-        FileUtils.deleteDirectory(
-            new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1 + "/.indexer" ) );
-        assertFalse( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1 + "/.indexer" ).exists() );
-
-        FileUtils.deleteDirectory(
-            new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2 + "/.indexer" ) );
-        assertFalse( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2 + "/.indexer" ).exists() );
+        FileUtils.deleteDirectory( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_1 + "/.indexer" ) );
+        assertFalse( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_1 + "/.indexer" ).exists() );
+
+        FileUtils.deleteDirectory( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_2 + "/.indexer" ) );
+        assertFalse( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_2 + "/.indexer" ).exists() );
 
         archivaConfigControl = MockControl.createControl( ArchivaConfiguration.class );
 
@@ -119,14 +122,6 @@ public abstract class AbstractNexusRepos
             nexusIndexer.removeIndexingContext( indexingContext, true );
         }
 
-        FileUtils.deleteDirectory(
-            new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1 + "/.indexer" ) );
-        assertFalse( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1 + "/.indexer" ).exists() );
-
-        FileUtils.deleteDirectory(
-            new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2 + "/.indexer" ) );
-        assertFalse( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2 + "/.indexer" ).exists() );
-
         super.tearDown();
     }
 
@@ -134,7 +129,12 @@ public abstract class AbstractNexusRepos
     {
         ManagedRepositoryConfiguration repositoryConfig = new ManagedRepositoryConfiguration();
         repositoryConfig.setId( repository );
-        repositoryConfig.setLocation( FileUtil.getBasedir() + "/target/test-classes/" + repository );
+        repositoryConfig.setLocation( FileUtil.getBasedir() + "/target/repos/" + repository );
+        File f = new File( repositoryConfig.getLocation() );
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
         repositoryConfig.setLayout( "default" );
         repositoryConfig.setName( repository );
         repositoryConfig.setScanned( true );
@@ -145,10 +145,17 @@ public abstract class AbstractNexusRepos
     }
 
     protected void createIndex( String repository, List<File> filesToBeIndexed, boolean scan )
-        throws IOException, UnsupportedExistingLuceneIndexException
+        throws Exception
     {
 
-        File indexerDirectory = new File( FileUtil.getBasedir(), "/target/test-classes/" + repository + "/.indexer" );
+        IndexingContext context = nexusIndexer.getIndexingContexts().get( repository );
+
+        if ( context != null )
+        {
+            nexusIndexer.removeIndexingContext( context, true );
+        }
+
+        File indexerDirectory = new File( FileUtil.getBasedir(), "/target/repos/" + repository + "/.indexer" );
 
         if ( indexerDirectory.exists() )
         {
@@ -157,8 +164,7 @@ public abstract class AbstractNexusRepos
 
         assertFalse( indexerDirectory.exists() );
 
-        File lockFile =
-            new File( FileUtil.getBasedir(), "/target/test-classes/" + repository + "/.indexer/write.lock" );
+        File lockFile = new File( FileUtil.getBasedir(), "/target/repos/" + repository + "/.indexer/write.lock" );
         if ( lockFile.exists() )
         {
             lockFile.delete();
@@ -166,13 +172,13 @@ public abstract class AbstractNexusRepos
 
         assertFalse( lockFile.exists() );
 
-        File repo = new File( FileUtil.getBasedir(), "/target/test-classes/" + repository );
-        File indexDirectory = new File( FileUtil.getBasedir(), "/target/test-classes/" + repository + "/.indexer" );
+        File repo = new File( FileUtil.getBasedir(), "/target/repos/" + repository );
+        File indexDirectory = new File( FileUtil.getBasedir(), "/target/repos/" + repository + "/.indexer" );
 
-        IndexingContext context = nexusIndexer.addIndexingContext( repository, repository, repo, indexDirectory,
-                                                                   repo.toURI().toURL().toExternalForm(),
-                                                                   indexDirectory.toURI().toURL().toString(),
-                                                                   search.getAllIndexCreators() );
+        context = nexusIndexer.addIndexingContext( repository, repository, repo, indexDirectory,
+                                                   repo.toURI().toURL().toExternalForm(),
+                                                   indexDirectory.toURI().toURL().toString(),
+                                                   search.getAllIndexCreators() );
 
         List<ArtifactContext> artifactContexts = new ArrayList<ArtifactContext>( filesToBeIndexed.size() );
         for ( File artifactFile : filesToBeIndexed )
@@ -181,16 +187,59 @@ public abstract class AbstractNexusRepos
             artifactContexts.add( ac );
         }
 
-        context.setSearchable( true );
-
         if ( filesToBeIndexed != null && !filesToBeIndexed.isEmpty() )
         {
             nexusIndexer.addArtifactsToIndex( artifactContexts, context );
+
+            while ( context.isReceivingUpdates() )
+            {
+                Thread.sleep( 10 );
+            }
         }
         if ( scan )
         {
-            nexusIndexer.scan( context, false );
+            nexusIndexer.scan( context, new ArtifactScanListener(), false );
+        }
+
+        context.setSearchable( true );
+
+        assertTrue( new File( FileUtil.getBasedir(), "/target/repos/" + repository + "/.indexer" ).exists() );
+    }
+
+    static class ArtifactScanListener
+        implements ArtifactScanningListener
+    {
+        protected Logger log = LoggerFactory.getLogger( getClass() );
+
+        public void scanningStarted( IndexingContext ctx )
+        {
+
+        }
+
+        public void scanningFinished( IndexingContext ctx, ScanningResult result )
+        {
+
+        }
+
+        public void artifactError( ArtifactContext ac, Exception e )
+        {
+            log.debug( "artifactError " + ac.getArtifact().getPath(), e );
+        }
+
+        public void artifactDiscovered( ArtifactContext ac )
+        {
+            log.debug( "artifactDiscovered " + ac.getArtifact().getPath() + ":" + ac.getArtifactInfo() );
+        }
+    }
+
+    public String niceDisplay( SearchResults searchResults )
+        throws Exception
+    {
+        StringBuilder sb = new StringBuilder();
+        for ( SearchResultHit hit : searchResults.getHits() )
+        {
+            sb.append( hit.toString() ).append( SystemUtils.LINE_SEPARATOR );
         }
-        assertTrue( new File( FileUtil.getBasedir(), "/target/test-classes/" + repository + "/.indexer" ).exists() );
+        return sb.toString();
     }
 }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java Wed Sep 14 22:52:22 2011
@@ -42,12 +42,12 @@ public class NexusRepositorySearchTest
 
 
     private void createSimpleIndex( boolean scan )
-        throws IOException, UnsupportedExistingLuceneIndexException, IllegalArtifactCoordinateException
+        throws Exception
     {
         List<File> files = new ArrayList<File>();
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test" + TEST_REPO_1
             + "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar" ) );
         files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
             + "/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar" ) );
@@ -56,37 +56,37 @@ public class NexusRepositorySearchTest
     }
 
     private void createIndexContainingMoreArtifacts( boolean scan )
-        throws IOException, UnsupportedExistingLuceneIndexException, IllegalArtifactCoordinateException
+        throws Exception
     {
         List<File> files = new ArrayList<File>();
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/com/classname-search/1.0/classname-search-1.0.jar" ) );
 
         createIndex( TEST_REPO_1, files, scan );
     }
-    
+
     private void createIndexContainingMultipleArtifactsSameVersion( boolean scan )
-        throws IOException, UnsupportedExistingLuceneIndexException, IllegalArtifactCoordinateException
+        throws Exception
     {
         List<File> files = new ArrayList<File>();
-        
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1 +
-            "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1 +
-            "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar" ) );
-        
+
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
+            + "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
+            + "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar" ) );
+
         createIndex( TEST_REPO_1, files, scan );
     }
 
@@ -131,13 +131,13 @@ public class NexusRepositorySearchTest
 
         //TODO: search for class & package names
     }
-    
+
     @Test
-    public void testQuickSearchMultipleArtifactsSameVersion() 
+    public void testQuickSearchMultipleArtifactsSameVersion()
         throws Exception
     {
         createIndexContainingMultipleArtifactsSameVersion( false );
-        
+
         List<String> selectedRepos = new ArrayList<String>();
         selectedRepos.add( TEST_REPO_1 );
 
@@ -157,7 +157,43 @@ public class NexusRepositorySearchTest
         assertEquals( "org.apache.archiva", hit.getGroupId() );
         assertEquals( "archiva-search", hit.getArtifactId() );
         assertEquals( "1.0", hit.getVersions().get( 0 ) );
-        
+
+        //only 1 version of 1.0 is retrieved
+        assertEquals( 1, hit.getVersions().size() );
+    }
+
+    @Test
+    public void testMultipleArtifactsSameVersionWithClassifier()
+        throws Exception
+    {
+        createIndexContainingMultipleArtifactsSameVersion( false );
+
+        List<String> selectedRepos = new ArrayList<String>();
+        selectedRepos.add( TEST_REPO_1 );
+
+        // search artifactId
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+
+        archivaConfigControl.replay();
+
+        SearchFields searchFields = new SearchFields();
+        searchFields.setGroupId( "org.apache.archiva" );
+        searchFields.setArtifactId( "archiva-search" );
+        searchFields.setClassifier( "sources" );
+        searchFields.setRepositories( selectedRepos );
+
+        SearchResults results = search.search( "user", searchFields, null );
+
+        archivaConfigControl.verify();
+
+        assertNotNull( results );
+        assertEquals( 1, results.getTotalHits() );
+
+        SearchResultHit hit = results.getHits().get( 0 );
+        assertEquals( "org.apache.archiva", hit.getGroupId() );
+        assertEquals( "archiva-search", hit.getArtifactId() );
+        assertEquals( "1.0", hit.getVersions().get( 0 ) );
+
         //only 1 version of 1.0 is retrieved
         assertEquals( 1, hit.getVersions().size() );
     }
@@ -206,7 +242,7 @@ public class NexusRepositorySearchTest
 
         assertNotNull( results );
         assertEquals( 1, results.getHits().size() );
-        assertEquals( "total hits not 6 for page1 " + results, 6, results.getTotalHits() );
+        assertEquals( "total hits not 7 for page1 " + results, 7, results.getTotalHits() );
         assertEquals( "returned hits not 1 for page1 " + results, 1, results.getReturnedHitsCount() );
         assertEquals( limits, results.getLimits() );
 
@@ -227,7 +263,7 @@ public class NexusRepositorySearchTest
         assertNotNull( results );
 
         assertEquals( "hits not 1", 1, results.getHits().size() );
-        assertEquals( "total hits not 6 for page 2 " + results, 6, results.getTotalHits() );
+        assertEquals( "total hits not 7 for page 2 " + results, 7, results.getTotalHits() );
         assertEquals( "returned hits not 1 for page2 " + results, 1, results.getReturnedHitsCount() );
         assertEquals( limits, results.getLimits() );
     }
@@ -239,11 +275,11 @@ public class NexusRepositorySearchTest
         createSimpleIndex( true );
 
         List<File> files = new ArrayList<File>();
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
             + "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
             + "/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar" ) );
-        createIndex( TEST_REPO_2, files, true );
+        createIndex( TEST_REPO_2, files, false );
 
         List<String> selectedRepos = new ArrayList<String>();
         selectedRepos.add( TEST_REPO_1 );
@@ -265,7 +301,7 @@ public class NexusRepositorySearchTest
         SearchResultHit hit = results.getHits().get( 0 );
         assertEquals( "org.apache.archiva", hit.getGroupId() );
         assertEquals( "archiva-search", hit.getArtifactId() );
-        assertEquals( 2, hit.getVersions().size() );
+        assertEquals("not 2 version for hit " + hit, 2, hit.getVersions().size() );
         assertTrue( hit.getVersions().contains( "1.0" ) );
         assertTrue( hit.getVersions().contains( "1.1" ) );
 
@@ -357,7 +393,7 @@ public class NexusRepositorySearchTest
         SearchResultHit hit = results.getHits().get( 0 );
         assertEquals( "org.apache.archiva", hit.getGroupId() );
         assertEquals( "archiva-test", hit.getArtifactId() );
-        assertEquals("versions not 1", 1, hit.getVersions().size() );
+        assertEquals( "versions not 1", 1, hit.getVersions().size() );
         assertEquals( "1.0", hit.getVersions().get( 0 ) );
     }
 
@@ -367,9 +403,9 @@ public class NexusRepositorySearchTest
         throws Exception
     {
         List<File> files = new ArrayList<File>();
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
             + "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_2
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
             + "/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar" ) );
         createIndex( TEST_REPO_2, files, false );
 
@@ -453,9 +489,9 @@ public class NexusRepositorySearchTest
         throws Exception
     {
         List<File> files = new ArrayList<File>();
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar" ) );
-        files.add( new File( FileUtil.getBasedir(), "/target/test-classes/" + TEST_REPO_1
+        files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
             + "/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar" ) );
         createIndex( TEST_REPO_1, files, true );
 
@@ -616,7 +652,7 @@ public class NexusRepositorySearchTest
         archivaConfigControl.verify();
 
         assertNotNull( results );
-        assertEquals( 7, results.getTotalHits() );
+        assertEquals( "not 8 but " + results.getTotalHits() + ":" + niceDisplay( results ), 8, results.getTotalHits() );
     }
 
     @Test

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo-2/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric/1.0/artifactid-numeric-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/com/classname-search/1.0/classname-search-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
Binary files - no diff available.

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Copied: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom (from r1170881, archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom)
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom?p2=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom&p1=archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/nexus-search-test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom&r1=1170881&r2=1170883&rev=1170883&view=diff
==============================================================================
    (empty)

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java Wed Sep 14 22:52:22 2011
@@ -123,6 +123,8 @@ public class Artifact
      */
     private String bundleRequireBundle;
 
+    private String classifier;
+
 
     public Artifact()
     {
@@ -309,6 +311,16 @@ public class Artifact
         this.bundleRequireBundle = bundleRequireBundle;
     }
 
+    public String getClassifier()
+    {
+        return classifier;
+    }
+
+    public void setClassifier( String classifier )
+    {
+        this.classifier = classifier;
+    }
+
     @Override
     public String toString()
     {
@@ -332,6 +344,7 @@ public class Artifact
         sb.append( ", bundleDocUrl='" ).append( bundleDocUrl ).append( '\'' );
         sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
         sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
+        sb.append( ", classifier='" ).append( classifier ).append( '\'' );
         sb.append( '}' );
         return sb.toString();
     }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java Wed Sep 14 22:52:22 2011
@@ -1,5 +1,6 @@
 package org.apache.archiva.rest.api.model;
 
+import javax.xml.bind.annotation.XmlRootElement;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -21,7 +22,7 @@ import java.util.List;
  * specific language governing permissions and limitations
  * under the License.
  */
-
+@XmlRootElement( name = "searchRequest" )
 public class SearchRequest
 {
     /**
@@ -83,6 +84,8 @@ public class SearchRequest
      */
     private String bundleExportService;
 
+    private String classifier;
+
     public SearchRequest()
     {
         // no op
@@ -200,13 +203,33 @@ public class SearchRequest
         this.bundleExportService = bundleExportService;
     }
 
+    public String getClassifier()
+    {
+        return classifier;
+    }
+
+    public void setClassifier( String classifier )
+    {
+        this.classifier = classifier;
+    }
+
     @Override
     public String toString()
     {
-        return "SearchFields{" + "groupId='" + groupId + '\'' + ", artifactId='" + artifactId + '\'' + ", version='"
-            + version + '\'' + ", packaging='" + packaging + '\'' + ", className='" + className + '\''
-            + ", repositories=" + repositories + ", bundleVersion='" + bundleVersion + '\'' + ", bundleSymbolicName='"
-            + bundleSymbolicName + '\'' + ", bundleExportPackage='" + bundleExportPackage + '\''
-            + ", bundleExportService='" + bundleExportService + '\'' + '}';
+        final StringBuilder sb = new StringBuilder();
+        sb.append( "SearchRequest" );
+        sb.append( "{groupId='" ).append( groupId ).append( '\'' );
+        sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
+        sb.append( ", version='" ).append( version ).append( '\'' );
+        sb.append( ", packaging='" ).append( packaging ).append( '\'' );
+        sb.append( ", className='" ).append( className ).append( '\'' );
+        sb.append( ", repositories=" ).append( repositories );
+        sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
+        sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
+        sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
+        sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
+        sb.append( ", classifier='" ).append( classifier ).append( '\'' );
+        sb.append( '}' );
+        return sb.toString();
     }
 }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java Wed Sep 14 22:52:22 2011
@@ -22,9 +22,11 @@ package org.apache.archiva.rest.api.serv
 
 import org.apache.archiva.rest.api.model.Artifact;
 import org.apache.archiva.rest.api.model.Dependency;
+import org.apache.archiva.rest.api.model.SearchRequest;
 import org.codehaus.plexus.redback.authorization.RedbackAuthorization;
 
 import javax.ws.rs.GET;
+import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
@@ -58,6 +60,13 @@ public interface SearchService
                                         @QueryParam( "artifactId" ) String artifactId )
         throws ArchivaRestServiceException;
 
+    @Path( "searchArtifacts" )
+    @POST
+    @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
+    @RedbackAuthorization( noPermission = true, noRestriction = true )
+    List<Artifact> searchArtifacts( SearchRequest searchRequest )
+        throws ArchivaRestServiceException;
+
     @Path( "getDependencies" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@@ -67,11 +76,12 @@ public interface SearchService
                                       @QueryParam( "version" ) String version )
         throws ArchivaRestServiceException;
 
+
     @Path( "getArtifactByChecksum" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
     @RedbackAuthorization( noPermission = true, noRestriction = true )
     List<Artifact> getArtifactByChecksum( @QueryParam( "checksum" ) String checksum )
-    throws ArchivaRestServiceException;
+        throws ArchivaRestServiceException;
 
 }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java Wed Sep 14 22:52:22 2011
@@ -27,6 +27,7 @@ import org.apache.archiva.indexer.search
 import org.apache.archiva.indexer.search.SearchResults;
 import org.apache.archiva.rest.api.model.Artifact;
 import org.apache.archiva.rest.api.model.Dependency;
+import org.apache.archiva.rest.api.model.SearchRequest;
 import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
 import org.apache.archiva.rest.api.services.SearchService;
 import org.apache.archiva.security.AccessDeniedException;
@@ -108,8 +109,28 @@ public class DefaultSearchService
             log.error( e.getMessage(), e );
             throw new ArchivaRestServiceException( e.getMessage() );
         }
+    }
 
+    public List<Artifact> searchArtifacts( SearchRequest searchRequest )
+        throws ArchivaRestServiceException
+    {
+        if ( searchRequest == null )
+        {
+            return Collections.emptyList();
+        }
+        SearchFields searchField = new BeanReplicator().replicateBean( searchRequest, SearchFields.class );
+        SearchResultLimits limits = new SearchResultLimits( 0 );
 
+        try
+        {
+            SearchResults searchResults = repositorySearch.search( getPrincipal(), searchField, limits );
+            return getArtifacts( searchResults );
+        }
+        catch ( RepositorySearchException e )
+        {
+            log.error( e.getMessage(), e );
+            throw new ArchivaRestServiceException( e.getMessage() );
+        }
     }
 
     public List<Dependency> getDependencies( String groupId, String artifactId, String version )

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java?rev=1170883&r1=1170882&r2=1170883&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java Wed Sep 14 22:52:22 2011
@@ -20,6 +20,7 @@ package org.apache.archiva.rest.services
 
 import org.apache.archiva.rest.api.model.Artifact;
 import org.apache.archiva.rest.api.model.ManagedRepository;
+import org.apache.archiva.rest.api.model.SearchRequest;
 import org.apache.archiva.rest.api.services.ManagedRepositoriesService;
 import org.apache.archiva.rest.api.services.SearchService;
 import org.apache.commons.io.FileUtils;
@@ -86,6 +87,36 @@ public class SearchServiceTest
         deleteTestRepo( testRepoId, targetRepo );
     }
 
+    @Test
+    public void searchWithSearchRequestGroupIdAndArtifactId()
+        throws Exception
+    {
+
+        String testRepoId = "test-repo";
+        // force guest user creation if not exists
+        if ( getUserService( authorizationHeader ).getGuestUser() == null )
+        {
+            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
+        }
+
+        File targetRepo = createAndIndexRepo( testRepoId );
+
+        SearchService searchService = getSearchService( authorizationHeader );
+
+        SearchRequest searchRequest = new SearchRequest(  );
+        searchRequest.setGroupId( "commons-logging" );
+        searchRequest.setArtifactId( "commons-logging" );
+        searchRequest.setClassifier( "sources" );
+
+        List<Artifact> artifacts = searchService.searchArtifacts( searchRequest );
+
+        assertNotNull( artifacts );
+        assertTrue( " empty results for commons-logging search", artifacts.size() == 6 );
+        log.info( "artifacts for commons-logging size {} search {}", artifacts.size(), artifacts );
+
+        deleteTestRepo( testRepoId, targetRepo );
+    }
+
     private File createAndIndexRepo( String testRepoId )
         throws Exception
     {



Mime
View raw message