mirror of https://github.com/apache/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
This commit is contained in:
parent
61859a5535
commit
bf252a7788
archiva-docs
archiva-jetty
archiva-modules/archiva-web
archiva-security/src
main/java/org/apache/maven/archiva/security
test/resources/org/apache/maven/archiva/security
archiva-webapp
archiva-xmlrpc
archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api
archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client
archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security
archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services
|
@ -45,7 +45,6 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<configuration>
|
||||
<descriptor>src/site/assembly/docs.xml</descriptor>
|
||||
</configuration>
|
||||
|
|
|
@ -239,7 +239,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -97,11 +97,6 @@
|
|||
<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>
|
||||
|
||||
|
|
|
@ -83,11 +83,6 @@
|
|||
<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>
|
||||
|
||||
|
|
|
@ -120,10 +120,6 @@
|
|||
<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>
|
||||
|
||||
|
@ -180,11 +176,6 @@
|
|||
<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>
|
||||
|
||||
|
|
|
@ -332,6 +332,32 @@
|
|||
</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>
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
<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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -85,11 +85,6 @@
|
|||
<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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
else
|
||||
catch ( ObjectNotFoundException e )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
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 );
|
||||
}
|
||||
|
||||
|
|
15
pom.xml
15
pom.xml
|
@ -112,6 +112,11 @@
|
|||
<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>
|
||||
|
@ -983,7 +988,7 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>2.5.5</version>
|
||||
<version>${spring.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
@ -994,7 +999,7 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>2.5.5</version>
|
||||
<version>${spring.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
@ -1005,7 +1010,7 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>2.5.5</version>
|
||||
<version>${spring.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
@ -1074,9 +1079,10 @@
|
|||
<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>
|
||||
|
@ -1085,7 +1091,6 @@
|
|||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2-beta-2</version>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
|
|
Loading…
Reference in New Issue