Cleanup of maven-admin dependencies

This commit is contained in:
Martin Stockhammer 2020-02-02 14:32:28 +01:00
parent f99fa99f41
commit 2a0802bb66
12 changed files with 228 additions and 163 deletions

View File

@ -68,12 +68,6 @@
<groupId>org.apache.archiva.maven</groupId> <groupId>org.apache.archiva.maven</groupId>
<artifactId>archiva-maven-metadata</artifactId> <artifactId>archiva-maven-metadata</artifactId>
</dependency> </dependency>
<!--
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-plexus-bridge</artifactId>
</dependency>
-->
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>archiva-storage-api</artifactId> <artifactId>archiva-storage-api</artifactId>

View File

@ -35,7 +35,11 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-layer</artifactId> <artifactId>archiva-storage-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
@ -53,6 +57,7 @@
<groupId>org.apache.archiva.redback</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-users-api</artifactId> <artifactId>redback-users-api</artifactId>
</dependency> </dependency>
<!--
<dependency> <dependency>
<groupId>org.apache.maven.indexer</groupId> <groupId>org.apache.maven.indexer</groupId>
<artifactId>indexer-core</artifactId> <artifactId>indexer-core</artifactId>
@ -96,6 +101,7 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
-->
</dependencies> </dependencies>
<build> <build>

View File

@ -22,7 +22,7 @@ package org.apache.archiva.admin.model.remote;
import org.apache.archiva.admin.model.AuditInformation; import org.apache.archiva.admin.model.AuditInformation;
import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.RemoteRepository; import org.apache.archiva.admin.model.beans.RemoteRepository;
import org.apache.maven.index.context.IndexingContext; import org.apache.archiva.indexer.ArchivaIndexingContext;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -57,6 +57,6 @@ public interface RemoteRepositoryAdmin
* @throws RepositoryAdminException * @throws RepositoryAdminException
* @since 1.4-M2 * @since 1.4-M2
*/ */
IndexingContext createIndexContext( RemoteRepository repository ) ArchivaIndexingContext createIndexContext( RemoteRepository repository )
throws RepositoryAdminException; throws RepositoryAdminException;
} }

View File

@ -42,13 +42,40 @@
<artifactId>archiva-security-common</artifactId> <artifactId>archiva-security-common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.maven.indexer</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>indexer-core</artifactId> <artifactId>archiva-storage-api</artifactId>
<classifier>shaded-lucene</classifier>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>guava</artifactId> <artifactId>archiva-storage-fs</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-layer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-filelock</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-proxy-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.components.cache</groupId>
<artifactId>archiva-components-spring-cache-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-statistics-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
@ -59,44 +86,151 @@
<artifactId>archiva-repository-admin-api</artifactId> <artifactId>archiva-repository-admin-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>archiva-plexus-bridge</artifactId> <artifactId>redback-users-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>metadata-repository-api</artifactId> <artifactId>redback-configuration</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>repository-statistics</artifactId> <artifactId>redback-rbac-role-manager</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva.components.registry</groupId>
<artifactId>metadata-model</artifactId> <artifactId>archiva-components-spring-registry-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva.maven</groupId> <groupId>org.apache.archiva.components</groupId>
<artifactId>archiva-maven-repository</artifactId> <artifactId>archiva-components-spring-quartz</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>javax.annotation</groupId>
<artifactId>commons-text</artifactId> <artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.inject</groupId> <groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId> <artifactId>javax.inject</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<!--
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<!--
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
-->
<!--
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-plexus-bridge</artifactId>
</dependency>
-->
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-repository-api</artifactId>
</dependency>
<!--
-->
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-model</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva.components</groupId> <groupId>org.apache.archiva.components</groupId>
<artifactId>archiva-components-spring-taskqueue</artifactId> <artifactId>archiva-components-spring-taskqueue</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-shared</artifactId>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<!-- Used by spring configuration -->
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>repository-statistics</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Test scope -->
<dependency>
<groupId>org.apache.archiva.maven</groupId>
<artifactId>archiva-maven-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.indexer</groupId>
<artifactId>indexer-core</artifactId>
<classifier>shaded-lucene</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.archiva.maven</groupId>
<artifactId>archiva-maven-repository</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>javax.transaction</groupId> <groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId> <artifactId>javax.transaction-api</artifactId>
@ -104,12 +238,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId> <artifactId>spring-context-support</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -134,89 +263,13 @@
<artifactId>archiva-components-spring-registry-commons</artifactId> <artifactId>archiva-components-spring-registry-commons</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>archiva-test-utils</artifactId> <artifactId>archiva-test-utils</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.components</groupId>
<artifactId>archiva-components-spring-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-rbac-role-manager</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!--
<dependency> <dependency>
<groupId>org.apache.archiva.redback</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-authentication-api</artifactId> <artifactId>redback-authentication-api</artifactId>
@ -227,11 +280,14 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
-->
<!--
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId> <artifactId>log4j-1.2-api</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
-->
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
@ -255,19 +311,15 @@
<groupId>org.apache.archiva.redback</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-rbac-cached</artifactId> <artifactId>redback-rbac-cached</artifactId>
<scope>test</scope> <scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!--
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId> <artifactId>derby</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
-->
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
@ -293,11 +345,13 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!--
<dependency> <dependency>
<groupId>org.ow2.asm</groupId> <groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId> <artifactId>asm</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
-->
</dependencies> </dependencies>

