I have not specified any keystore in my program
public static void main(String[] args) {
final String svnurl =
"https://XYZ/emttools/DXA/trunk/ExcelAdapter";
String[] bits = svnurl.split("/");
String folderName = bits[bits.length-1];
System.out.println("Folder------------"+folderName);
final String destPath = "D:\\svnfiles\\"+folderName;
final String svnUserName = "cmy5kor";
final String svnPassword = "Germany12345678";
System.out.println("—————————————-");
System.out.println("Repository URL " + svnurl);
System.out.println("Checkout destination path: " + destPath);
try {
SVNRepository repository = null;
DAVRepositoryFactory.setup();
// initiate the reporitory from the svnurl
repository = SVNRepositoryFactory.create(SVNURL
.parseURIEncoded(svnurl));
// create authentication data
ISVNAuthenticationManager authManager =
SVNWCUtil.createDefaultAuthenticationManager(svnUserName,
svnPassword);
repository.setAuthenticationManager(authManager);
// output some data to verify connection
System.out.println("Repository Root: "
+ repository.getRepositoryRoot(true));
System.out.println("Repository UUID: "
+ repository.getRepositoryUUID(true));
// need to identify latest revision
long latestRevision = repository.getLatestRevision();
System.out.println("Repository Latest Revision: " +
latestRevision);
// create client manager and set authentication
SVNClientManager ourClientManager =
SVNClientManager.newInstance();
ourClientManager.setAuthenticationManager(authManager);
// use SVNUpdateClient to do the export
SVNUpdateClient updateClient =
ourClientManager.getUpdateClient();
updateClient.setIgnoreExternals(false);
System.out.println("Location--"+repository.getLocation());
updateClient.doExport(repository.getLocation(), new
File(destPath),
SVNRevision.create(latestRevision),
SVNRevision.create(latestRevision),null, true, SVNDepth.INFINITY);
//updateClient.doCheckout(repository.getLocation(), new
File("D\\svnfiles"), SVNRevision.create(latestRevision),
SVNRevision.create(latestRevision),true);
updateClient.setIgnoreExternals(false);
//
System.out.println("Checkout file/folder successfully
!");
} catch (SVNException e) {
e.printStackTrace();
System.out.println("Error message :” + e.getMessage()");
System.exit(1);
}
}
--
View this message in context:
http://karaf.922171.n3.nabble.com/Svn-functionality-on-Karaf-tp4043197p4043249.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.