<?xml version="1.0" encoding="Shift_JIS" ?>
<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>
<document>

    &project;

    <properties>
      <author>Remy Maucherat</author>
      <primary><title>Building Tomcat</title></primary>
      <title>Tomcat のビルド</title>
      <translator>高橋達男</translator>
      <editor>田中良浩</editor>
    </properties>

<body>

<primary>
<section name="Introduction"/>
</primary>
<section name="はじめに">


<primary>
<p>
Building Tomcat from CVS is very easy, and is the first step to contributing to
Tomcat. The following is a step by step TODO list.
</p>
</primary>
<p>
CVS から Tomcat をビルドするのは非常に簡単で、Tomcat に貢献していただくための
最初のステップです。ステップごとの手順を以下に示します。
</p>

</section>

<primary>
<section name="Download and install a Java Development Kit 1.4.x or later"/>
</primary>
<section name="JDK 1.4.x 以降のダウンロードおよびインストール">

<primary>
<p>
Ealier releases would also work, but are harder to work with due to the need to
download additional dependencies. Tomcat also runs much faster on 
the latest 1.4 JDK.
</p>
</primary>
<p>
JDK 1.4.x より前のリリースでも動作しますが、
依存ライブラリのダウンロードが追加で必要なので手間がかかります。
また、Tomcat の動作は最新の JDK 1.4 の方がずっと高速です。
</p>

<primary>
<p>
The Sun JDK can be downloaded <a href="http://java.sun.com/j2se/">here</a>.
</p>
</primary>
<p>
Sun の JDK は<a href="http://java.sun.com/j2se/">ここ</a>からダウンロード
できます。
</p>

<primary>
<p>
<b>IMPORTANT</b>: Set an environment variable JAVA_HOME to the pathname of the 
directory into which you installed the JDK release.
</p>
</primary>
<p>
<b>重要</b>: 環境変数 JAVA_HOME の値に、
JDKをインストールしたディレクトリのパス名を設定して下さい。
</p>

</section>

<primary>
<section name="Install Apache Ant 1.5.x"/>
</primary>
<section name="Apache Ant 1.5.x のインストール">

<primary>
<p>
Download a binary distribution of Ant 1.5.x from 
<a href="http://ant.apache.org/bindownload.cgi">here</a>.
</p>
</primary>
<p>
Ant 1.5.x のバイナリ配布を
<a href="http://ant.apache.org/bindownload.cgi">ここ</a>から
ダウンロードして下さい。
</p>

<primary>
<p>
Unpack the binary distribution into a convenient location so that the
Ant release resides in its own directory (conventionally named
"jakarta-ant-1.5.1").  For the purposes of the remainder of this document,
the symbolic name "${ant.home}" is used to refer to the full pathname of
 the release directory.
</p>
</primary>
<p>
独自のディレクトリ (通常は "jakarta-ant-1.5.1" といった名前になります) に
Ant が置かれるように、バイナリ配布を適当な場所に解凍して下さい。
"${ant.home}"という表記がこのドキュメントのこれ以降で出てきた場合、
Antをインストールしたディレクトリのフルパスを意味します。
</p>

<primary>
<p>
Create an ANT_HOME environment variable to point the directory ${ant.home}, 
and modify the PATH environment variable to include directory
"${ant.home}/bin" in its list.  This makes the "ant" command line script
available, which will be used to actually perform the build.
</p>
</primary>
<p>
${ant.home} を指すように環境変数 ANT_HOME を作成し、
環境変数 PATH 内のリストに"${ant.home}/bin" を加えてください。
これにより、実際にビルドを実行する際に使用する "ant" コマンドラインスクリプトが使えるようになります。
</p>

</section>

<primary>
<section name="Building Tomcat"/>
</primary>
<section name="Tomcat のビルド">

<primary>
<p>
Download the main build.xml script from <a href="build.xml">here</a>.
</p>
</primary>
<p>
メインの build.xml スクリプトを
<a href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/build.xml">ここ</a> からダウンロードして下さい。
</p>

<primary>
<p>
Create a new directory, and copy the newly download build.xml to it. This
  directory will be referred to as the ${tomcat.source} directory in the rest
  of this document.
