How to Integrate Subversion, Version Control Software, With Apache ANT 에 통합하는 방법을 파괴, 버전 제어 소프트웨어, 아파치 개미
Subversion is a popular version control software and replacement for CVS, the grand-daddy of all version control software which is still widely used in open source community. 인기있는 버전 관리 소프트웨어와 파괴를 대체하는가 cvs, 그랜드 - 아빠의 모든 버전 제어 소프트웨어를 오픈 소스 커뮤니티는 아직 널리 사용합니다.
Recently I had the necessity to invoke Subversion commands like checkout from Ant, a popular java based build software which replaces make tool. 최근에 나는 체크 아웃에서 같은 명령을 파괴를 호출할의 필요성 개미와 같이 인기있는 자바 기반 구축 소프트웨어를 만들 도구를 대체합니다.
There are two ant tasks to accomplish this, the better one is SvnAnt from Subclipse project. 이것을 달성하기 위해 두 가지가있습니다 개미 작업이 높을수록 subclipse 하나는 프로젝트에서 svnant합니다. However configuring it to work was non-trivial as proper usage documentation was missing. 그러나 그것을 구성하는 작업이 아닌 올바른 사용법 설명서가없는 - 사소한로합니다. So I decided simplify the process to make your life easier. 그래서 난 당신의 인생을 결정 프로세스를 단순화하고 쉽게합니다.
However the extensive commands it supports are well 그러나 광범위한 명령은 잘 지원 documented 문서화 . 합니다.
Note: If prompted for user name / password use guest / guest. 참고 사항 : 사용자에 대한 메시지가 나타나면 이름 / 비밀 번호를 사용 게스트 / 게스트합니다.
Why SvnAnt? 왜 svnant?
Subversion is a full-fledged version control software obviously supporting commands like checkout, add or commit. - 본격적인 버전 제어 소프트웨어를 완전 파괴는 물론 같은 명령을 지원하는 체크 아웃, 추가 또는 커밋합니다. The ant task from O’Reily didn’t even support checkout! 개미 o'reily 작업을 지원 않았는데 체크 아웃! It supported a very limited set from the available commands. 이 명령을 사용할 수있는 설정이 매우 제한되는 지원합니다.
So I went for 그래서 난 받으러 간 svnant task which had much better support. 훨씬 더 나은 작업을 지원했다. Also this way you don’t have to mess with 또한이 방법을 혼란하게하지 않아도 exec’ing the Subversion CLI exec'ing the 파괴 cli commands directly from your ant script. 개미 스크립트에서 직접 명령을합니다. It is wrapped up for ease of use. 사용 용이성을위한 것이 싸서합니다. It can also use JNI interface for speed. 그것은 또한 이러한 방식 인터페이스를 속도를 사용합니다.
To provide access to the Subversion API, svnant uses either the 에 액세스를 제공하는 파괴 것이든, 중 하나를 사용 svnant javahl - Subversion Java bindings or Subversion’s command line programs (which must be installed and in your PATH). - 자바 바인딩을 파괴 또는 파괴의 커맨드 라인 프로그램 (이 설치되어 있어야합니다 그리고 당신의 경로).
javahl uses JNI which must be setup appropriately. 이러한 방법을 사용 javahl 설치 프로그램을 적절하게해야합니다. I preferred using the Subversion’s command line programs as subversion was already installed in my system. 나는 파괴의 명령 라인을 사용하여 프로그램을 선호하는 파괴는 이미 내 시스템에 설치합니다.
Steps: 단계 :
1. I am assuming you already have 나는 추측이 이미 ant 개미 installed. 를 설치합니다. If not do it first. 먼저하지 않으면합니다. Ensure %ANT_HOME% ($ANT_HOME for *nix) is defined and %ANT_HOME%\bin is appended to your %PATH%. 보장 % ant_home % ($ ant_home에 대한 유닉스 계열의)은 정의 및 % ant_home % \ 상자가 추가됩니다 % 경로 %를합니다.
2. 두합니다. If you do not have subversion installed then first 파괴를 설치하지 않은 경우 다음 첫 번째 download it 다운로드 and install. 및 설치합니다.
2.1 Ensure that svn is in your path by invoking svn from a command windows (cmd for windows, bash etc. for *nix). svn는 여러분의 경로를 확인 2.1 svn를 호출하여 명령 창 (cmd에 대한 창문, 배쉬 등등에 대한 유닉스 계열).
3. 3합니다. Download 다운로드 svnant and extract the files to any directory. 그리고 아무 디렉토리에 파일을 압축을 풉니다.
4. 사. Go to your project directory. 당신의 프로젝트 디렉토리로 이동합니다. If it doesn’t have a lib (or equivalent) directory to store required jar files then create one and copy all the files (*.jar ) from svnant’s lib directory: lib을하지 않으면 (또는 이에 상응하는) 디렉토리에 저장 및 사본을 만들 필요 단지 파일을 다음의 모든 파일 (*. 병)보다 svnant의 여성 해방 운동 전화 번호부 :
commons-lang-2.0.jar 커먼즈 - 랭 - 2.0.jar
jakarta-regexp-1.3.jar 자카르타 - 연산자 - 1.3.jar
svnClientAdapter.jar svnclientadapter.jar
svnant.jar
svnjavahl.jar
5. 오. To use svn task you have to add a taskdef to your build file. svn을 사용하여 작업을해야 taskdef 빌드 파일을 추가합니다. Use either of the following: 다음과 같은 방법 중 하나를 사용 :
Option 1: 옵션 1 :
This requires the lib directory to be included with either “ant -lib lib” or by adding an extra parameter: 여성 해방 운동 전화 번호부를 필요로이 중 하나에 포함되어있는 "개미 - lib lib"또는 엑스트라를 추가하여 매개 변수 :
where project.classpath is previously defined as: project.classpath은 이전에 어디로 정의됩니다 :
Option 2 is simpler: 옵션 2는 간단 :
The project.classpath is previously defined as shown before. the project.classpath하기 전에는 이전과 같이 정의합니다.
For example you can use this simple build.xml file to fetch latest code from WordPress repository: 예를 들어이 간단한 build.xml 파일을 사용할 수있습니다 최신 코드를 가져오는 wordpress 리포지 토리 :
Run this script by simply typing ant. 이 스크립트를 실행 개미 간단하게 입력합니다.
BTW: I think Subversion as version control software and ant as build and deployment software are two very strong products which should be part of any enterprise open source software stack. btw : 나는 버전 제어 소프트웨어와 개미로 생각으로 파괴를 구축 및 배포 소프트웨어는 두 개의 아주 강한 제품을 모든 기업은 오픈 소스 소프트웨어 스택의 일부가 될합니다.
Filed under 밑에 Headline News 헤드 라인 뉴스 , How To 하는 방법을 , Java Software 자바 소프트웨어 , Open Source Software 오픈 소스 소프트웨어 , Tech Note 기술 참고 사항 | |
| |
RSS 2.0 rss 2.0 | |
Trackback 트랙백 this Article | 이 문서 |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |





