use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testParsingUrlWithColon.
public void testParsingUrlWithColon() throws ScmRepositoryException {
Settings settings = new Settings();
String viewName = "my_module_view";
String configSpecPath = "//myserver/ClearCase/ConfigSpecs/mymodule.txt";
String url = viewName + ":" + configSpecPath;
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertEquals(new File(configSpecPath).getPath(), repository.getConfigSpec().getPath());
assertEquals(viewName, repository.getViewName("bla"));
assertNull(repository.getLoadDirectory());
assertNull(repository.getStreamName());
assertNull(repository.getVobName());
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseCheckOutCommandTest method setUp.
public void setUp() throws Exception {
super.setUp();
checkOutCommand = new ClearCaseCheckOutCommand();
checkOutCommand.setLogger(new DefaultLog());
settings = new Settings();
checkOutCommand.setSettings(settings);
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseUtil method readSettings.
public static Settings readSettings() {
File settingsFile = new File(settingsDirectory, CLEARCASE_SETTINGS_FILENAME);
if (!settingsFile.exists()) {
File scmGlobalDir = new File(System.getProperty("maven.home"), "conf");
settingsFile = new File(scmGlobalDir, CLEARCASE_SETTINGS_FILENAME);
}
if (settingsFile.exists()) {
ClearcaseXpp3Reader reader = new ClearcaseXpp3Reader();
try {
return reader.read(ReaderFactory.newXmlReader(settingsFile));
} catch (FileNotFoundException e) {
// nop
} catch (IOException e) {
// nop
} catch (XmlPullParserException e) {
String message = settingsFile.getAbsolutePath() + " isn't well formed. SKIPPED." + e.getMessage();
System.out.println(message);
}
}
return new Settings();
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testParsingUrlWithPipe.
public void testParsingUrlWithPipe() throws ScmRepositoryException, IOException {
Settings settings = new Settings();
String viewName = "my_module_view";
String configSpecPath = "//myserver/ClearCase/ConfigSpecs/mymodule.txt";
String url = viewName + "|" + configSpecPath;
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertEquals(new File(configSpecPath).getPath(), repository.getConfigSpec().getPath());
assertEquals(viewName, repository.getViewName("bla"));
assertNull(repository.getLoadDirectory());
assertNull(repository.getStreamName());
assertNull(repository.getVobName());
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testParsingUrlClearCaseUCMAutoConfig.
public void testParsingUrlClearCaseUCMAutoConfig() throws ScmRepositoryException {
Settings settings = new Settings();
settings.setClearcaseType(ClearCaseScmProviderRepository.CLEARCASE_UCM);
String delimiter = "|";
String loadPath = "/ua/sub/project";
String vobName = "pvob_alliance";
String streamName = "INT_COMMUN_V1.0";
String url = "load " + loadPath + delimiter + vobName + delimiter + streamName;
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertNull(repository.getConfigSpec());
assertTrue(repository.isAutoConfigSpec());
assertNotNull(repository.getViewName("bla"));
assertEquals(loadPath, repository.getLoadDirectory());
assertEquals(streamName, repository.getStreamName());
assertEquals(vobName, repository.getVobName());
}
Aggregations