<commit_before><!-- $Id: build.xml 333 2006-04-24 12:11:53Z apr $ -->
<project name="jPOS-EE" default="compile" basedir=".">
    <!-- Give user a chance to override without editing this file -->
    <property file="${user.home}/.ant.properties"/>
    <property file="custom.properties"/>
    <!-- And then our defaults -->
    <property file="build.properties"/>

    <property name="archive" value="${name}-${version}" />

    <property name="bin.dir" value="bin"/>
    <property name="build.src" value="${build.dir}/src"/>
    <property name="build.doc" value="${build.dir}/doc"/>
    <property name="build.lib" value="${build.dir}/lib"/>
    <property name="build.bin" value="${build.dir}/bin"/>
    <property name="build.test" value="${build.dir}/test"/>
    <property name="build.modules" value="${build.dir}/modules"/>
    <property name="build.webapps" value="${build.dir}/webapps"/>
    <property name="build.deploy" value="${build.dir}/deploy"/>
    <property name="build.deploy.lib" value="${build.deploy}/lib"/>
    <property name="build.log"    value="${build.dir}/log"/>
    <property name="build.javadoc" value="${build.dir}/javadoc"/>
    <property name="modules.ignore.list" value="${modules.dir}/ignore.list" />
    <property name="classes.dir" value="${build.dir}/classes"/>
    <property name="test-classes.dir" value="${build.dir}/test-classes"/>
    <property name="deprecation" value="true"  />
    <property name="nowarn" value="true"  />
    <property name="debug" value="on"/>

    <patternset id="hbm.support.files">
        <include name="**/*.hbm.xml"/>
        <include name="**/*.cfg.xml"/>
        <include name="**/*.properties"/>
    </patternset>

    <path id="main.classpath">
        <fileset dir="${build.lib}">
            <include name="*.jar"/>
        </fileset>
        <pathelement location="${classes.dir}"/>
    </path>

    <target name="prepare">
      <tstamp>
        <format property="subversion" pattern="yyyy.MM.dd.hh.mm.ss"/>
      </tstamp>
      <echo 
       message="Build ${Name}-${version}.${subversion}"/>

      <touch file="modules/ignore.list" />
      <touch file="modules/include.list" />
      <mkdir dir="${bin.dir}"/>
      <mkdir dir="${build.dir}"/>
      <mkdir dir="${build.src}"/>
      <mkdir dir="${build.lib}"/>
      <mkdir dir="${build.bin}"/>
      <mkdir dir="${build.doc}"/>
      <mkdir dir="${build.cfg}"/>
      <mkdir dir="${build.modules}"/>
      <mkdir dir="${build.deploy}"/>
      <mkdir dir="${build.deploy.lib}"/>
      <mkdir dir="${build.webapps}/root"/>
      <mkdir dir="${classes.dir}"/>
      <mkdir dir="${dist.dir}" />
      <mkdir dir="${build.dir}/log"/>
    </target>

    <target name="jar" depends="modules, support, main"
        description="creates jpos-ee.jar">
      <jar jarfile="${build.dir}/${name}.jar" 
         basedir="${classes.dir}"
         manifest="${classes.dir}/MANIFEST.MF" 
	 includes="**" />
    </target>
    <target name="srcjar" depends="modules"
        description="creates jpos-src.jar for source browsing and debugging in IDEs">
      <jar jarfile="${build.dir}/${name}-src.jar" basedir="${build.src}" includes="**" />
    </target>
    <target name="singlejar" depends="unjar, jar"
     description="creates a single jpos-ee.jar including all supporting jars" />


    <target name="unjar" depends="modules, support, main">
      <unjar dest="${classes.dir}">
        <fileset dir="${build.lib}">
          <include name="**/*.jar"/>
         </fileset>
      </unjar>
    </target>

    <target name="clean" description="clean up build and dist directories">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
    </target>

    <target name="info" depends="manifest">
        <echo message="java.vm.info=${java.vm.info}"/>
        <echo message="java.vm.name=${java.vm.name}"/>
        <echo message="java.vm.vendor=${java.vm.vendor}"/>
        <echo message="java.vm.version=${java.vm.version}"/>
        <echo message="os.arch=${os.arch}"/>
        <echo message="os.name=${os.name}"/>
        <echo message="os.version=${os.version}"/>
        <echo message="java.home=${java.home}"/>
        <echo message="java.class.path=${java.class.path}"/>
        <echo message="file.encoding=${file.encoding}"/>
        <echo message="file.separator=${file.separator}"/>
        <echo message="user.home=${user.home}"/>
        <echo message="user.name=${user.name}"/>
        <echo message="user.language=${user.language}"/>
        <echo message="q2.classpath=${q2.classpath}"/>
        <echo message="filter.properties=${target}.properties" />
    </target>

    <target name="main" depends="prepare, copy-bin, manifest">
        <javac srcdir="${build.src}" destdir="${classes.dir}"
            debug="${debug}" nowarn="${nowarn}"
            deprecation="${deprecation}">
            <classpath refid="main.classpath"/>
        </javac>
    </target>

    <target name="compile" depends="modules, main, jar" 
        description="compile all" />

    <target name="modules" depends="prepare">
      <filter filtersfile="${target}.properties" />
      <copy todir="${build.modules}" flatten="false" filtering="false">
        <fileset dir="${modules.dir}" includesfile="${modules.include.list}" />
      </copy>
      <copy todir="${build.deploy}" flatten="true" filtering="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/deploy/*.xml"/>
          <include name="**/deploy/*.inc"/>
          <include name="**/deploy/*.ftl"/>
        </fileset>
      </copy>
      <copy todir="${build.lib}" flatten="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="*/lib/*.jar"/>
          <include name="*/lib/*.dll"/>
          <include name="*/lib/*.so"/>
          <include name="*/lib/*.ks"/>
          <include name="*/lib/*.jnilib"/>
        </fileset>
      </copy>
      <copy todir="${build.bin}" flatten="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="*/bin/*"/>
        </fileset>
      </copy>
      <copy todir="${build.deploy.lib}" flatten="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/deploy/lib/*.jar"/>
        </fileset>
      </copy>
      <copy todir="${build.dir}" filtering="true">
        <mapper type="regexp" from="^\w*[/|\\](.*)" to="\1" />
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/*.java"/>
          <include name="**/*.xml"/>
          <include name="**/*.properties"/>
          <include name="**/*.cfg"/>
          <include name="**/cfg/**"/>
          <exclude name="**/cfg/_*" />
        </fileset>
      </copy>
      <chmod perm="ug+x">
        <fileset dir="${build.cfg}">
         <include name="*.sh" />
        </fileset>
      </chmod>
      <copy todir="${build.webapps}" flatten="false">
        <mapper type="regexp" from="^\w*[/|\\]\w*[/|\\](.*)" to="\1" />
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/webapps/**"/>
        </fileset>
      </copy>
      <antcall target="support" />
      <subant target="prepare">
        <fileset dir="${modules.dir}" excludesfile="${modules.ignore.list}">
          <include name="**/build.xml"/>
        </fileset>
      </subant>
      <subant>
        <fileset dir="${modules.dir}" excludesfile="${modules.ignore.list}">
          <include name="**/build.xml"/>
        </fileset>
      </subant>
    </target>

    <target name="setup">
      <subant target="setup">
        <fileset dir="${modules.dir}" excludesfile="${modules.ignore.list}">
          <include name="**/build.xml"/>
        </fileset>
      </subant><commit_msg>Call modules/*/build.xml before copying files to build and filtering<commit_after><!-- $Id: build.xml 333 2006-04-24 12:11:53Z apr $ -->
<project name="jPOS-EE" default="compile" basedir=".">
    <!-- Give user a chance to override without editing this file -->
    <property file="${user.home}/.ant.properties"/>
    <property file="custom.properties"/>
    <!-- And then our defaults -->
    <property file="build.properties"/>

    <property name="archive" value="${name}-${version}" />

    <property name="bin.dir" value="bin"/>
    <property name="build.src" value="${build.dir}/src"/>
    <property name="build.doc" value="${build.dir}/doc"/>
    <property name="build.lib" value="${build.dir}/lib"/>
    <property name="build.bin" value="${build.dir}/bin"/>
    <property name="build.test" value="${build.dir}/test"/>
    <property name="build.modules" value="${build.dir}/modules"/>
    <property name="build.webapps" value="${build.dir}/webapps"/>
    <property name="build.deploy" value="${build.dir}/deploy"/>
    <property name="build.deploy.lib" value="${build.deploy}/lib"/>
    <property name="build.log"    value="${build.dir}/log"/>
    <property name="build.javadoc" value="${build.dir}/javadoc"/>
    <property name="modules.ignore.list" value="${modules.dir}/ignore.list" />
    <property name="classes.dir" value="${build.dir}/classes"/>
    <property name="test-classes.dir" value="${build.dir}/test-classes"/>
    <property name="deprecation" value="true"  />
    <property name="nowarn" value="true"  />
    <property name="debug" value="on"/>

    <patternset id="hbm.support.files">
        <include name="**/*.hbm.xml"/>
        <include name="**/*.cfg.xml"/>
        <include name="**/*.properties"/>
    </patternset>

    <path id="main.classpath">
        <fileset dir="${build.lib}">
            <include name="*.jar"/>
        </fileset>
        <pathelement location="${classes.dir}"/>
    </path>

    <target name="prepare">
      <tstamp>
        <format property="subversion" pattern="yyyy.MM.dd.hh.mm.ss"/>
      </tstamp>
      <echo 
       message="Build ${Name}-${version}.${subversion}"/>

      <touch file="modules/ignore.list" />
      <touch file="modules/include.list" />
      <mkdir dir="${bin.dir}"/>
      <mkdir dir="${build.dir}"/>
      <mkdir dir="${build.src}"/>
      <mkdir dir="${build.lib}"/>
      <mkdir dir="${build.bin}"/>
      <mkdir dir="${build.doc}"/>
      <mkdir dir="${build.cfg}"/>
      <mkdir dir="${build.modules}"/>
      <mkdir dir="${build.deploy}"/>
      <mkdir dir="${build.deploy.lib}"/>
      <mkdir dir="${build.webapps}/root"/>
      <mkdir dir="${classes.dir}"/>
      <mkdir dir="${dist.dir}" />
      <mkdir dir="${build.dir}/log"/>
    </target>

    <target name="jar" depends="modules, support, main"
        description="creates jpos-ee.jar">
      <jar jarfile="${build.dir}/${name}.jar" 
         basedir="${classes.dir}"
         manifest="${classes.dir}/MANIFEST.MF" 
	 includes="**" />
    </target>
    <target name="srcjar" depends="modules"
        description="creates jpos-src.jar for source browsing and debugging in IDEs">
      <jar jarfile="${build.dir}/${name}-src.jar" basedir="${build.src}" includes="**" />
    </target>
    <target name="singlejar" depends="unjar, jar"
     description="creates a single jpos-ee.jar including all supporting jars" />


    <target name="unjar" depends="modules, support, main">
      <unjar dest="${classes.dir}">
        <fileset dir="${build.lib}">
          <include name="**/*.jar"/>
         </fileset>
      </unjar>
    </target>

    <target name="clean" description="clean up build and dist directories">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
    </target>

    <target name="info" depends="manifest">
        <echo message="java.vm.info=${java.vm.info}"/>
        <echo message="java.vm.name=${java.vm.name}"/>
        <echo message="java.vm.vendor=${java.vm.vendor}"/>
        <echo message="java.vm.version=${java.vm.version}"/>
        <echo message="os.arch=${os.arch}"/>
        <echo message="os.name=${os.name}"/>
        <echo message="os.version=${os.version}"/>
        <echo message="java.home=${java.home}"/>
        <echo message="java.class.path=${java.class.path}"/>
        <echo message="file.encoding=${file.encoding}"/>
        <echo message="file.separator=${file.separator}"/>
        <echo message="user.home=${user.home}"/>
        <echo message="user.name=${user.name}"/>
        <echo message="user.language=${user.language}"/>
        <echo message="q2.classpath=${q2.classpath}"/>
        <echo message="filter.properties=${target}.properties" />
    </target>

    <target name="main" depends="prepare, copy-bin, manifest">
        <javac srcdir="${build.src}" destdir="${classes.dir}"
            debug="${debug}" nowarn="${nowarn}"
            deprecation="${deprecation}">
            <classpath refid="main.classpath"/>
        </javac>
    </target>

    <target name="compile" depends="modules, main, jar" 
        description="compile all" />

    <target name="modules" depends="prepare">
      <filter filtersfile="${target}.properties" />
      <antcall target="support" />
      <subant target="prepare">
        <fileset dir="${modules.dir}" excludesfile="${modules.ignore.list}">
          <include name="**/build.xml"/>
        </fileset>
      </subant>
      <copy todir="${build.modules}" flatten="false" filtering="false">
        <fileset dir="${modules.dir}" includesfile="${modules.include.list}" />
      </copy>
      <copy todir="${build.deploy}" flatten="true" filtering="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/deploy/*.xml"/>
          <include name="**/deploy/*.inc"/>
          <include name="**/deploy/*.ftl"/>
        </fileset>
      </copy>
      <copy todir="${build.lib}" flatten="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="*/lib/*.jar"/>
          <include name="*/lib/*.dll"/>
          <include name="*/lib/*.so"/>
          <include name="*/lib/*.ks"/>
          <include name="*/lib/*.jnilib"/>
        </fileset>
      </copy>
      <copy todir="${build.bin}" flatten="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="*/bin/*"/>
        </fileset>
      </copy>
      <copy todir="${build.deploy.lib}" flatten="true">
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/deploy/lib/*.jar"/>
        </fileset>
      </copy>
      <copy todir="${build.dir}" filtering="true">
        <mapper type="regexp" from="^\w*[/|\\](.*)" to="\1" />
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/*.java"/>
          <include name="**/*.xml"/>
          <include name="**/*.properties"/>
          <include name="**/*.cfg"/>
          <include name="**/cfg/**"/>
          <exclude name="**/cfg/_*" />
        </fileset>
      </copy>
      <chmod perm="ug+x">
        <fileset dir="${build.cfg}">
         <include name="*.sh" />
        </fileset>
      </chmod>
      <subant>
        <fileset dir="${modules.dir}" excludesfile="${modules.ignore.list}">
          <include name="**/build.xml"/>
        </fileset>
      </subant>
      <copy todir="${build.webapps}" flatten="false">
        <mapper type="regexp" from="^\w*[/|\\]\w*[/|\\](.*)" to="\1" />
        <fileset dir="${build.modules}" excludesfile="${modules.ignore.list}">
          <include name="**/webapps/**"/>
        </fileset>
      </copy>
    </target>

    <target name="setup">
      <subant target="setup">
        <fileset dir="${modules.dir}" excludesfile="${modules.ignore.list}">
          <include name="**/build.xml"/>
        </fileset>
      </subant>
{'fraction_non_alphanumeric': 0.22608695652173913, 'fraction_numerical': 0.0026658203744842905, 'mean_word_length': 2.740740740740741, 'pattern_counts': {'":': 0, '<': 347, '<?xml version=': 0, '>': 347, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 17}, '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': '3537339', 'n_tokens_mistral': 4893, 'n_tokens_neox': 4730, 'n_words': 847}