*/
private void manageArchetypeCatalog(final Repository repository) {
if (repository.isIndexable()) {
// "install" the archetype catalog
try {
final DefaultStorageFileItem file =
new DefaultStorageFileItem(repository, new ResourceStoreRequest(ARCHETYPE_PATH), true, false,
new StringContentLocator(ArchetypeContentGenerator.ID));
file.setContentGeneratorId(ArchetypeContentGenerator.ID);
repository.storeItem(false, file);
}
catch (RepositoryNotAvailableException e) {
log.info("Unable to install the generated archetype catalog, repository {} is out of service",
e.getRepository().getId());