<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="OpenCms" default="compile" basedir=".">

    <property environment="env"/>

    <!-- The version-number ${version.number} is automatically set to the
    current date and time. For official builds this should be set to a proper
    value at the commandline.
    Set it like this: ant all -Dversion.number=4.3.28 -->

    <property name="version.name"               value="Ecaz"/>
    <property name="app.name"                   value="opencms"/>
    <property name="zip.home"                   value="../zip"/>
    <property name="pdf.home"                   value="../pdf"/>
    <property name="build.home"                 value="./build"/>
    
    <property name="build.classes"              value="${build.home}/classes"/>
    <property name="build.inputlib"             value="../ExternalComponents"/>
    <property name="build.web"                  value="${build.home}/${app.name}"/>
    <property name="build.webinf"               value="${build.web}/WEB-INF"/>
    <property name="build.metainf"              value="${build.web}/META-INF"/>
    <property name="build.lib"                  value="${build.webinf}/lib"/>
    <property name="build.excludes"             value=""/>

    <property name="build.inputlib.servlet"     value="${build.inputlib}/servlet.jar"/>
    <property name="build.inputlib.activation"  value="${build.inputlib}/activation.jar"/>
    <property name="build.inputlib.mail"        value="${build.inputlib}/mail.jar"/>
    <property name="build.inputlib.xerces"      value="${build.inputlib}/xerces-1_4_4.jar"/>
    <property name="build.inputlib.mysql"       value="${build.inputlib}/mm.mysql-2.0.4-bin.jar"/>
    <property name="build.inputlib.fesi"        value="${build.inputlib}/fesi.jar"/>            
    <property name="build.inputlib.oracle"      value="${build.inputlib}/classes12.zip"/>
    <property name="build.inputlib.fop"         value="${build.inputlib}/fop_bin.jar"/>     
    <property name="build.inputlib.oro"         value="${build.inputlib}/jakarta-oro-2.0.6.jar"/>
    <property name="build.inputlib.tidy"        value="${build.inputlib}/Tidy.jar"/>
    
    <property name="build.version.propertyfile" value="${build.classes}/com/opencms/core/version.properties"/>
    <property name="build.version.jsfile"       value="${build.webinf}/ocsetup/vfs/system/workplace/templates/js/version.js"/>
    <property name="build.version.setupfile"    value="${build.web}/ocsetup/versions.txt"/>
    
    <property name="db.url"                     value="jdbc:mysql://localhost:3306/opencms"/>
    <property name="db.setupurl"                value="jdbc:mysql://localhost:3306/mysql"/>
    <property name="db.user"                    value="root"/>
    <property name="db.password"                value=""/>
    <property name="db.driver"                  value="org.gjt.mm.mysql.Driver"/>


    <target name="init" description="Checks if all needed libaries are available">
        <condition property="libsAvailable">
            <and>
                <available file="${build.inputlib.servlet}"/>
                <available file="${build.inputlib.activation}"/>
                <available file="${build.inputlib.mail}"/>
                <available file="${build.inputlib.xerces}"/>
                <available file="${build.inputlib.mysql}"/>
                <available file="${build.inputlib.fesi}"/>
                <available file="${build.inputlib.oro}"/>
                <available file="${build.inputlib.tidy}"/>
            </and>
        </condition>
        
        <property name="ex.oracle"      value="com/opencms/file/oracleplsql/**"/>
        <property name="ex.pdflaunch"   value="com/opencms/launcher/CmsPdfLauncher.java"/>
                
        <condition property="build.excludes" value="${build.excludes},${ex.oracle}">
            <not><available file="${build.inputlib.oracle}"/></not>
        </condition>        
        
        <condition property="build.excludes" value="${build.excludes},${ex.pdflaunch}">
            <not><available file="${build.inputlib.fop}"/></not>
        </condition>        
        
        <condition property="tomcat.home" value="${env.TOMCAT_HOME}">
            <available file="${env.TOMCAT_HOME}" type="dir"/>
        </condition>
        
        <condition property="tomcat.home" value="${env.CATALINA_HOME}">
            <available file="${env.CATALINA_HOME}" type="dir"/>
        </condition>
    </target>
    
    
    <target name="initmsg" depends="init" unless="libsAvailable" description="Stop target if required libaries are missing">
        <fail>
        