June 9th, 2006 at 1:09 pm 2006년 6월 9일에서 오후 1시 9분
I am not able to set the interative option in svn, ie I have to use username and password option in a non interactive way. 나는 interative 옵션을 설정하는 svn 수 없다, 즉 사용자 이름과 비밀 번호를 사용해야 옵션에 나는이 아닌 양방향합니다.
Can anyone tell the format to enable authentication in an interactive way. 인증에 아무도 말할 수있습니다 대화형 방식의 형식을 사용합니다.
Thanks in advance. 미리 감사합니다.
Ankush ankush
May 3rd, 2007 at 10:18 am 2007년 5월 3일에서 오전 10시 18분
Ankush, if it is not too late ankush, 너무 늦게하지 않은 경우
There is an task for this purpuse in Core taskset. purpuse의 코어가이 작업을 taskset합니다. See example: 참조 예 :
Flitt flitt
May 20th, 2008 at 2:48 pm 2008년 5월 20일에서 오후 2시 48분
I find the SVN Ant task very primitive compared to its CVS cousin. 개미 svn에서 매우 원시적인 작업을 찾을 수 있습니까 cvs에 비해 현저히 사촌합니다. Maybe I’m missing something but I couldn’t figure out how to replace this cvs task with its svn alternative: 어쩌면 내가 놓친 게 그렇지만 난 그럴 수 없었을 교체하는 방법이 cvs 작업을 알아낼 대안을 svn :
<cvs dest=”${dest}”<cvs 도착 = "$ (도착)"command=” ${command} “명령 = "$ (명령)"tag=”${tag}”태그 = "$ (태그를)"package=” ${packages} “패키지 = "$ (패키지)"output=”${output}”>출력 = "$ (출력)">May 20th, 2008 at 2:59 pm 2008년 5월 20일에서 오후 2시 59분
I find the SVN Ant task very primitive compared to its CVS cousin. 개미 svn에서 매우 원시적인 작업을 찾을 수 있습니까 cvs에 비해 현저히 사촌합니다. Maybe I’m missing something but I couldn’t figure out how to replace the cvs task with its svn alternative. 어쩌면 내가 놓친 게 그렇지만 난 그럴 수 없었을 알아내는 작업을 대체하는 방법을 cvs svn 대체합니다. I’m referring to the ‘command’ and ‘package’ attributes which could be specified as build properties and would make the build script pretty generic and parameterized. 나는를 참조하고 '명령'과 '패키지'로 지정된 속성을 만들 수있는 속성과 매개 변수가 보일수도의 빌드 스크립트는 매우 일반적인 것으로 만들고있습니다.