View File

@ -28,11 +28,11 @@ import org.apache.archiva.configuration.Configuration;
import org.apache.archiva.components.registry.Registry; import org.apache.archiva.components.registry.Registry;
import org.apache.archiva.components.scheduler.CronExpressionValidator; import org.apache.archiva.components.scheduler.CronExpressionValidator;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.validator.GenericValidator;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import java.util.regex.Pattern;
/** /**
* apply basic repository validation : id and name. * apply basic repository validation : id and name.
@ -46,6 +46,11 @@ public class DefaultRepositoryCommonValidator
implements RepositoryCommonValidator implements RepositoryCommonValidator
{ {
private static final Pattern REPOSITORY_ID_VALID_EXPRESSION_PATTERN = Pattern.compile( REPOSITORY_ID_VALID_EXPRESSION );
private static final Pattern REPOSITORY_NAME_VALID_EXPRESSION_PATTERN = Pattern.compile( REPOSITORY_NAME_VALID_EXPRESSION );
private static final Pattern REPOSITORY_LOCATION_VALID_EXPRESSION_PATTERN = Pattern.compile( ManagedRepositoryAdmin.REPOSITORY_LOCATION_VALID_EXPRESSION );
@Inject @Inject
private ArchivaConfiguration archivaConfiguration; private ArchivaConfiguration archivaConfiguration;
@ -91,7 +96,7 @@ public class DefaultRepositoryCommonValidator
throw new RepositoryAdminException( "Repository ID cannot be empty." ); throw new RepositoryAdminException( "Repository ID cannot be empty." );
} }
if ( !GenericValidator.matchRegexp( repoId, REPOSITORY_ID_VALID_EXPRESSION ) ) if ( !REPOSITORY_ID_VALID_EXPRESSION_PATTERN.matcher( repoId ).matches( ) )
{ {
throw new RepositoryAdminException( throw new RepositoryAdminException(
"Invalid repository ID. Identifier must only contain alphanumeric characters, underscores(_), dots(.), and dashes(-)." ); "Invalid repository ID. Identifier must only contain alphanumeric characters, underscores(_), dots(.), and dashes(-)." );
@ -104,7 +109,7 @@ public class DefaultRepositoryCommonValidator
throw new RepositoryAdminException( "repository name cannot be empty" ); throw new RepositoryAdminException( "repository name cannot be empty" );
} }
if ( !GenericValidator.matchRegexp( name, REPOSITORY_NAME_VALID_EXPRESSION ) ) if ( !REPOSITORY_NAME_VALID_EXPRESSION_PATTERN.matcher( name ).matches( ) )
{ {
throw new RepositoryAdminException( throw new RepositoryAdminException(
"Invalid repository name. Repository Name must only contain alphanumeric characters, white-spaces(' '), " "Invalid repository name. Repository Name must only contain alphanumeric characters, white-spaces(' '), "
@ -141,8 +146,7 @@ public class DefaultRepositoryCommonValidator
String repoLocation = removeExpressions( managedRepository.getLocation( ) ); String repoLocation = removeExpressions( managedRepository.getLocation( ) );
if ( !GenericValidator.matchRegexp( repoLocation, if ( !REPOSITORY_LOCATION_VALID_EXPRESSION_PATTERN.matcher( repoLocation ).matches() )
ManagedRepositoryAdmin.REPOSITORY_LOCATION_VALID_EXPRESSION ) )
{ {
throw new RepositoryAdminException( throw new RepositoryAdminException(
"Invalid repository location. Directory must only contain alphanumeric characters, equals(=), question-marks(?), " "Invalid repository location. Directory must only contain alphanumeric characters, equals(=), question-marks(?), "

View File

@ -27,7 +27,7 @@ import org.apache.archiva.configuration.Configuration;
import org.apache.archiva.configuration.UserInterfaceOptions; import org.apache.archiva.configuration.UserInterfaceOptions;
import org.apache.archiva.configuration.WebappConfiguration; import org.apache.archiva.configuration.WebappConfiguration;
import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.metadata.model.facets.AuditEvent;
import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.maven.wagon.providers.http.HttpWagon; import org.apache.maven.wagon.providers.http.HttpWagon;

View File

@ -26,17 +26,16 @@ import org.apache.archiva.common.utils.PathUtil;
import org.apache.archiva.configuration.Configuration; import org.apache.archiva.configuration.Configuration;
import org.apache.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.archiva.configuration.RemoteRepositoryConfiguration;
import org.apache.archiva.configuration.RepositoryCheckPath; import org.apache.archiva.configuration.RepositoryCheckPath;
import org.apache.archiva.indexer.UnsupportedBaseContextException; import org.apache.archiva.indexer.ArchivaIndexingContext;
import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.metadata.model.facets.AuditEvent;
import org.apache.archiva.repository.base.PasswordCredentials;
import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RemoteRepository;
import org.apache.archiva.repository.RepositoryCredentials; import org.apache.archiva.repository.RepositoryCredentials;
import org.apache.archiva.repository.RepositoryException; import org.apache.archiva.repository.RepositoryException;
import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.RepositoryRegistry;
import org.apache.archiva.repository.base.PasswordCredentials;
import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.IndexCreationFeature;
import org.apache.archiva.repository.features.RemoteIndexFeature; import org.apache.archiva.repository.features.RemoteIndexFeature;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.maven.index.context.IndexingContext;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
@ -262,16 +261,11 @@ public class DefaultRemoteRepositoryAdmin
} }
@Override @Override
public IndexingContext createIndexContext( org.apache.archiva.admin.model.beans.RemoteRepository remoteRepository ) public ArchivaIndexingContext createIndexContext( org.apache.archiva.admin.model.beans.RemoteRepository remoteRepository )
throws RepositoryAdminException throws RepositoryAdminException
{
try
{ {
RemoteRepository repo = repositoryRegistry.getRemoteRepository(remoteRepository.getId()); RemoteRepository repo = repositoryRegistry.getRemoteRepository(remoteRepository.getId());
return repo.getIndexingContext().getBaseContext(IndexingContext.class); return repo.getIndexingContext();
} catch (UnsupportedBaseContextException e) {
throw new RepositoryAdminException( e.getMessage(), e);
}
} }

View File

@ -20,10 +20,11 @@ package org.apache.archiva.admin.repository;
import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import org.apache.commons.validator.GenericValidator;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.regex.Pattern;
/** /**
* @author Eric Barboni * @author Eric Barboni
*/ */
@ -34,9 +35,9 @@ public class ValidatorTest
@Test @Test
public void testGenericValidator() public void testGenericValidator()
{ {
// Be sure M Pattern pattern = Pattern.compile( ManagedRepositoryAdmin.REPOSITORY_LOCATION_VALID_EXPRESSION );
assertFalse("A repo location cannot contains space",GenericValidator.matchRegexp( "/opt/ testme/", // Checks only the pattern
ManagedRepositoryAdmin.REPOSITORY_LOCATION_VALID_EXPRESSION )); assertFalse("A repo location cannot contains space",pattern.matcher( "/opt/ testme/" ).matches());
} }
} }