Error: Some of the required libaries are not available.

To comile OpenCms, you need the following libaries:
${build.inputlib.servlet}
${build.inputlib.activation}
${build.inputlib.mail}
${build.inputlib.xerces}
${build.inputlib.mysql}
${build.inputlib.fesi}
${build.inputlib.oro}
${build.inputlib.tidy}

        </fail>
    </target>


    <target name="prepare" depends="initmsg" description="Create output directories">
        <mkdir dir="${build.classes}"/>
        <mkdir dir="${build.home}"/>
        <mkdir dir="${build.lib}"/>
        <mkdir dir="${zip.home}"/>
        <mkdir dir="${pdf.home}"/>        
    </target>


    <target name="clean" description="Delete existing ouput directories">
        <delete dir="${build.home}"/>
    </target>


    <target name="compileclasses" depends="prepare" if="libsAvailable" description="Compiles all OpenCms classes">
       <javac
            srcdir="src"
            destdir="${build.classes}"
            excludes="${build.excludes}"
            classpath=" ${build.inputlib.servlet}:
                        ${build.inputlib.activation}:
                        ${build.inputlib.mail}:
                        ${build.inputlib.xerces}:
                        ${build.inputlib.oracle}:
                        ${build.inputlib.mysql}:
                        ${build.inputlib.fop}:
                        ${build.inputlib.oro}:
                        ${build.inputlib.tidy}:
                        ${build.inputlib.fesi}"
            debug="on"
            optimize="on"
            deprecation="off"
            />

       <copy todir="${build.classes}">
            <fileset dir="src" includes="**/*.properties,**/*.txt"/>
       </copy>
       <!-- generate version infos-->
        <tstamp>
            <format property="timestamp" pattern="yyyy-MM-dd-HH-mm"/>
        </tstamp>
        <property name="version.number" value="${env.USERNAME}_${timestamp}"/>
        <echo file="${build.version.propertyfile}">version.number=${version.number}
</echo>
        <echo file="${build.version.propertyfile}" append="on">version.name=${version.name}</echo>
    </target>
    

    <target name="jar" depends="compileclasses" description="Generate OpenCms JARs">
        <jar
            jarfile="${build.lib}/opencmsboot.jar"
            basedir="${build.classes}"
            includes="com/opencms/boot/**,source/**"
            manifest="${build.classes}/mainClass.txt"
            />

        <jar
            jarfile="${build.lib}/opencms.jar"
            basedir="${build.classes}"
            includes="com/opencms/**"
            excludes="com/opencms/build/**"
            />
    </target>


    <target name="copy" depends="jar" description="Creates WAR file structure and copies needed files to it">
       <copy todir="${build.home}">
            <fileset dir="." includes="*.*" excludes="build.xml"/>
       </copy>

       <copy file="${build.inputlib.xerces}" todir="${build.lib}"/>
       <copy file="${build.inputlib.mysql}" todir="${build.lib}"/>
       <copy file="${build.inputlib.activation}" todir="${build.lib}"/>
       <copy file="${build.inputlib.mail}" todir="${build.lib}"/>
       <copy file="${build.inputlib.fesi}" todir="${build.lib}"/>
       <copy file="${build.inputlib.oro}" todir="${build.lib}"/>
       <copy file="${build.inputlib.tidy}" todir="${build.lib}"/>

       <copy todir="${build.webinf}">
            <fileset dir="etc" excludes="*/CVS/*,MANIFEST.MF"/>
       </copy>

       <copy file="etc/MANIFEST.MF" todir="${build.metainf}"/>

       <copy todir="${build.web}">
            <fileset dir="web" excludes="*/CVS/*"/>
       </copy>

       <!-- create version-info for the workplace-->
       <echo file="${build.version.jsfile}">var version = '${version.number} ${version.name}';</echo>
       <!-- create version-info for the setup versions.txt -->
       <echo file="${build.version.setupfile}" append="on">OpenCms ${version.number}
