{"id":1826,"date":"2010-10-05T15:15:09","date_gmt":"2010-10-05T20:15:09","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1826"},"modified":"2010-10-05T15:15:09","modified_gmt":"2010-10-05T20:15:09","slug":"use-subclipse-svn-task-in-ant-scripts","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1826","title":{"rendered":"Use Subclipse Svn Task in Ant scripts"},"content":{"rendered":"<span id=\"Install\"><h2>Install<\/h2><\/span>\n<p>* First, install SVN command line tool. I used <a href=\"http:\/\/www.sliksvn.com\/pub\/Slik-Subversion-1.6.12-win32.msi\">SlikSVN for Win32<\/a> from <a href=\"http:\/\/www.sliksvn.com\/en\/download\">Slik SVN download site<\/a>.<br \/>\n* Download svnant.jar from <a href=\"http:\/\/subclipse.tigris.org\/svnant.html\">http:\/\/subclipse.tigris.org\/svnant.html<\/a>. I downloaded stable release 1.0.0 from <a href=\"http:\/\/subclipse.tigris.org\/files\/documents\/906\/32898\/svnant-1.0.0.zip\">this link<\/a>.<br \/>\n* Unzip.<br \/>\n* Include two jar files in the CLASSPATH<\/p>\n<pre lang=\"dos\">\r\nset SVNANT_LIB=c:\\svnant-1.0.0\\lib\r\nset CLASSPATH=%SVNANT_LIB%\\svnant.jar;%SVNANT_LIB%\\svnClientAdapter.jar;\r\n<\/pre>\n<p>* Define svn task in build.xml file<\/p>\n<pre lang=\"xml\">\r\n<path id=\"svn.ant.path\">\r\n    <pathelement location=\"${svnant.jar}\"\/>\r\n    <pathelement location=\"${svnClientAdapter.jar}\"\/>\r\n<\/path>\r\n\r\n<typedef resource=\"svntask.properties\" \r\n    classpath=\"svn.ant.path\" \/> \r\n<\/pre>\n<p>* Use ant task<\/p>\n<pre lang=\"xml\">\r\n<target name=\"zip.src\" \r\n  description=\"Zip up source code for deployment\">\r\n  <echo>${svn.tmp.dir}<\/echo>\r\n  <delete dir=\"${svn.tmp.dir}\" \/>\r\n  <svn javahl=\"false\">\r\n      <export \r\n          srcUrl=\"${svn.url}\"\r\n          destPath=\"${svn.tmp.dir}\"\r\n      \/>\r\n  <\/svn>\r\n  <property name=\"src.zip.file\" location=\"c:\/temp\/mysrc.zip\"\/>\r\n  <delete file=\"${src.zip.file}\"\/>\r\n  <zip basedir=\"${svn.tmp.dir}\" \r\n      destfile=\"${src.zip.file}\" \r\n      excludes=\"doc\/**\" \r\n      \/>\r\n<\/target>\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"http:\/\/subclipse.tigris.org\/svnant\/svn.html\">Svn Task<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install * First, install SVN command line tool. I used SlikSVN for Win32 from Slik SVN download site. * Download svnant.jar from http:\/\/subclipse.tigris.org\/svnant.html. I downloaded stable release 1.0.0 from this link. * Unzip. * Include two jar files in the &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1826\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[67],"tags":[],"class_list":["post-1826","post","type-post","status-publish","format-standard","hentry","category-svn"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-ts","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1826"}],"version-history":[{"count":1,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1826\/revisions"}],"predecessor-version":[{"id":1827,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1826\/revisions\/1827"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}