View File

@ -23,7 +23,7 @@ import org.apache.archiva.admin.model.beans.RemoteRepository;
import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin;
import org.apache.archiva.admin.repository.AbstractRepositoryAdminTest; import org.apache.archiva.admin.repository.AbstractRepositoryAdminTest;
import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.metadata.model.facets.AuditEvent;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.junit.Test; import org.junit.Test;
import javax.inject.Inject; import javax.inject.Inject;

View File

@ -30,8 +30,8 @@ import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin;
import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin;
import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorOrderComparator; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorOrderComparator;
import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin;
import org.apache.archiva.indexer.ArchivaIndexingContext;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.maven.index.context.IndexingContext;
import org.modelmapper.ModelMapper; import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -126,7 +126,7 @@ public class MockRepoAdmin
} }
@Override @Override
public IndexingContext createIndexContext( RemoteRepository repository ) public ArchivaIndexingContext createIndexContext( RemoteRepository repository )
throws RepositoryAdminException throws RepositoryAdminException
{ {
return null; //To change body of implemented methods use File | Settings | File Templates. return null; //To change body of implemented methods use File | Settings | File Templates.

View File

@ -23,7 +23,7 @@ import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.RemoteRepository; import org.apache.archiva.admin.model.beans.RemoteRepository;
import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin;
import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.index.context.IndexingContext; import org.apache.archiva.indexer.ArchivaIndexingContext;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -89,7 +89,7 @@ public class MockRemoteRepositoryAdmin
} }
@Override @Override
public IndexingContext createIndexContext( RemoteRepository repository ) public ArchivaIndexingContext createIndexContext( RemoteRepository repository )
throws RepositoryAdminException throws RepositoryAdminException
{ {
return null; return null;

14
pom.xml
View File

@ -96,6 +96,8 @@
<asm.version>5.0.4</asm.version> <asm.version>5.0.4</asm.version>
<modelmapper.version>2.3.5</modelmapper.version>
<!-- restore when we will be able to use a derby in memory database --> <!-- restore when we will be able to use a derby in memory database -->
<redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl> <redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl>
<redbackTestJdbcDriver>org.apache.derby.jdbc.EmbeddedDriver</redbackTestJdbcDriver> <redbackTestJdbcDriver>org.apache.derby.jdbc.EmbeddedDriver</redbackTestJdbcDriver>
@ -735,7 +737,7 @@
<dependency> <dependency>
<groupId>org.modelmapper</groupId> <groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId> <artifactId>modelmapper</artifactId>
<version>0.7.3</version> <version>${modelmapper.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -1063,6 +1065,11 @@
<artifactId>redback-users-api</artifactId> <artifactId>redback-users-api</artifactId>
<version>${redback.version}</version> <version>${redback.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-configuration</artifactId>
<version>${redback.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva.redback</groupId> <groupId>org.apache.archiva.redback</groupId>
@ -1452,6 +1459,11 @@
<artifactId>wagon-http-lightweight</artifactId> <artifactId>wagon-http-lightweight</artifactId>
<version>${wagon.version}</version> <version>${wagon.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-shared</artifactId>
<version>${wagon.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven.wagon</groupId> <groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId> <artifactId>wagon-http</artifactId>