);
}
setDefaults();
final Repository repository = findRepository();
final RepositoryItemUid mdUid = repository.createUid("/" + PATH_OF_REPOMD_XML);
try {
mdUid.getLock().lock(Action.update);
LOG.debug("Generating Yum-Repository for '{}' ...", getRpmDir());
try {
// NEXUS-6680: Nuke cache dir if force rebuild in effect
if (shouldForceFullScan()) {
DirSupport.deleteIfExists(getCacheDir().toPath());
}
DirSupport.mkdir(getRepoDir().toPath());
File rpmListFile = createRpmListFile();
commandLineExecutor.exec(buildCreateRepositoryCommand(rpmListFile));
}
catch (IOException e) {
LOG.warn("Yum metadata generation failed", e);
throw new IOException("Yum metadata generation failed", e);
}
// TODO dubious
Thread.sleep(100);
if (repository != null) {
final MavenRepository mavenRepository = repository.adaptToFacet(MavenRepository.class);
if (mavenRepository != null) {
try {
routingManager.forceUpdatePrefixFile(mavenRepository);
}
catch (Exception e) {