}
}
- protected List<ProxyConnectorConfiguration> getProxyConnectors()
- {
- return new ArrayList<ProxyConnectorConfiguration>(
- archivaConfiguration.getConfiguration().getProxyConnectors() );
- }
-
public List<AuditListener> getAuditListeners()
{
return auditListeners;
configuration.removeRemoteRepository( remoteRepositoryConfiguration );
+ // TODO use ProxyConnectorAdmin interface ?
// [MRM-520] Proxy Connectors are not deleted with the deletion of a Repository.
- List<ProxyConnectorConfiguration> proxyConnectors = getProxyConnectors();
+ List<ProxyConnectorConfiguration> proxyConnectors = configuration.getProxyConnectors();
for ( ProxyConnectorConfiguration proxyConnector : proxyConnectors )
{
if ( StringUtils.equals( proxyConnector.getTargetRepoId(), repositoryId ) )
import org.apache.archiva.admin.mock.MockAuditListener;
import org.apache.archiva.admin.repository.managed.ManagedRepository;
import org.apache.archiva.admin.repository.managed.ManagedRepositoryAdmin;
+import org.apache.archiva.admin.repository.proxyconnector.ProxyConnectorAdmin;
+import org.apache.archiva.admin.repository.remote.RemoteRepository;
import org.apache.archiva.admin.repository.remote.RemoteRepositoryAdmin;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
@Inject
protected ManagedRepositoryAdmin managedRepositoryAdmin;
+ @Inject
+ protected ProxyConnectorAdmin proxyConnectorAdmin;
+
protected AuditInformation getFakeAuditInformation()
{
AuditInformation auditInformation = new AuditInformation( getFakeUser(), "archiva-localhost" );
}
return null;
}
+
+ protected RemoteRepository getRemoteRepository()
+ {
+ return getRemoteRepository( "foo" );
+ }
+
+ protected RemoteRepository getRemoteRepository(String id)
+ {
+ RemoteRepository remoteRepository = new RemoteRepository();
+ remoteRepository.setUrl( "http://foo.com/maven-it-rocks" );
+ remoteRepository.setTimeout( 10 );
+ remoteRepository.setName( "maven foo" );
+ remoteRepository.setUserName( "foo-name" );
+ remoteRepository.setPassword( "toto" );
+ remoteRepository.setId( id );
+ return remoteRepository;
+ }
}
}
- private RemoteRepository getRemoteRepository()
- {
- RemoteRepository remoteRepository = new RemoteRepository();
- remoteRepository.setUrl( "http://foo.com/maven-it-rocks" );
- remoteRepository.setTimeout( 10 );
- remoteRepository.setName( "maven foo" );
- remoteRepository.setUserName( "foo-name" );
- remoteRepository.setPassword( "toto" );
- remoteRepository.setId( "foo" );
- return remoteRepository;
- }
+
}
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-core-consumers</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-configuration</artifactId>
+ <!-- TODO uncomment when repository admin will be finished
+ <scope>runtime</scope>
+ -->
+ </dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-metadata-consumer</artifactId>
</goals>
<configuration>
<tasks>
- <copy overwrite="true" file="${basedir}/src/test/resources/log4j.xml" todir="${project.build.directory}/classes" />
+ <copy overwrite="true" file="${basedir}/src/test/tomcat/log4j.xml" todir="${project.build.directory}/classes" />
<delete dir="${basedir}/src/main/webapp/WEB-INF/lib" />
</tasks>
</configuration>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-configuration</artifactId>
+ <!-- TODO uncomment when repository admin will be finished
+ <scope>runtime</scope>
+ -->
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
public static final String REMOVE_PATTERN = "Removed File Type Pattern";
public static final String MERGE_REPO_REMOTE = "Merged Staging Repository Triggered Remotely";
+
+ public static final String ADD_PROXY_CONNECTOR = "Added Proxy Connector";
+
+ public static final String DELETE_PROXY_CONNECTOR = "Deleted Proxy Connector";
+
+ public static final String MODIFY_PROXY_CONNECTOR = "Updated Proxy Connector";
private String repositoryId;