<?xml version="1.0" encoding="Shift_JIS"?>

<document>

 <properties>
  <title>Velocity Installation</title>
  <author email="jvanzyl@locus.apache.org">Velocity Documentation Team</author>
  <translator>熊坂祐二</translator>
  <translator>高橋達男</translator>
  <translator>野瀬直樹</translator>
  <original>install</original>
 </properties>

<body>

<section name="Installation" alias="インストール">

<primary>
<p>
Velocity runs on a variety of platforms that have installed the Java 2
Virtual Machine. The J2SDK is required for users who want to compile
Velocity from its source code.
</p>
</primary>
<p>
Velocity は、Java 2 VM がインストールしてあるさまざまなプラットホームで実行できます。
ソースコードから Velocity をコンパイルしたい場合には、J2SDK が必要です。
</p>

<primary>
<p>
Everything required to build Velocity comes with the distribution, which
can be obtained from <a
href="http://jakarta.apache.org/getinvolved/cvsindex.html">CVS</a> or
from the <a
href="http://jakarta.apache.org/builds/jakarta-velocity/nightly/">nightly
builds</a>.  However, you will need to install Ant, an excellent
Java-based build tool.  Ant is also a Jakarta project, and can be
found <a href="http://jakarta.apache.org/ant/">here</a>.
</p>
</primary>
<p>
Velocity をビルドするのに必要なものはすべて、
<a
href="http://jakarta.apache.org/getinvolved/cvsindex.html">CVS</a> または
<a
href="http://cvs.apache.org/builds/jakarta-velocity/nightly/">夜間ビルド</a>から入手できる
配布に含まれています。
また、優れた Java ベースのビルドツールである Ant をインストールする必要があります。
Ant もまた Jakarta プロジェクトで、
<a href="http://jakarta.apache.org/ant/">ここ</a>にあります。
<br/>
[訳注：現在、Ant は Apache のトップレベルプロジェクトとして、
Jakarta プロジェクトから独立しています。サイトも
<a href="http://ant.apache.org/">http://ant.apache.org/</a> に移動しました。]
</p>

<primary>
<p>
The directory tree of the distribution looks like :
</p>
</primary>
<p>
配布のディレクトリツリーは、以下のようになります
</p>

<primary>
<source><![CDATA[
jakarta-velocity
  /build        - contains build scripts
  /bin          - where the built jars / classes will go
  /src          - sourcecode for Velocity, Anakia, and Texen
  /docs         - documentation in HTML form
  /docs/api     - Javadocs for Velocity source
  /examples     - example/demonstration code
  /convert      - tools to help convert WebMacro templates
  /test         - test programs and templates
  /xdocs        - source for our documentation
]]></source>
</primary>
<source><![CDATA[
jakarta-velocity
  /build        - ビルドスクリプトが含まれる
  /bin          - 構築された jar や class が収まる場所
  /src          - Velocity, Anakia, Texen のソースコード
  /docs         - HTML 形式のドキュメント
  /docs/api     - Velocity のソースの Javadoc
  /examples     - サンプルとドキュメントのコード
  /convert      - WebMacro テンプレートからの変換ツール
  /test         - テストプログラムとテンプレート
  /xdocs        - ドキュメントのソース
]]></source>

</section>

<section name="Building" alias="ビルド">

<primary>
<p>
To make building Velocity easy and consistant, we require a Jakarta project
called <a href="http://jakarta.apache.org/ant/">Ant</a> version 1.3 or
higher to perform the build process. We assume that you have followed
Ant's installation instructions and have it properly installed.  It's not
difficult, and I think that you will find it an excellent addition to
your programmer's toolbox.
</p>
</primary>
<p>
Velocity を簡単に一貫性をもたせてビルドするには、Apache のプロジェクトである
<a href="http://ant.apache.org/">Ant</a> のバージョン 1.3 以降が必要です。
<br/>
[訳注：上の訳注のとおり、URLが変わっています。このリンクは変更済みです]
<br/>
Ant のインストール指示に従って正しくそれをインストールしていることを前提にします。
インストールも難しくありませんし、素晴らしいプログラミングツールだと思います。
</p>

<primary>
<p>
In each case below, it is assumed that you were successful in getting
the distribution from CVS or as a nightly build, and with the latter,
were successful in unpacking.  Also, it is assumed that you are starting
in the 'jakarta-velocity' directory, the root of the distribution tree. 
All directory references will be relative to 'jakarta-velocity'.
</p>
</primary>
<p>
以下の各手順では、あなたが CVS から、もしくは夜間ビルドとして配布の取得に
成功していて、夜間ビルドの場合は、解凍に成功していることを前提にしています。
そして、「jakarta-velocity」ディレクトリ(配布ツリーのルート)
で作業を行っていると仮定しています。
ディレクトリ参照はすべて「jakarta-velocity」の相対パスです。
</p>

<primary>
<p>
Change to the <filename>build</filename> directory (<code>cd
build</code>). Then, to build the jar file, simply type:
</p>
</primary>
<p>
<filename>build</filename> ディレクトリに移動してください (<code>cd build</code>)。
それから、jarファイルをビルドするには、単に以下のようにタイプしてください。
</p>

<source><![CDATA[
ant
]]></source>

<primary>
<p>
Executing this script will create a <filename>bin</filename> directory
within the Velocity distribution directory. The <filename>bin</filename>
directory will contain the compiled class files (inside a
<filename>classes</filename> directory) as well as a
<filename>velocity-XX.jar</filename> file, where XX is the current
version number. Be sure to update your classpath to include Velocity's
<filename>.jar</filename> file.
</p>
</primary>
<p>
このスクリプトを実行すると、Velocity 配布ディレクトリの中に
<filename>bin</filename> ディレクトリが作成されます。
<filename>bin</filename> ディレクトリにはコンパイルされたクラスファイル
(<filename>classes</filename> ディレクトリ内にあります) と
 <filename>velocity-XX.jar</filename> ファイル (XX は現在のバージョン番号)
が入っています。クラスパスを Velocity の <filename>.jar</filename> ファイル
を含めて更新したことを確認してください。
</p>

<primary>
<p>
Note that to build any of the specific build targets, as detailed in
the <a href="developer-guide.html">developers guide</a>, simply add
the target name to the command line.  For example, to build the Javadoc
API documentation :
</p>
</primary>
<p>
ビルドターゲット (<a href="developer-guide.html">開発者ガイド</a>で詳述) の
いずれかをビルドするには、コマンドラインでターゲット名を加えるだけです。
例えば、Javadoc API ドキュメトをビルドするには以下のようにします。
</p>
<source><![CDATA[
ant javadocs
]]></source>

<primary>
<p>
Velocity should build 'out of the box', independent of your classpath.
If you get an error building Velocity, try a different nightly build (as
sometimes we make a mistake and the CVS at the time of the nightly
snapshot isn't complete) or refresh from CVS (you might have gotten a
CVS snapshot while a developer was checking things in.)
</p>
</primary>
<p>
Velocity は、「独自に」、つまりクラスパスに依存せずにビルドすべきです。
Velocity のビルドでエラーが出た場合には、別の夜間ビルドを試してみるか
(時にはミスがあって、夜間スナップショットの時点で必要なものが CVS にそろってない
こともあります)、CVSから再取得してください
(開発者によるチェックイン中にCVS スナップショットを取得したのかもしれません)。
</p>

<primary>
<p>
If the problems persist, do not hesitate to ask the Velocity community
via our mail lists. They can be found <a
href="http://jakarta.apache.org/site/mail.html">here</a>. Please read
and understand the the guidelines for participating in any Jakarta mail
list.
</p>
</primary>
<p>
問題がずっと解決しないようでしたら、迷わず、メーリングリストを通して Velocity 
コミュニティで質問してください。
メーリングリストについては<a href="http://jakarta.apache.org/site/mail.html">ここ</a>
で情報を得られます。Jakarta メーリングリストに参加するためのガイドラインを
読んで理解してください。
</p>
</section>

<section name="Testing Your Installation" alias="インストール後のテスト">

<primary>
<p>
The Velocity developers use an automated test facility, and it is
included in the distribution. You can use it to make sure that all is
well with your build of Velocity.
</p>
</primary>
<p>
Velocity 開発者は自動テスト機能を使いますが、この機能は配布にも含まれています。
Velocity のビルドで全て問題ないことを確認するのに使うことができます。
</p>

<primary>
<p>
To run the test suite, simply use the build target
<filename>test</filename> when you build :
</p>
</primary>
<p>
テストスイートを実行するには、<filename>test</filename> というビルドターゲット
を使ってビルドします。
</p>


<source><![CDATA[
ant test
]]></source>

<primary>
<p>
If all is well, you should see output like :
</p>
</primary>
<p>
うまくいけば、出力はこうなります。
</p>

<source><![CDATA[
test:
Running JUnit template tests for Velocity ...
Adding TemplateTestCase : arithmetic
Adding TemplateTestCase : array
Adding TemplateTestCase : block
   .
   .
   .
Adding TemplateTestCase : math
Adding TemplateTestCase : range
Adding TemplateTestCase : get
Adding TemplateTestCase : velocimacro2
Adding TemplateTestCase : foreach-type
Adding ContextSafetyTestCase.
......................................
Time: 2.553

OK (38 tests)
]]></source>

<primary>
<p>
Note that the number of tests may vary from those shown above, but if
you see 'OK' after the tests are run, all is well.  Now it's time to use
Velocity.
</p>
</primary>
<p>
テスト数は上記と異なるかもしれませんが、
テストの実行後に 'OK' が表示されればすべて OK です。
これで Velocity を使うことができます。
</p>
</section>

</body>
</document>

