简体   繁体   中英

how to download entire project from SVN repository using SVNKit from java

I am able to read a contents from SVN repository file by file using SVN kit. But my requirement is to download entire project from SVN repository to my local directory Using SVN kit java code for source code analysis. So How can I achieve this. I have seen examples regarding reading files and directories not downloading projects. Please any one can help me

SVNClientManager is a part of old SVNKit API. As SVNKit developer, I would recommend you to prefer new SVNKit API based on SvnOperationFactory class (because the old API is implemented via the new one and for some API classes this API-to-API conversion caused problems):

final SvnOperationFactory svnOperationFactory = new SvnOperationFactory();
try {
    final SvnCheckout checkout = svnOperationFactory.createCheckout();
    checkout.setSource(SvnTarget.fromURL(url));
    checkout.setSingleTarget(SvnTarget.fromFile(workingCopyDirectory));
    checkout.run();
} finally {
    svnOperationFactory.dispose();
}

If you don't need ".svn" directories, use SvnOperationFactory#createExport method instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM