<commit_before><?xml version="1.0"?>

<document>

 <properties>
  <title>Velocity Installation</title>
  <author email="<EMAIL>">Velocity Documentation Team</author>
 </properties>

<body>

<section name="Installation">

<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>

<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>.
</p>

</section>

<section name="Compiling">

<p>
On Unix, <code>cd</code> to the <filename>velocity/build</filename> directory
and execute the following script:
</p>

<source><![CDATA[
./build-velocity.sh
]]></source>

<p>
On Windows, executing <code>build-velocity.bat</code>, found in the <filename>
velocity\build</filename> directory, will have the same effect.
</p>

<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.jar</filename> file. Be sure to
update your classpath to include Velocity's <filename>.jar</filename> file.
</p>

<p>
If you get a compiler error related to one or more packages that could not
be found, ensure the <filename>build-velocity</filename> script you are using is
edited to properly specify the paths to each of the packages that could not be
found.
</p>

</section>

<section name="Testing Your Installation">

<p>
There are testing scripts in the <filename>velocity/examples</filename>
directory.
</p>

</section>

</body>
</document>
<commit_msg>Expanded and added more on building and testing. PR: Obtained from: Submitted by: Reviewed by:<commit_after><?xml version="1.0"?>

<document>

 <properties>
  <title>Velocity Installation</title>
  <author email="<EMAIL>">Velocity Documentation Team</author>
 </properties>

<body>

<section name="Installation">

<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>

<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>.
</p>

<p>
The directory tree of the distribution looks like :
</p>

<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/apidocs - 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>

</section>

<section name="Building">

<p>
To make building Velocity easy and consistant, we have provided scripts to build 
Velocity for both Unix and Windows.  We use a Jakarta project called 
<a href='http://jakarta.apache.org/ant/'>Ant</a> to perform
the build process and provide Ant with the distribution,  so no 
external build utilities are required.
</p>

<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>

<p>
On Unix, change to the <filename>build</filename> directory (<code>cd build</code>).  Then, build the Velocity jar via the build-velocity.sh script :
</p>

<source><![CDATA[
./build-velocity.sh
]]></source>

<p>
On Windows,  change to the <filename>build</filename> directory (<code>cd build</code>).  Then, build the Velocity jar via the build-velocity.bat script :
</p>

<source><![CDATA[
build-velocity.bat 
]]></source>

<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>

<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>
<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>

</section>

<section name="Testing Your Installation">

<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>

<p>
To run the test suite, simply use the build target <filename>test</filename> when you build :
</p>
<source><![CDATA[
Unix : ./build-velocity.sh test

Windows : build-velocity.bat test
]]></source>

<p>
If all is well, you should see output like :
</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>

<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>
</section>

</body>
</document>

{'fraction_non_alphanumeric': 0.10980988593155894, 'fraction_numerical': 0.0022813688212927757, 'mean_word_length': 4.244019138755981, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 2, '>': 153, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '720478', 'n_tokens_mistral': 1977, 'n_tokens_neox': 1889, 'n_words': 813}