Checkout svn using gradle

北慕城南 提交于 2019-12-03 13:50:34
TheKaptain

This slight modification seems to get it working. I've downloaded and unzipped the latest svntask into the project and declare the classpath directly for the taskdef instead of declaring the path separately.

task dwnSnark << {
    ant.taskdef(resource: 'org/tigris/subversion/svnant/svnantlib.xml') {
        classpath {
            fileset(dir: 'svnant-1.3.1/lib', includes: '*.jar')
        }
    }
    mkdir('destpath')
    ant.svn(javahl: 'false', svnkit: 'true', username: 'user', password: 'pass', failonerror: 'false') {
        ant.checkout(url: 'https://svn.java.net/svn/groovychart~svn', destPath: 'destpath')
        ant.update(dir: 'destpath')
    }
}

Hi I got the following to run, but nothing seems to get check out

in the same directory of gradle.build I added a lib folder with the requisite jars

ant.path(id: 'svnant') {
    ant.pathelement(location: 'antlib/svnClientAdapter.jar')
    ant.pathelement(location: 'antlib/svnant.jar')
    ant.pathelement(location: 'antlib/ganymed.jar')
    ant.pathelement(location: 'antlib/jna.jar')
    ant.pathelement(location: 'antlib/svnjavahl.jar')
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!