</echo><commit_msg>Removed generation of opencmsboot.jar<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="OpenCms" default="compile" basedir=".">

    <property environment="env"/>

    <!-- The version-number ${version.number} is automatically set to the
    current date and time. For official builds this should be set to a proper
    value at the commandline.
    Set it like this: ant all -Dversion.number=4.3.28 -->

    <property name="version.name"               value="Ecaz"/>
    <property name="app.name"                   value="opencms"/>
    <property name="zip.home"                   value="../zip"/>
    <property name="pdf.home"                   value="../pdf"/>
    <property name="build.home"                 value="./build"/>
    
    <property name="build.classes"              value="${build.home}/classes"/>
    <property name="build.inputlib"             value="../ExternalComponents"/>
    <property name="build.web"                  value="${build.home}/${app.name}"/>
    <property name="build.webinf"               value="${build.web}/WEB-INF"/>
    <property name="build.metainf"              value="${build.web}/META-INF"/>
    <property name="build.lib"                  value="${build.webinf}/lib"/>
    <property name="build.excludes"             value=""/>

    <property name="build.inputlib.servlet"     value="${build.inputlib}/servlet.jar"/>
    <property name="build.inputlib.activation"  value="${build.inputlib}/activation.jar"/>
    <property name="build.inputlib.mail"        value="${build.inputlib}/mail.jar"/>
    <property name="build.inputlib.xerces"      value="${build.inputlib}/xerces-1_4_4.jar"/>
    <property name="build.inputlib.mysql"       value="${build.inputlib}/mm.mysql-2.0.4-bin.jar"/>
    <property name="build.inputlib.fesi"        value="${build.inputlib}/fesi.jar"/>            
    <property name="build.inputlib.oracle"      value="${build.inputlib}/classes12.zip"/>
    <property name="build.inputlib.fop"         value="${build.inputlib}/fop_bin.jar"/>     
    <property name="build.inputlib.oro"         value="${build.inputlib}/jakarta-oro-2.0.6.jar"/>
    <property name="build.inputlib.tidy"        value="${build.inputlib}/Tidy.jar"/>
    
    <property name="build.version.propertyfile" value="${build.classes}/com/opencms/core/version.properties"/>
    <property name="build.version.jsfile"       value="${build.webinf}/ocsetup/vfs/system/workplace/templates/js/version.js"/>
    <property name="build.version.setupfile"    value="${build.web}/ocsetup/versions.txt"/>
    
    <property name="db.url"                     value="jdbc:mysql://localhost:3306/opencms"/>
    <property name="db.setupurl"                value="jdbc:mysql://localhost:3306/mysql"/>
    <property name="db.user"                    value="root"/>
    <property name="db.password"                value=""/>
    <property name="db.driver"                  value="org.gjt.mm.mysql.Driver"/>


    <target name="init" description="Checks if all needed libaries are available">
        <condition property="libsAvailable">
            <and>
                <available file="${build.inputlib.servlet}"/>
                <available file="${build.inputlib.activation}"/>
                <available file="${build.inputlib.mail}"/>
                <available file="${build.inputlib.xerces}"/>
                <available file="${build.inputlib.mysql}"/>
                <available file="${build.inputlib.fesi}"/>
                <available file="${build.inputlib.oro}"/>
                <available file="${build.inputlib.tidy}"/>
            </and>
        </condition>
        
        <property name="ex.oracle"      value="com/opencms/file/oracleplsql/**"/>
        <property name="ex.pdflaunch"   value="com/opencms/launcher/CmsPdfLauncher.java"/>
                
        <condition property="build.excludes" value="${build.excludes},${ex.oracle}">
            <not><available file="${build.inputlib.oracle}"/></not>
        </condition>        
        
        <condition property="build.excludes" value="${build.excludes},${ex.pdflaunch}">
            <not><available file="${build.inputlib.fop}"/></not>
        </condition>        
        
        <condition property="tomcat.home" value="${env.TOMCAT_HOME}">
            <available file="${env.TOMCAT_HOME}" type="dir"/>
        </condition>
        
        <condition property="tomcat.home" value="${env.CATALINA_HOME}">
            <available file="${env.CATALINA_HOME}" type="dir"/>
        </condition>
    </target>
    
    
    <target name="initmsg" depends="init" unless="libsAvailable" description="Stop target if required libaries are missing">
        <fail>
        
