]> source.dussan.org Git - archiva.git/commitdiff
o update branch with latest changes from trunk archiva-nexus-indexer 42/head archiva-nexus-indexer
authorMaria Odea B. Ching <oching@apache.org>
Wed, 4 Feb 2009 00:34:44 +0000 (00:34 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Wed, 4 Feb 2009 00:34:44 +0000 (00:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-nexus-indexer@740534 13f79535-47bb-0310-9956-ffa450edef68

16 files changed:
archiva-docs/pom.xml
archiva-jetty/pom.xml
archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaServletAuthenticator.java
archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaXworkUser.java
archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/ArchivaServletAuthenticatorTest.xml
archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/DefaultUserRepositoriesTest.xml
archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/SecurityStartupTest.xml
archiva-modules/archiva-web/archiva-webapp/pom.xml
archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java
pom.xml

index fe78803d507432a6bb09478d92fec2709acdf579..c539590b2db231396192e0de22c03ec400012f27 100644 (file)
@@ -45,7 +45,6 @@
       </plugin>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.1</version>
         <configuration>
           <descriptor>src/site/assembly/docs.xml</descriptor>
         </configuration>
index 09928b1d851ec88e45682cbbbaf2d9438d973874..3a56a668124d785687651a434e492fb464575bf9 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.1</version>
         <executions>
           <execution>
             <phase>package</phase>
index 7059598df3ea3edeb5f348ea58142b3859223cc2..11d39592d06e1ea40915cf8f562786a1ab5c223a 100644 (file)
@@ -21,7 +21,6 @@ package org.apache.maven.archiva.security;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.codehaus.plexus.redback.authentication.AuthenticationException;
 import org.codehaus.plexus.redback.authentication.AuthenticationResult;
 import org.codehaus.plexus.redback.authorization.AuthorizationException;
index 5aeeedd9f11ba32ca04da62183c36bd930bf4f23..a5bb09ecefe5e2b587e863b7586abab94c2dded7 100644 (file)
@@ -21,7 +21,6 @@ package org.apache.maven.archiva.security;
 
 import java.util.Map;
 
-import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.codehaus.plexus.redback.system.SecuritySession;
 import org.codehaus.plexus.redback.system.SecuritySystemConstants;
 import org.codehaus.plexus.redback.users.User;
index adfb9b2b4b213f61cc356dc1ff9f0a1d71bffd63..81cbaa5eadbb86bddd40be982898c4b1b7d48e62 100644 (file)
           <role-hint>default</role-hint>
           <field-name>evaluator</field-name>
         </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
-          <role-hint>default</role-hint>
-          <field-name>config</field-name>
-        </requirement>
       </requirements>
     </component>
     
index 8d43cac8d769b2d7cb7bd729be2bac133b04c709..740b5df8a95f45879ac362bbac05e80beb8385e3 100644 (file)
           <role-hint>default</role-hint>
           <field-name>evaluator</field-name>
         </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
-          <role-hint>default</role-hint>
-          <field-name>config</field-name>
-        </requirement>
       </requirements>
     </component>
     
index 0ff02e8597d4edb743ebd388b3aa68dbc6892136..258185a19c44c4db9fd6159d6e811089084daecc 100644 (file)
           <role-hint>memory</role-hint>
           <field-name>rbacManager</field-name>
         </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
       </requirements>
     </component>
     
           <role-hint>default</role-hint>
           <field-name>evaluator</field-name>
         </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
-          <role-hint>default</role-hint>
-          <field-name>config</field-name>
-        </requirement>
       </requirements>
     </component>
     
index f353e46b0908c11619cd5286f2ca31aa41aeddf4..587810fafccc3f9f1a34a52b03fe2374368fa5dc 100644 (file)
           </execution>  
         </executions>
       </plugin>
+      <!-- 
+        here's a hack to prevent multiple struts core and same struts.xml in classpath
+        which prevent struts start
+      -->
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>cleanup-struts-jar-in-webapp</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <tasks>
+                <delete includeemptydirs="true">
+                  <fileset dir="${basedir}/src/main/webapp/WEB-INF/lib" includes="**/struts2*.jar" />
+                </delete>
+                <delete includeemptydirs="true">
+                  <fileset dir="${basedir}/src/main/webapp/WEB-INF/classes" includes="**/struts.*" />
+                </delete>
+              </tasks>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>maven-jetty-plugin</artifactId>
index 8702c482c635342eef4d32828549123b005e7ae6..199dc66f3a2a9c041c9d1d47e6e3f094be04ac83 100644 (file)
           <field-name>userImpl</field-name>
         </requirement>
         <requirement>
-          <role>org.codehaus.plexus.ehcache.EhcacheComponent</role>
+          <role>org.codehaus.plexus.cache.Cache</role>
           <role-hint>users</role-hint>
           <field-name>usersCache</field-name>
         </requirement>
index be13cc078ed2dbef5a28ef2b27a3be8b35f2b01c..9a07ebe68888452141cca2cb38c928fc5e16fa57 100644 (file)
@@ -27,7 +27,7 @@
       <s:set name="organisationLogo" value="organisationLogo"/>
       <c:choose>
         <c:when test="${!empty (organisationUrl)}">
-          <a href="${companyUrl}">
+          <a href="${organisationUrl}">
             <img src="${organisationLogo}" title="${organisationName}"/>
           </a>
         </c:when>
index 1fa9fd155229b2a686c1f94067127de1770770a7..c04ae9766b8600f97544f18c5751cc24b661bcbf 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.archiva.web.xmlrpc.api.beans.Dependency;
 
 import com.atlassian.xmlrpc.ServiceObject;
 
-@ServiceObject("Search")
+@ServiceObject("SearchService")
 public interface SearchService
 {
    /*
index bc553e3cd4e725457f89219840e27ac52ebee49a..d55c978f536cc25bd95aaa609ff5593b213e308e 100644 (file)
@@ -20,7 +20,6 @@ package org.apache.archiva.web.xmlrpc.api.beans;
  */
 
 import java.io.Serializable;
-import java.util.Date;
 
 import com.atlassian.xmlrpc.ServiceBean;
 import com.atlassian.xmlrpc.ServiceBeanField;
@@ -39,22 +38,22 @@ public class Artifact
 
     private String type;
 
-    private Date whenGathered;
+    //private Date whenGathered;
     
     public Artifact()
     {
 
     }
 
-    public Artifact( String repositoryId, String groupId, String artifactId, String version,
-                     String type, Date whenGathered )
+    public Artifact( String repositoryId, String groupId, String artifactId, String version, String type )
+//                     String type, Date whenGathered )
     {   
         this.repositoryId = repositoryId;
         this.groupId = groupId;
         this.artifactId = artifactId;
         this.version = version;
         this.type = type;
-        this.whenGathered = whenGathered;
+        //this.whenGathered = whenGathered;
     }
 
     public String getGroupId()
@@ -77,10 +76,10 @@ public class Artifact
         return type;
     }
 
-    public Date getWhenGathered()
+    /*public Date getWhenGathered()
     {
         return whenGathered;
-    }
+    }*/
 
     @ServiceBeanField( "groupId" )
     public void setGroupId( String groupId )
@@ -106,11 +105,11 @@ public class Artifact
         this.type = type;
     }
 
-    @ServiceBeanField( "whenGathered" )
+    /*@ServiceBeanField( "whenGathered" )
     public void setWhenGathered( Date whenGathered )
     {
         this.whenGathered = whenGathered;
-    }
+    }*/
 
     public String getRepositoryId()
     {
index 5e3a67fe3ef275f7b11aa0dc6eaa1f26b681e17d..ac6839cc212e4ba87f98303ce0bf0bd9df884984 100644 (file)
@@ -23,6 +23,8 @@ import java.net.URL;
 import java.util.List;
 
 import org.apache.archiva.web.xmlrpc.api.AdministrationService;
+import org.apache.archiva.web.xmlrpc.api.SearchService;
+import org.apache.archiva.web.xmlrpc.api.beans.Artifact;
 import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
 import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
 
@@ -117,6 +119,23 @@ public class SampleClient
             System.out.println( "\nDeleted artifact 'javax.activation:activation:1.1' from repository 'internal' : " +
                 ( (Boolean) success ).booleanValue() );
             */
+            
+            /* quick search */            
+            /*
+             * NOTE: before enabling & invoking search service, make sure that the artifacts you're searching
+             *      for has been indexed already in order to get results
+             *        
+            SearchService searchService = binder.bind( SearchService.class, new URL( args[0] ), authnInfo );
+            List<Artifact> artifacts = searchService.quickSearch( "org" );
+            
+            System.out.println( "\n************ Search Results for 'org' *************" );
+            for( Artifact artifact : artifacts )
+            {
+                System.out.println( "Artifact: " + artifact.getGroupId() + ":" + artifact.getArtifactId() +
+                                    ":" + artifact.getVersion() );
+            }            
+             */
+            
         }
         catch ( BindingException e )
         {
index 9c7b9344f4f72704e22f8d87c741e7a466a9e723..d6e0d2a1fc2429d145fb4565322330bdd2426c21 100644 (file)
           <role-hint>default</role-hint>
           <field-name>evaluator</field-name>
         </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
-          <role-hint>default</role-hint>
-          <field-name>config</field-name>
-        </requirement>
       </requirements>
     </component>
     
index fc9c24f9a1e797885399941ae2b8b668f2e7671b..d08f50bb90853f8e2d844e3606f5c15e38bfb6c7 100644 (file)
@@ -29,6 +29,7 @@ import org.apache.archiva.web.xmlrpc.api.beans.Artifact;
 import org.apache.archiva.web.xmlrpc.api.beans.Dependency;
 import org.apache.archiva.web.xmlrpc.security.XmlRpcUserRepositories;
 import org.apache.maven.archiva.database.ArchivaDAO;
+import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.ArtifactDAO;
 import org.apache.maven.archiva.database.ObjectNotFoundException;
 import org.apache.maven.archiva.database.browsing.BrowsingResults;
@@ -93,16 +94,28 @@ public class SearchServiceImpl
         for( SearchResultHit hit : hits )
         {   
             ArtifactDAO artifactDAO = archivaDAO.getArtifactDAO(); 
-            ArchivaArtifact pomArtifact = artifactDAO.getArtifact( 
-                       hit.getGroupId(), hit.getArtifactId(), hit.getVersion(), "", "pom" );
-            
-            if( pomArtifact != null )
+            try
             {
-                Artifact artifact = new Artifact( pomArtifact.getModel().getRepositoryId(), pomArtifact.getGroupId(), pomArtifact.getArtifactId(), pomArtifact.getVersion(),
-                                                  pomArtifact.getType(), pomArtifact.getModel().getWhenGathered() );
-                artifacts.add( artifact );
+                ArchivaArtifact pomArtifact = artifactDAO.getArtifact( 
+                           hit.getGroupId(), hit.getArtifactId(), hit.getVersion(), "", "pom" );
+                
+                if( pomArtifact != null )
+                {
+                    Artifact artifact = new Artifact( pomArtifact.getModel().getRepositoryId(), pomArtifact.getGroupId(), pomArtifact.getArtifactId(), pomArtifact.getVersion(),
+                                                      pomArtifact.getType() );
+                                                      //pomArtifact.getType(), pomArtifact.getModel().getWhenGathered() );
+                    artifacts.add( artifact );
+                }
+                else
+                {
+                    continue;
+                }
+            }
+            catch ( ObjectNotFoundException e )
+            {
+                continue;
             }
-            else
+            catch ( ArchivaDatabaseException e )
             {
                 continue;
             }
@@ -128,8 +141,8 @@ public class SearchServiceImpl
         for( ArchivaArtifact archivaArtifact : artifacts )
         {
             Artifact artifact = new Artifact( archivaArtifact.getModel().getRepositoryId(), archivaArtifact.getModel().getGroupId(),
-                          archivaArtifact.getModel().getArtifactId(), archivaArtifact.getModel().getVersion(), archivaArtifact.getType(), 
-                          archivaArtifact.getModel().getWhenGathered() );
+                          archivaArtifact.getModel().getArtifactId(), archivaArtifact.getModel().getVersion(), archivaArtifact.getType() ); 
+                          //archivaArtifact.getModel().getWhenGathered() );
             results.add( artifact );
         }
         
@@ -148,8 +161,8 @@ public class SearchServiceImpl
         for( String version : results.getVersions() )
         {
             ArchivaArtifact pomArtifact = artifactDAO.getArtifact( groupId, artifactId, version, "", "pom" );
-            Artifact artifact = new Artifact( "", groupId, artifactId, version, pomArtifact.getType(), 
-                          pomArtifact.getModel().getWhenGathered() );
+            Artifact artifact = new Artifact( "", groupId, artifactId, version, pomArtifact.getType() ); 
+                          //pomArtifact.getModel().getWhenGathered() );
             
             artifacts.add( artifact );
         }
@@ -213,7 +226,9 @@ public class SearchServiceImpl
         List<ArchivaProjectModel> dependees = repoBrowsing.getUsedBy( "", observableRepos, "org.apache.archiva", "archiva-test", "1.0" );
         for( ArchivaProjectModel model : dependees )
         {
-            Artifact artifact = new Artifact( "", model.getGroupId(), model.getArtifactId(), model.getVersion(), "", model.getWhenIndexed() );
+            Artifact artifact =
+                new Artifact( "", model.getGroupId(), model.getArtifactId(), model.getVersion(), "" );
+                              //model.getWhenIndexed() );
             artifacts.add( artifact );
         }
         
diff --git a/pom.xml b/pom.xml
index 4df299d950184e414cb84d5633936a6e41cf7d15..d2a342c4e758d7b0e1c577ade057946687e9c0a4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
           <artifactId>modello-maven-plugin</artifactId>
           <version>1.0-alpha-15</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <version>2.2-beta-3</version>
+        </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
       <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-context</artifactId>
-        <version>2.5.5</version>
+        <version>${spring.version}</version>
         <exclusions>
           <exclusion>
             <groupId>commons-logging</groupId>
       <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-web</artifactId>
-        <version>2.5.5</version>
+        <version>${spring.version}</version>
         <exclusions>
           <exclusion>
             <groupId>commons-logging</groupId>
       <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-beans</artifactId>
-        <version>2.5.5</version>
+        <version>${spring.version}</version>
         <exclusions>
           <exclusion>
             <groupId>commons-logging</groupId>
   <properties>
     <maven.version>2.0.8</maven.version>
     <wagon.version>1.0-beta-4</wagon.version>
-    <redback.version>1.2-beta-1</redback.version>
+    <redback.version>1.2-beta-2</redback.version>
     <jetty.version>6.1.6</jetty.version>
     <binder.version>0.9</binder.version>
+    <spring.version>2.5.6</spring.version>
   </properties>
   <profiles>
     <profile>
         <plugins>
           <plugin>
             <artifactId>maven-assembly-plugin</artifactId>
-            <version>2.2-beta-2</version>
             <inherited>false</inherited>
             <configuration>
               <descriptors>