]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-38
authorEdwin L. Punzalan <epunzalan@apache.org>
Thu, 23 Feb 2006 02:32:31 +0000 (02:32 +0000)
committerEdwin L. Punzalan <epunzalan@apache.org>
Thu, 23 Feb 2006 02:32:31 +0000 (02:32 +0000)
Reverted to previous revision bec prev patch is incorrect

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@380028 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-webapp/pom.xml
maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java
maven-repository-webapp/src/main/resources/plexus/components.xml [deleted file]

index d3df67b13a406b85ee7597d939edd937eac60943..6dc4c77fefe56fb8f7595bb2eee0fe9e0d9b19b7 100644 (file)
       <!-- TODO: actually, just exclude from WAR plugin -->
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-quartz</artifactId>
-      <version>1.0-alpha-2-SNAPSHOT</version>
-    </dependency>
   </dependencies>
   <build>
     <finalName>maven-repository-webapp</finalName>
index 75d05a35781195ad81099f2f3eb2e7e27f051b64..5f6acc812efa8abb745f7438195f383736938a69 100644 (file)
@@ -21,11 +21,11 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.repository.indexing.ArtifactRepositoryIndex;
-import org.apache.maven.repository.indexing.DefaultRepositoryIndexSearcher;
 import org.apache.maven.repository.indexing.RepositoryIndexException;
 import org.apache.maven.repository.indexing.RepositoryIndexSearchException;
 import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
-import org.codehaus.plexus.scheduler.Scheduler;
+import org.apache.maven.repository.indexing.DefaultRepositoryIndexSearcher;
+import org.apache.maven.repository.indexing.query.SinglePhraseQuery;
 
 import java.io.File;
 import java.net.MalformedURLException;
@@ -44,11 +44,6 @@ public class PackageSearchAction
 
     private String md5;
 
-    /**
-     * @plexus.requirement
-     */
-    private Scheduler scheduler;
-
     /**
      * @plexus.requirement
      */
@@ -97,6 +92,8 @@ public class PackageSearchAction
 
         DefaultRepositoryIndexSearcher searcher = factory.createDefaultRepositoryIndexSearcher( index );
 
+        artifacts = searcher.search( new SinglePhraseQuery( key, searchTerm ) );
+
         return SUCCESS;
     }
 
diff --git a/maven-repository-webapp/src/main/resources/plexus/components.xml b/maven-repository-webapp/src/main/resources/plexus/components.xml
deleted file mode 100644 (file)
index f3f6415..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<component-set>\r
-  <components>\r
-    <component>\r
-      <role>com.opensymphony.xwork.ActionSupport</role>\r
-      <role-hint>index</role-hint>\r
-      <implementation>org.apache.maven.repository.manager.web.action.PackageSearchAction</implementation>\r
-      <instantiation-strategy>per-lookup</instantiation-strategy>\r
-    </component>\r
-    <component>\r
-      <role>org.codehaus.plexus.scheduler.Scheduler</role>\r
-      <implementation>org.codehaus.plexus.scheduler.DefaultScheduler</implementation>\r
-      <configuration>\r
-        <properties>\r
-          <property>\r
-            <name>org.quartz.scheduler.instanceName</name>\r
-            <value>repositoryScheduler</value>\r
-          </property>\r
-          <property>\r
-            <name>org.quartz.threadPool.class</name>\r
-            <value>org.quartz.simpl.SimpleThreadPool</value>\r
-          </property>\r
-          <property>\r
-            <name>org.quartz.threadPool.threadCount</name>\r
-            <value>15</value>\r
-          </property>\r
-          <property>\r
-            <name>org.quartz.threadPool.threadPriority</name>\r
-            <value>4</value>\r
-          </property>\r
-          <property>\r
-            <name>org.quartz.jobStore.class</name>\r
-            <value>org.quartz.simpl.RAMJobStore</value>\r
-          </property>\r
-        </properties>\r
-      </configuration>\r
-    </component>\r
-  </components>\r
-</component-set>\r