Error: Some of the required libaries are not available.

To comile OpenCms, you need the following libaries:
${build.inputlib.servlet}
${build.inputlib.activation}
${build.inputlib.mail}
${build.inputlib.xerces}
${build.inputlib.mysql}
${build.inputlib.fesi}
${build.inputlib.oro}
${build.inputlib.tidy}

        </fail>
    </target>


    <target name="prepare" depends="initmsg" description="Create output directories">
        <mkdir dir="${build.classes}"/>
        <mkdir dir="${build.home}"/>
        <mkdir dir="${build.lib}"/>
        <mkdir dir="${zip.home}"/>
        <mkdir dir="${pdf.home}"/>        
    </target>


    <target name="clean" description="Delete existing ouput directories">
        <delete dir="${build.home}"/>
    </target>


    <target name="compileclasses" depends="prepare" if="libsAvailable" description="Compiles all OpenCms classes">
       <javac
            srcdir="src"
            destdir="${build.classes}"
            excludes="${build.excludes}"
            classpath=" ${build.inputlib.servlet}:
                        ${build.inputlib.activation}:
                        ${build.inputlib.mail}:
                        ${build.inputlib.xerces}:
                        ${build.inputlib.oracle}:
                        ${build.inputlib.mysql}:
                        ${build.inputlib.fop}:
                        ${build.inputlib.oro}:
                        ${build.inputlib.tidy}:
                        ${build.inputlib.fesi}"
            debug="on"
            optimize="on"
            deprecation="off"
            />

       <copy todir="${build.classes}">
            <fileset dir="src" includes="**/*.properties,**/*.txt"/>
       </copy>
       <!-- generate version infos-->
        <tstamp>
            <format property="timestamp" pattern="yyyy-MM-dd-HH-mm"/>
        </tstamp>
        <property name="version.number" value="${env.USERNAME}_${timestamp}"/>
        <echo file="${build.version.propertyfile}">version.number=${version.number}
</echo>
        <echo file="${build.version.propertyfile}" append="on">version.name=${version.name}</echo>
    </target>
    

    <target name="jar" depends="compileclasses" description="Generate OpenCms JARs">
        <jar
            jarfile="${build.lib}/opencms.jar"
            basedir="${build.classes}"
            includes="com/opencms/**,source/**"
            excludes="com/opencms/build/**"
            >            
            <metainf dir="etc" includes="opencms.tld"/>
        </jar>            
    </target>


    <target name="copy" depends="jar" description="Creates WAR file structure and copies needed files to it">
       <copy todir="${build.home}">
            <fileset dir="." includes="*.*" excludes="build.xml"/>
       </copy>

       <copy file="${build.inputlib.xerces}" todir="${build.lib}"/>
       <copy file="${build.inputlib.mysql}" todir="${build.lib}"/>
       <copy file="${build.inputlib.activation}" todir="${build.lib}"/>
       <copy file="${build.inputlib.mail}" todir="${build.lib}"/>
       <copy file="${build.inputlib.fesi}" todir="${build.lib}"/>
       <copy file="${build.inputlib.oro}" todir="${build.lib}"/>
       <copy file="${build.inputlib.tidy}" todir="${build.lib}"/>

       <copy todir="${build.webinf}">
            <fileset dir="etc" excludes="*/CVS/*,MANIFEST.MF"/>
       </copy>

       <copy file="etc/MANIFEST.MF" todir="${build.metainf}"/>

       <copy todir="${build.web}">
            <fileset dir="web" excludes="*/CVS/*"/>
       </copy>

       <!-- create version-info for the workplace-->
       <echo file="${build.version.jsfile}">var version = '${version.number} ${version.name}';</echo>
       <!-- create version-info for the setup versions.txt -->
       <echo file="${build.version.setupfile}" append="on">OpenCms ${version.number}
</echo>
{'fraction_non_alphanumeric': 0.17995563857109503, 'fraction_numerical': 0.0030352556619192153, 'mean_word_length': 2.3248593052590723, 'pattern_counts': {'":': 0, '<': 250, '<?xml version=': 2, '>': 250, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '278756', 'n_tokens_mistral': 5006, 'n_tokens_neox': 4811, 'n_words': 809}