Submitted by: John Tolentino
patch for background task scheduler
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@380024
13f79535-47bb-0310-9956-
ffa450edef68
<!-- 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>
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.apache.maven.repository.indexing.DefaultRepositoryIndexSearcher;
-import org.apache.maven.repository.indexing.query.SinglePhraseQuery;
+import org.codehaus.plexus.scheduler.Scheduler;
import java.io.File;
import java.net.MalformedURLException;
private String md5;
+ /**
+ * @plexus.requirement
+ */
+ private Scheduler scheduler;
+
/**
* @plexus.requirement
*/
DefaultRepositoryIndexSearcher searcher = factory.createDefaultRepositoryIndexSearcher( index );
- artifacts = searcher.search( new SinglePhraseQuery( key, searchTerm ) );
-
return SUCCESS;
}
--- /dev/null
+<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