How to Integrate Subversion, Version Control Software, With Apache ANT Subversionをどのように統合する、バージョン管理ソフトウェアは、 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. Subversionは、バージョン管理ソフトウェアと交換に人気の、 CVSで、野党ハン-パパのすべてのバージョン管理ソフトウェアはオープンソースコミュニティまだ広く使用されています。
Recently I had the necessity to invoke Subversion commands like checkout from Ant, a popular java based build software which replaces make tool.最近、私は、 Subversionのコマンドを起動する必要アリのようなレジから、ビルドに人気のJavaベースのソフトウェアに代わるmakeツールです。
There are two ant tasks to accomplish this, the better one is SvnAnt from Subclipse project. Antタスクには2つこれを達成するために、より良いsvnant Subclipseを1つはプロジェクトを作成します。 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. Subversionは本格的なバージョン管理ソフトウェアのコマンドをサポートするように明らかにレジに、追加、またはコミットします。 The ant task from O’Reily didn’t even support checkout! Antタスクからのサポートレジにオライリーさえしなかった! 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 SubversionのCLIのexec'ing commands directly from your ant script. Antのスクリプトから直接コマンドです。 It is wrapped up for ease of use.これは使いやすさに包まアップします。 It can also use JNI interface for speed.それにJNIインターフェイスを使用することもできます。フォースピードです。
To provide access to the Subversion API, svnant uses either the破壊のAPIへのアクセスを提供する、のいずれかを使用してsvnant javahl - Subversion Java bindings or Subversion’s command line programs (which must be installed and in your PATH). -S ubversionのJ avaのバインディングまたはS ubversionのコマンドラインプログラム(これをインストールし、にしてパスしなければならない) 。
javahl uses JNI which must be setup appropriately. javahl JNIを使用して適切なセットアップをしなければならない。 I preferred using the Subversion’s command line programs as subversion was already installed in my system.私プリファード使用して、 SubversionのコマンドラインプログラムとしてのSubversionはすでに私のシステムにインストールされています。
Steps:ステップ:
1. 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を、 * nixの)を定義し、 % ANT_HOMEを% \ binにして%パス%が付加されています。
2. 2 。 If you do not have subversion installed then first Subversionをインストールしていない場合は最初に入力し、 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). 2.1はあなたのパスを確認してsvn svnを起動するには、コマンドウィンドウ( cmd Windowsの場合、 bashの等の* nixの)です。
3. 3 。 Downloadダウンロードする svnant and extract the files to any directory.任意のディレクトリにファイルを解凍します。
4. 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 (または同等のもの)が必要となります。 jarファイルを格納するディレクトリを1つ選択してコピーを作成し、すべてのファイル( *. JARファイル)よりsvnantのlibディレクトリ:
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. 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にlib " 、または追加することによって余分なパラメータ:
where project.classpath is previously defined as:ここでは、以前は次として定義されてproject.classpath :
Option 2 is simpler: 2番目のオプションが簡単:
The project.classpath is previously defined as shown before. 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.このスクリプトを実行するだけで入力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.ところで:バージョン管理ソフトウェアとしてのSubversionと思うとAntを展開としてソフトウェアをビルドし、非常に強い製品には2つの部分に任意のエンタープライズすべきであるオープンソースソフトウェアスタックです。
Filed under提出されて Headline Newsニュースの見出し , 、 How Toどのように , 、 Java Software Javaソフトウェア , 、 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時09分
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 pmの
I find the SVN Ant task very primitive compared to its CVS cousin.私Antタスクを検索します。 svnそのCVSのいとこに比べて非常に原始的です。 Maybe I’m missing something but I couldn’t figure out how to replace this cvs task with its svn alternative:たぶん私は行方不明何かが私の交換の方法を考え出すできませんでしたこのタスクを実行するとsvn CVSのもう一つの選択:
<cvs dest=”${dest}”< CVSのリンク先= " $ (リンク先) "command=” ${command} “コマンド= " $ (コマンド ) "tag=”${tag}”タグ= " $ (タグ) "package=” ${packages} “パッケージ= " $ (パッケージ ) "output=”${output}”>出力= " $ (出力) " >May 20th, 2008 at 2:59 pm 2008年5月20日は2:59 pmの
I find the SVN Ant task very primitive compared to its CVS cousin.私Antタスクを検索します。 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.私はを参照して'コマンド'と' package 'の属性として指定されるとなるビルドは、ビルドスクリプトのプロパティとすれば、かなり汎用的なパラメータです。