<commit_before><project name="reviki" default="war" basedir=".">
  <description>
    reviki build - see http://reviki.org for more information
  </description>
  <property name="version" value="0.2.0" />   
  <property name="source" value="src" />   
  <property name="web" value="WebContent" />   
  <property name="build-classes" value="ant-build/classes" />   
  <property name="build-web" value="ant-build/web" />   
  <property name="reports" value="reports" />   
  <property name="release" value="release" />   
  <property name="jar" value="${build-web}/WEB-INF/lib/reviki.jar"/>
  <property name="testJar" value="ant-build/reviki-test.jar"/>
  <property name="war" value="${release}/${ant.project.name}.war" />   
  <property name="prepopulated-pages" value="net/hillsdon/reviki/web/vcintegration/prepopulated/**"/>

  <property name="source-webtests" value="webtests" />   
  <property name="build-webtests" value="ant-build/webtests" />   
  <property name="tomcat" value="tomcat"/>
  <property name="tomcat.version" value="6.0.29"/>
  <property name="tomcat-url" value="http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip"/>
  <!-- For now, to run the functional tests you need to set up SVN and reviki.properties manually.
       The wiki should be called 'test' (with no base URL set).
       
       Note the wiki data will be stored in ./reviki-test-data, not the usual ~/reviki-data
       directory.

       An external properties file is used to retrieve the username and password to use.
       See the file "build.properties.example".
  -->
  <property file="build.properties" />

  <path id="classpath">
     <fileset dir="lib">
        <include name="*.jar" />
     </fileset>
     <fileset dir="${web}/WEB-INF/lib">
        <include name="*.jar" />
     </fileset>
  </path>    

  <target name="init">
     <mkdir dir="${build-classes}" />
     <mkdir dir="${build-web}" />
     <mkdir dir="${build-webtests}" />
     <mkdir dir="${reports}" />
     <mkdir dir="${release}" />
     <exec outputproperty="revision" executable="svnversion"/>
  	 <property name="build-details" value="${version} r${revision}" />
  </target>

  <target name="clean" description="Clean-up build artifacts">
    <delete dir="${build-classes}" />
    <delete dir="${build-web}" />
    <delete dir="${build-webtests}" />
    <delete dir="${reports}" />
    <delete dir="${release}" />
    <delete file="${war}"/>
    <delete dir="${tomcat}" />
    <!-- We leave the tomcat zip as it is a large download. -->
  </target>

  <target name="compile" depends="init">
    <javac srcdir="${source}" destdir="${build-classes}" fork="yes" target="1.5" debug="true">
      <compilerarg value="-Xlint:unchecked" />
      <classpath refid="classpath" />
    </javac>
    <copy todir="${build-web}">
      <fileset dir="${web}">
        <include name="*/**"/>
      </fileset>
    </copy>
    <replace file="${build-web}/WEB-INF/templates/SiteTemplate.jsp" token="$Version$" value="${build-details}"/>
    <copy todir="${build-classes}">
      <fileset dir="${source}">
        <include name="**/*.json"/>
        <include name="**/*.jar"/>
        <include name="**/*.xml"/>
        <include name="${prepopulated-pages}"/>
        <include name="net/hillsdon/reviki/web/taglib/reviki.tld"/>
      </fileset>
    </copy>
  </target>

  <target name="jar" depends="compile">
    <jar destfile="${jar}">
      <fileset dir="${build-classes}">
         <include name="**/*.class"/>
         <include name="${prepopulated-pages}"/>
      </fileset>
    </jar>
  </target>

  <target name="test-jar" depends="functional-tests-compile">
    <jar destfile="${testJar}">
      <fileset dir="${build-webtests}">
        <include name="**/*.class"/>
      </fileset>
    </jar>
  </target>

  <target name="functional-tests-compile" depends="compile">
    <javac srcdir="${source-webtests}" destdir="${build-webtests}" target="1.5" debug="true">
      <classpath>
        <path refid="classpath" />
        <pathelement location="${build-classes}"/>
      </classpath>
    </javac>
  </target>

  <target name="taglib-jar" depends="compile" description="Rebuild the JSP taglib JAR file">
    <mkdir dir="${build-classes}/META-INF"/>
    <move file="${build-classes}/net/hillsdon/reviki/web/taglib/reviki.tld" tofile="${build-classes}/META-INF/reviki.tld"/><commit_msg>Silence boring ant1.8 warning as per <http://stackoverflow.com/a/8114557> <commit_after><project name="reviki" default="war" basedir=".">
  <description>
    reviki build - see http://reviki.org for more information
  </description>

  <presetdef name="rjavac">
    <javac includeantruntime="false" />
  </presetdef>

  <property name="version" value="0.2.0" />   
  <property name="source" value="src" />   
  <property name="web" value="WebContent" />   
  <property name="build-classes" value="ant-build/classes" />   
  <property name="build-web" value="ant-build/web" />   
  <property name="reports" value="reports" />   
  <property name="release" value="release" />   
  <property name="jar" value="${build-web}/WEB-INF/lib/reviki.jar"/>
  <property name="testJar" value="ant-build/reviki-test.jar"/>
  <property name="war" value="${release}/${ant.project.name}.war" />   
  <property name="prepopulated-pages" value="net/hillsdon/reviki/web/vcintegration/prepopulated/**"/>

  <property name="source-webtests" value="webtests" />   
  <property name="build-webtests" value="ant-build/webtests" />   
  <property name="tomcat" value="tomcat"/>
  <property name="tomcat.version" value="6.0.29"/>
  <property name="tomcat-url" value="http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip"/>
  <!-- For now, to run the functional tests you need to set up SVN and reviki.properties manually.
       The wiki should be called 'test' (with no base URL set).
       
       Note the wiki data will be stored in ./reviki-test-data, not the usual ~/reviki-data
       directory.

       An external properties file is used to retrieve the username and password to use.
       See the file "build.properties.example".
  -->
  <property file="build.properties" />

  <path id="classpath">
     <fileset dir="lib">
        <include name="*.jar" />
     </fileset>
     <fileset dir="${web}/WEB-INF/lib">
        <include name="*.jar" />
     </fileset>
  </path>    

  <target name="init">
     <mkdir dir="${build-classes}" />
     <mkdir dir="${build-web}" />
     <mkdir dir="${build-webtests}" />
     <mkdir dir="${reports}" />
     <mkdir dir="${release}" />
     <exec outputproperty="revision" executable="svnversion"/>
  	 <property name="build-details" value="${version} r${revision}" />
  </target>

  <target name="clean" description="Clean-up build artifacts">
    <delete dir="${build-classes}" />
    <delete dir="${build-web}" />
    <delete dir="${build-webtests}" />
    <delete dir="${reports}" />
    <delete dir="${release}" />
    <delete file="${war}"/>
    <delete dir="${tomcat}" />
    <!-- We leave the tomcat zip as it is a large download. -->
  </target>

  <target name="compile" depends="init">
    <rjavac srcdir="${source}" destdir="${build-classes}" fork="yes" target="1.5" debug="true">
      <compilerarg value="-Xlint:unchecked" />
      <classpath refid="classpath" />
    </rjavac>
    <copy todir="${build-web}">
      <fileset dir="${web}">
        <include name="*/**"/>
      </fileset>
    </copy>
    <replace file="${build-web}/WEB-INF/templates/SiteTemplate.jsp" token="$Version$" value="${build-details}"/>
    <copy todir="${build-classes}">
      <fileset dir="${source}">
        <include name="**/*.json"/>
        <include name="**/*.jar"/>
        <include name="**/*.xml"/>
        <include name="${prepopulated-pages}"/>
        <include name="net/hillsdon/reviki/web/taglib/reviki.tld"/>
      </fileset>
    </copy>
  </target>

  <target name="jar" depends="compile">
    <jar destfile="${jar}">
      <fileset dir="${build-classes}">
         <include name="**/*.class"/>
         <include name="${prepopulated-pages}"/>
      </fileset>
    </jar>
  </target>

  <target name="test-jar" depends="functional-tests-compile">
    <jar destfile="${testJar}">
      <fileset dir="${build-webtests}">
        <include name="**/*.class"/>
      </fileset>
    </jar>
  </target>

  <target name="functional-tests-compile" depends="compile">
    <rjavac srcdir="${source-webtests}" destdir="${build-webtests}" target="1.5" debug="true">
      <classpath>
        <path refid="classpath" />
        <pathelement location="${build-classes}"/>
      </classpath>
    </rjavac>
  </target>

  <target name="taglib-jar" depends="compile" description="Rebuild the JSP taglib JAR file">
    <mkdir dir="${build-classes}/META-INF"/>
    <move file="${build-classes}/net/hillsdon/reviki/web/taglib/reviki.tld" tofile="${build-classes}/META-INF/reviki.tld"/>
{'fraction_non_alphanumeric': 0.20300668151447662, 'fraction_numerical': 0.0036748329621380848, 'mean_word_length': 3.2848282442748094, 'pattern_counts': {'":': 0, '<': 197, '<?xml version=': 0, '>': 197, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5720277', 'n_tokens_mistral': 2927, 'n_tokens_neox': 2861, 'n_words': 581}