use of org.eclipse.winery.common.configuration.GitBasedRepositoryConfiguration in project winery by eclipse.
the class RepositoryFactory method getRepository.
/**
* Generates a new IRepository working on the specified path.
*/
public static IRepository getRepository(Path path) {
Objects.requireNonNull(path);
GitBasedRepositoryConfiguration config = new GitBasedRepositoryConfiguration(false, new FileBasedRepositoryConfiguration(path));
try {
reconfigure(config);
} catch (IOException | GitAPIException e) {
LOGGER.error("Error while reconfiguring the repository", e);
}
return repository;
}
use of org.eclipse.winery.common.configuration.GitBasedRepositoryConfiguration in project winery by eclipse.
the class AbstractGitResolver method createRepository.
@Override
public GitBasedRepository createRepository(File repositoryLocation) throws IOException, GitAPIException {
FileBasedRepositoryConfiguration compositeConfiguration = new FileBasedRepositoryConfiguration(Paths.get(repositoryLocation.toString()));
GitBasedRepositoryConfiguration configuration = new GitBasedRepositoryConfiguration(false, repositoryUrl, repositoryBranch, compositeConfiguration);
return new GitBasedRepository(configuration, RepositoryFactory.createXmlOrYamlRepository(compositeConfiguration, repositoryLocation.toPath()));
}
use of org.eclipse.winery.common.configuration.GitBasedRepositoryConfiguration in project winery by eclipse.
the class TenantRepository method initTenantRepository.
public IRepository initTenantRepository(String tenantName) throws GitAPIException, IOException {
FileBasedRepositoryConfiguration fileBasedConfig = new FileBasedRepositoryConfiguration(repositoryRoot.resolve(tenantName));
IRepository tenantRepo = this.createRepo(new GitBasedRepositoryConfiguration(false, fileBasedConfig));
repositories.put(tenantName, tenantRepo);
return tenantRepo;
}
use of org.eclipse.winery.common.configuration.GitBasedRepositoryConfiguration in project winery by eclipse.
the class RepositoryFactory method reconfigure.
/**
* Reconfigures based on Environment
*/
public static void reconfigure() throws Exception {
final GitBasedRepositoryConfiguration gitBasedRepositoryConfiguration = Environments.getInstance().getGitBasedRepositoryConfiguration();
reconfigure(gitBasedRepositoryConfiguration);
}
Aggregations