</p>
</primary>
<p>
新しいディレクトリを作成し、ダウンロードした build.xml をそこにコピーして下さい。
以降、このディレクトリを ${tomcat.source} ディレクトリとします。
</p>

<primary>
<p>
Go to that directory, and do:
<code><br/>
    cd ${tomcat.source}<br/>
    ant<br/>
</code>
</p>
</primary>
<p>
このディレクトリに移動し、以下のコマンドを入力します。
<code><br/>
    cd ${tomcat.source}<br/>
    ant<br/>
</code>
</p>

<primary>
<p>
NOTE: Users accessing the Internet through a proxy must use a properties
  file to indicate to Ant the proxy configuration. Read below.
</p>
</primary>
<p>
注意: プロキシ経由でインターネットにアクセスする場合、
プロキシの設定を Ant に指示するプロパティファイルを使わなければなりません。
詳しくは以下をお読みください。
</p>

<primary>
<p>
WARNING: Running this command will checkout the Tomcat 5 sources from CVS, as
  well as download binaries to the <code>/usr/share/java</code> directory. 
  Make sure this is appropriate to do so on your computer. On Windows, 
  this usually corresponds to the <code>C:\usr\share\java</code> directory, 
  unless Cygwin is used. Read below to customize the directory used 
  to download the binaries.
</p>
</primary>
<p>
警告: このコマンドを実行すると、Tomcat 5 のソースを CVS からチェックアウトするとともに、
<code>/usr/share/java</code> ディレクトリにバイナリをダウンロードします。
自分のコンピュータでそうすることが適切かどうかご確認下さい。
Cygwin を使っていない限り Windows では、このディレクトリは通常
<code>C:\usr\share\java</code> ディレクトリに該当します。
バイナリをダウンロードするのに使うディレクトリをカスタマイズする方法については以下をお読みください。
</p>

<primary>
<p>
The build can be controlled by creating a ${tomcat.source}/build.properties
  file, and adding the following content to it:
<code><br/>
    # ----- Proxy setup -----<br/>
    # Uncomment if using a proxy server.<br/>
    #proxy.host=proxy.domain<br/>
    #proxy.port=8080<br/>
    #proxy.use=on<br/>
<br/>
    # ----- Default Base Path for Dependent Packages -----<br/>
    # Replace this path with the directory path where<br/>
    # dependencies binaries should be downloaded.<br/>
    base.path=/usr/share/java<br/>
</code>
</p>
</primary>
<p>
${tomcat.source}/build.properties ファイルを作成し、
以下の内容をファイルに追加することでビルドを制御できます。
<code><br/>
    # ----- プロキシセットアップ -----<br/>
    # プロキシサーバを使う時はコメントを外して下さい。<br/>
    #proxy.host=proxy.domain<br/>
    #proxy.port=8080<br/>
    #proxy.use=on<br/>
<br/>
    # ----- 依存パッケージのデフォルトのベースパス -----<br/>
    # 依存するバイナリをダウンロードした場所に<br/>
    # このパスを書き換えて下さい<br/>
    base.path=/usr/share/java<br/>
</code>
</p>

</section>

<primary>
<section name="Updating and rebuilding Tomcat sources"/>
</primary>
<section name="Tomcat のソース更新と再ビルド">

<primary>
<p>
It is recommended to regularly update the downloaded Tomcat 5 sources. 
To do this, execute the following commands:

<code><br/>
    cd ${tomcat.source}<br/>
    ant checkout<br/>
</code>
</p>
</primary>
<p>
一旦ダウンロードした Tomcat 5 のソースは定期的に更新することをお勧めします。
これを行うには、以下のコマンドを実行します。

<code><br/>
    cd ${tomcat.source}<br/>
    ant checkout<br/>
</code>
</p>

<primary>
<p>
For a quick rebuild of only modified code you can use:
<code><br/>
    cd ${tomcat.source}<br/>
    ant build<br/>
</code>

</p>
</primary>
<p>
修正されたコードのみをすばやく再ビルドするには以下のコマンドを使います。
<code><br/>
    cd ${tomcat.source}<br/>
    ant build<br/>
</code>

</p>

</section>

</body>
</document>
