protected VcsManager getVcsManager() { if (vcsManager == null) { vcsManager = new VcsManager(); } return vcsManager; }
@Override protected ExportedModule loadModule(Configuration config, String prefix) { String moduleName = config.getString(prefix + ".name"); String moduleRemote = config.getString(prefix + ".remote"); String moduleRevision = config.getString(prefix + ".revision"); String vcsType = config.getString(prefix + ".vcs"); return new ExportedModule(moduleName, moduleRemote, moduleRevision, getVcsManager().getVcs(vcsType, config)); }
vcs = existingModule.getVcs(); } else if (Pride.isValidModuleDirectory(dir)) { vcs = vcsManager.findSupportingVcs(dir, globalConfig); } else { continue;
@Override protected Module loadModule(Configuration config, String prefix) { String moduleName = config.getString(prefix + ".name"); String vcsType = config.getString(prefix + ".vcs"); return new Module(moduleName, getVcsManager().getVcs(vcsType, config)); }
private Collection<ExportedModule> getModulesToAdd(RuntimeConfiguration config) { String repoType = config.override(REPO_TYPE_DEFAULT, explicitRepoType); final String repoBaseUrl = config.override(REPO_BASE_URL, explicitRepoBaseUrl); final String branch = config.override(REPO_BRANCH, explicitBranch); final Vcs vcs = getVcsManager().getVcs(repoType, config); final VcsSupport vcsSupport = vcs.getSupport(); return Collections2.transform(modules, new Function<String, ExportedModule>() { @Override public ExportedModule apply(String module) { String moduleName = vcsSupport.resolveRepositoryName(module); String repoUrl; if (!StringUtils.isEmpty(moduleName)) { repoUrl = module; } else { moduleName = module; repoUrl = getRepoUrl(repoBaseUrl, moduleName); } return new ExportedModule(moduleName, repoUrl, branch, vcs); } }); }