Thanks JB. My code looks something like below I tried org.tmatesoft.svn,org.tmatesoft.svn.* and also org.tmatesoft.svn.core. Nothing worked
import java.io.File; import java.io.FilenameFilter; import java.util.UUID; import org.bson.types.ObjectId; import org.jongo.Jongo; import org.jongo.MongoCollection; import org.osgi.framework.BundleContext; import org.tmatesoft.svn.core.SVNDepth; import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.io.SVNRepositoryFactory; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.SVNRevision; import org.tmatesoft.svn.core.wc.SVNUpdateClient; import org.tmatesoft.svn.core.wc.SVNWCUtil; import com.bosch.camelroute.MCamelManager; import com.bosch.camelroute.MProducerCallback; import com.bosch.exception.MExceptions; import com.bosch.manager.MManagerCallback; import com.bosch.servicedata.MServiceRcvData; import com.bosch.servicedata.MServiceSndData; import com.bosch.store.MGeneralDefine; import com.bosch.utils.JsonUtils; import com.bosch.utils.MongoUtil; final String svnurl = "https://welcome/tools/XYZ/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 = "xyz123"; final String svnPassword = "xyz123"; 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.setIgnoreExternals(false); System.out.println("Checkout file/folder successfully !"); } catch (SVNException e) { e.printStackTrace(); System.out.println("Error message :” + e.getMessage()"); System.exit(1); } Regards, Chandan -- View this message in context: http://karaf.922171.n3.nabble.com/Svn-functionality-on-Karaf-tp4043197p4043211.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
