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

<project name="yanel" default="deploy">
<!--
<project name="yanel" default="war">
-->

  <target name="init" description="Initialize all parameters and other settings">
    <property file="local.build.properties"/>
    <property file="build.properties"/>

    <dirname property="build.src.dir" file="${ant.file}"/>
    <dirname property="src.dir" file="${build.src.dir}"/>
    <dirname property="yanel.home.dir" file="${src.dir}"/>

    <property name="build.dir" value="${yanel.home.dir}/build"/>
    <property name="classes.dir" value="${build.dir}/classes"/>

    <path id="classpath">
      <fileset dir="${yanel.home.dir}/lib">
        <include name="*.jar"/>
      </fileset>
    </path>
  </target>

  <target name="compile-core" description="Compile Java classes of Yanel core" depends="init">
<!--
    <echo>${classes.dir}</echo>
-->
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="${yanel.home.dir}/src/java/org/wyona/yanel/core" destdir="${classes.dir}"
      debug="true"
    />
    <mkdir dir="${yanel.home.dir}/build/lib"/>
    <jar destfile="${yanel.home.dir}/build/lib/yanel-core-0.0.1-dev-r${yanel.revision}.jar"
      basedir="${classes.dir}"
      includes="org/wyona/yanel/core/**"/>
  </target>

  <target name="compile-webapp" description="Compile Java classes of Yanel webapp" depends="init, compile-core">
<!--
    <echo>${classes.dir}</echo>
-->
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="${yanel.home.dir}/src/java/org/wyona/yanel/servlet" destdir="${classes.dir}"
      debug="true"
      classpathref="classpath"
    />
    <mkdir dir="${yanel.home.dir}/build/lib"/>
    <jar destfile="${yanel.home.dir}/build/lib/yanel-webapp-0.0.1-dev-r${yanel.revision}.jar"
      basedir="${classes.dir}"
      includes="org/wyona/yanel/servlet/**"/>
  </target>

  <target name="webapp" description="Build webapp" depends="init, compile-webapp">
    <mkdir dir="${build.dir}/webapps/yanel"/>
    <copy todir="${build.dir}/webapps/yanel">
      <fileset dir="${yanel.home.dir}/src/webapp"/>
    </copy>

    <copy todir="${build.dir}/webapps/yanel/WEB-INF/lib">
      <fileset dir="${yanel.home.dir}/build/lib"/>
    </copy>
<!--
    <copy todir="${build.dir}/webapps/yanel/WEB-INF/classes">
      <fileset dir="${yanel.home.dir}/build/classes"/><commit_msg>compile command line added<commit_after><?xml version="1.0"?>

<project name="yanel" default="deploy">
<!--
<project name="yanel" default="war">
-->

  <target name="init" description="Initialize all parameters and other settings">
    <property file="local.build.properties"/>
    <property file="build.properties"/>

    <dirname property="build.src.dir" file="${ant.file}"/>
    <dirname property="src.dir" file="${build.src.dir}"/>
    <dirname property="yanel.home.dir" file="${src.dir}"/>

    <property name="build.dir" value="${yanel.home.dir}/build"/>
    <property name="classes.dir" value="${build.dir}/classes"/>

    <path id="classpath">
      <fileset dir="${yanel.home.dir}/lib">
        <include name="*.jar"/>
      </fileset>
    </path>
  </target>

  <target name="compile-core" description="Compile Java classes of Yanel core" depends="init">
<!--
    <echo>${classes.dir}</echo>
-->
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="${yanel.home.dir}/src/java/org/wyona/yanel/core" destdir="${classes.dir}"
      debug="true"
    />
    <mkdir dir="${yanel.home.dir}/build/lib"/>
    <jar destfile="${yanel.home.dir}/build/lib/yanel-core-0.0.1-dev-r${yanel.revision}.jar"
      basedir="${classes.dir}"
      includes="org/wyona/yanel/core/**"/>
  </target>

  <target name="compile-cmdl" description="Compile Java classes of Yanel command line" depends="init">
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="${yanel.home.dir}/src/java/org/wyona/yanel/cmdl" destdir="${classes.dir}"
      debug="true"
    />
    <mkdir dir="${yanel.home.dir}/build/lib"/>
    <jar destfile="${yanel.home.dir}/build/lib/yanel-cmdl-0.0.1-dev-r${yanel.revision}.jar"
      basedir="${classes.dir}"
      includes="org/wyona/yanel/cmdl/**"/>
  </target>

  <target name="compile-webapp" description="Compile Java classes of Yanel webapp" depends="init, compile-core">
<!--
    <echo>${classes.dir}</echo>
-->
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="${yanel.home.dir}/src/java/org/wyona/yanel/servlet" destdir="${classes.dir}"
      debug="true"
      classpathref="classpath"
    />
    <mkdir dir="${yanel.home.dir}/build/lib"/>
    <jar destfile="${yanel.home.dir}/build/lib/yanel-webapp-0.0.1-dev-r${yanel.revision}.jar"
      basedir="${classes.dir}"
      includes="org/wyona/yanel/servlet/**"/>
  </target>

  <target name="webapp" description="Build webapp" depends="init, compile-webapp, compile-cmdl">
<!--
  <target name="webapp" description="Build webapp" depends="init, compile-webapp">
-->
    <mkdir dir="${build.dir}/webapps/yanel"/>
    <copy todir="${build.dir}/webapps/yanel">
      <fileset dir="${yanel.home.dir}/src/webapp"/>
    </copy>

    <copy todir="${build.dir}/webapps/yanel/WEB-INF/lib">
      <fileset dir="${yanel.home.dir}/build/lib"/>
    </copy>
<!--
    <copy todir="${build.dir}/webapps/yanel/WEB-INF/classes">
      <fileset dir="${yanel.home.dir}/build/classes"/>
{'fraction_non_alphanumeric': 0.2253950123738816, 'fraction_numerical': 0.003616980772891681, 'mean_word_length': 3.66607460035524, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 2, '>': 103, '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': '4184593', 'n_tokens_mistral': 1819, 'n_tokens_neox': 1785, 'n_words': 260}