maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epunza...@apache.org
Subject svn commit: r382623 - in /maven/repository-manager/trunk/maven-repository-webapp/src/main: java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java webapp/WEB-INF/jsp/generalresults.jsp
Date Fri, 03 Mar 2006 02:41:54 GMT
Author: epunzalan
Date: Thu Mar  2 18:41:52 2006
New Revision: 382623

URL: http://svn.apache.org/viewcvs?rev=382623&view=rev
Log:
PR: MRM-98
Submitted by: John Tolentino

Applied to use the plexus configuration for index and repository path

Modified:
    maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java
    maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalresults.jsp

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java?rev=382623&r1=382622&r2=382623&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java
(original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java
Thu Mar  2 18:41:52 2006
@@ -19,14 +19,14 @@
 import com.opensymphony.xwork.Action;
 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.apache.maven.repository.indexing.RepositoryIndex;
 import org.apache.maven.repository.indexing.query.SinglePhraseQuery;
-import org.codehaus.plexus.scheduler.Scheduler;
+import org.apache.maven.repository.manager.web.job.Configuration;
 
 import java.io.File;
 import java.net.MalformedURLException;
@@ -48,11 +48,6 @@
     /**
      * @plexus.requirement
      */
-    private Scheduler scheduler;
-
-    /**
-     * @plexus.requirement
-     */
     private RepositoryIndexingFactory factory;
 
     /**
@@ -61,9 +56,9 @@
     private ArtifactRepositoryFactory repositoryFactory;
 
     /**
-     * @plexus.requirement role-hint="legacy"
+     * @plexus.requirement
      */
-    private ArtifactRepositoryLayout layout;
+    private Configuration configuration;
 
     private List artifacts;
 
@@ -75,7 +70,7 @@
         if ( packageName != null && packageName.length() != 0 )
         {
             searchTerm = packageName;
-            key = "packages";
+            key = RepositoryIndex.FLD_PACKAGES;
         }
         else if ( md5 != null && md5.length() != 0 )
         {
@@ -88,11 +83,14 @@
         }
 
         // TODO: better config
-        String indexPath = "C:/0John/java/projects/repository-manager/maven-repository-indexer/target/index";
+        String indexPath = configuration.getIndexDirectory();
 
         // TODO: reduce the amount of lookup?
-        ArtifactRepository repository = repositoryFactory.createArtifactRepository( "repository",
new File(
-            indexPath ).toURL().toString(), layout, null, null );
+        File repositoryDirectory = new File( configuration.getRepositoryDirectory() );
+        String repoDir = repositoryDirectory.toURL().toString();
+
+        ArtifactRepository repository =
+            repositoryFactory.createArtifactRepository( "repository", repoDir, configuration.getLayout(),
null, null );
 
         ArtifactRepositoryIndex index = factory.createArtifactRepositoryIndex( indexPath,
repository );
 

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalresults.jsp
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalresults.jsp?rev=382623&r1=382622&r2=382623&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalresults.jsp
(original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalresults.jsp
Thu Mar  2 18:41:52 2006
@@ -50,7 +50,7 @@
             <tr>
               <td valign="top" width="15%" align="right"><ww:property value="Key"/></td>
               <td valign="top">
-                <ww:iterator value="Value" id="test" status="">
+                <ww:iterator value="Value">
                   <ww:property/>
                 </ww:iterator>
                 <br/>



Mime
View raw message