use of org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent in project archiva by apache.
the class LegacyConverterArtifactConsumer method beginScan.
@Override
public void beginScan(org.apache.archiva.repository.ManagedRepository repository, Date whenGathered) throws ConsumerException {
this.managedRepository = new ManagedDefaultRepositoryContent(artifactMappingProviders, fileTypes);
this.managedRepository.setRepository(repository);
}
use of org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent in project archiva by apache.
the class ArchivaDavResourceFactoryTest method createManagedRepositoryContent.
private ManagedRepositoryContent createManagedRepositoryContent(String repoId) throws RepositoryAdminException {
ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent(artifactMappingProviders, fileTypes);
org.apache.archiva.repository.ManagedRepository repo = repositoryRegistry.getManagedRepository(repoId);
repoContent.setRepository(repo);
if (repo != null && repo instanceof EditableManagedRepository) {
((EditableManagedRepository) repo).setContent(repoContent);
}
return repoContent;
}
use of org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent in project archiva by apache.
the class ManagedDefaultRepositoryContentTest method setUp.
@Before
public void setUp() throws Exception {
Path repoDir = Paths.get("src/test/repositories/default-repository");
MavenManagedRepository repository = createRepository("testRepo", "Unit Test Repo", repoDir);
FileType fileType = archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get(0);
fileType.addPattern("**/*.xml");
assertEquals(FileTypes.ARTIFACTS, fileType.getId());
fileTypes.afterConfigurationChange(null, "fileType", null);
repoContent = new ManagedDefaultRepositoryContent(artifactMappingProviders, fileTypes);
// repoContent = (ManagedRepositoryContent) lookup( ManagedRepositoryContent.class, "default" );
repoContent.setRepository(repository);
}
Aggregations