From: Maria Odea B. Ching Date: Wed, 4 Feb 2009 00:34:44 +0000 (+0000) Subject: o update branch with latest changes from trunk X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fremotes%2Farchiva-nexus-indexer;p=archiva.git o update branch with latest changes from trunk git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-nexus-indexer@740534 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-docs/pom.xml b/archiva-docs/pom.xml index fe78803d5..c539590b2 100644 --- a/archiva-docs/pom.xml +++ b/archiva-docs/pom.xml @@ -45,7 +45,6 @@ maven-assembly-plugin - 2.1 src/site/assembly/docs.xml diff --git a/archiva-jetty/pom.xml b/archiva-jetty/pom.xml index 09928b1d8..3a56a6681 100644 --- a/archiva-jetty/pom.xml +++ b/archiva-jetty/pom.xml @@ -239,7 +239,6 @@ org.apache.maven.plugins maven-assembly-plugin - 2.1 package diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaServletAuthenticator.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaServletAuthenticator.java index 7059598df..11d39592d 100644 --- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaServletAuthenticator.java +++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaServletAuthenticator.java @@ -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; diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaXworkUser.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaXworkUser.java index 5aeeedd9f..a5bb09ece 100644 --- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaXworkUser.java +++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaXworkUser.java @@ -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; diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/ArchivaServletAuthenticatorTest.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/ArchivaServletAuthenticatorTest.xml index adfb9b2b4..81cbaa5ea 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/ArchivaServletAuthenticatorTest.xml +++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/ArchivaServletAuthenticatorTest.xml @@ -97,11 +97,6 @@ default evaluator - - org.codehaus.plexus.redback.configuration.UserConfiguration - default - config - diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/DefaultUserRepositoriesTest.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/DefaultUserRepositoriesTest.xml index 8d43cac8d..740b5df8a 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/DefaultUserRepositoriesTest.xml +++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/DefaultUserRepositoriesTest.xml @@ -83,11 +83,6 @@ default evaluator - - org.codehaus.plexus.redback.configuration.UserConfiguration - default - config - diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/SecurityStartupTest.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/SecurityStartupTest.xml index 0ff02e859..258185a19 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/SecurityStartupTest.xml +++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/org/apache/maven/archiva/security/SecurityStartupTest.xml @@ -120,10 +120,6 @@ memory rbacManager - - org.codehaus.plexus.PlexusContainer - container - @@ -180,11 +176,6 @@ default evaluator - - org.codehaus.plexus.redback.configuration.UserConfiguration - default - config - diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index f353e46b0..587810faf 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -332,6 +332,32 @@ + + + maven-antrun-plugin + + + cleanup-struts-jar-in-webapp + compile + + run + + + + + + + + + + + + + + org.mortbay.jetty maven-jetty-plugin diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml index 8702c482c..199dc66f3 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml @@ -321,7 +321,7 @@ userImpl - org.codehaus.plexus.ehcache.EhcacheComponent + org.codehaus.plexus.cache.Cache users usersCache diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp index be13cc078..9a07ebe68 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp @@ -27,7 +27,7 @@ - + diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java index 1fa9fd155..c04ae9766 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java @@ -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 { /* diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java index bc553e3cd..d55c978f5 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java @@ -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() { diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java index 5e3a67fe3..ac6839cc2 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java @@ -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 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 ) { diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml index 9c7b9344f..d6e0d2a1f 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml @@ -85,11 +85,6 @@ default evaluator - - org.codehaus.plexus.redback.configuration.UserConfiguration - default - config - diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java index fc9c24f9a..d08f50bb9 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java @@ -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 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 4df299d95..d2a342c4e 100644 --- a/pom.xml +++ b/pom.xml @@ -112,6 +112,11 @@ modello-maven-plugin 1.0-alpha-15 + + org.apache.maven.plugins + maven-assembly-plugin + 2.2-beta-3 + org.apache.maven.plugins maven-compiler-plugin @@ -983,7 +988,7 @@ org.springframework spring-context - 2.5.5 + ${spring.version} commons-logging @@ -994,7 +999,7 @@ org.springframework spring-web - 2.5.5 + ${spring.version} commons-logging @@ -1005,7 +1010,7 @@ org.springframework spring-beans - 2.5.5 + ${spring.version} commons-logging @@ -1074,9 +1079,10 @@ 2.0.8 1.0-beta-4 - 1.2-beta-1 + 1.2-beta-2 6.1.6 0.9 + 2.5.6 @@ -1085,7 +1091,6 @@ maven-assembly-plugin - 2.2-beta-2 false