<commit_before>
<!-- ANT Build File used for building JBI examples. This file
     is imported from each example directory, and should not
     be used directly. -->

<project name="example-build" default="bpelc">
    <property environment="env"/>
    <echo message="ODE_HOME = ${env.ODE_HOME}"/>
    <property name="ode.home" value="${env.ODE_HOME}" />

    <!--
    <property file="${basedir}/../example.properties"/>
    -->
  
    <!-- pick up environmental ode.xxx properties -->
    <property file="${ode.home}/etc/ode.properties"/>

    <property name="resources" value="-" />
    <property name="cbpfilename" value="${ant.project.name}.cbp" />
    <property name="rrfilename" value="${ant.project.name}.rr" />
    <property name="wsdlfilename" value="${ant.project.name}.wsdl" />
    <property name="sufilename" value="${ant.project.name}-Process.zip" />
    <property name="safilename" value="${ant.project.name}-sa.zip" />
    
    <property name="uri.wsdl" value="urn:/${ant.project.name}.wsdl" />
    <property name="url.bpel" value="file:${basedir}/${ant.project.name}.bpel" />

    <property name="lib.dir" location="${ode.home}/lib"/>
    <property name="etc.dir" location="${ode.home}/etc" />

    <property name="build.dir" location="build" />

    <property name="cbpfile" location="${build.dir}/${cbpfilename}" />
    <property name="rrfile" location="${build.dir}/${rrfilename}" />
    <property name="sufile" location="${build.dir}/${sufilename}" />
    <property name="safile" location="${build.dir}/${safilename}" />

    <target name="clean" description="Clean intermediate artifacts.">
        <delete dir="${build.dir}"/>
    </target>


    <target name="jbi-sa" description="Generate JBI system assembly." depends="service-unit">
        <zip destfile="${safile}">
            <zipfileset file="${sufile}"/>
            <zipfileset file="jbi.xml" prefix="META-INF"/>
        </zip>
    </target>

    <target name="bpelc" description="Compile BPEL process." depends="rr">
        <antcall target="_bpelc" />
    </target>

    <target name="rr" description="Generate ODE resource repository">
        <antcall target="_rr" />
    </target>

    <target name="_rr" depends="init">
        <delete dir="${rrfile}" />
        <mkdir dir="${rrfile}" />
        <ode-rr rrdir="${rrfile}">
            <!--rrfileset dir="." includes="${wsdlfilename}" desturi="urn:/" recursive="yes" /-->
            <rrfileset dir="." includes="*.wsdl" desturi="urn:/" recursive="yes" />
            <rrfileset dir="." includes="*.xsd" desturi="urn:/" recursive="yes" />
        </ode-rr>
    </target>

    <target name="_bpelc" depends="init">
        <bpelc targetdir="${build.dir}" rr="${rrfile}" wsdl="${uri.wsdl}">
            <bpel url="${url.bpel}" />
        </bpelc>
    </target>

    <target name="service-unit" depends="init,clean,bpelc">
        <zip destfile="${sufile}">
            <fileset dir="${build.dir}" includes="**/*"/>
        </zip>
    </target>
    

    <target name="init-extensions">
        <condition property="ode.script.extension" value=".bat">
            <os family="windows"/>
        </condition>
        <condition property="ode.script.extension" value="">
            <os family="unix"/>
        </condition>
        <condition property="ode.exe.extension" value=".exe">
            <os family="windows"/>
        </condition>
        <condition property="ode.exe.extension" value="">
            <os family="unix"/>
        </condition>
    </target>
  
  <!-- if example.properties has ode.java.home assigned it has highest priority
       and overrides the system environment JAVA_HOME 

       if ode.java.home not set in example.properties and system environment
       JAVA_HOME is set then ode.java.home becomes JAVA_HOME -->

    <target name="try-ENV-java-underscore-home" if="Env-JAVA_HOME" unless="ode.java.home">
        <echo message="'ode.java.home' not set trying 'Env-JAVA_HOME'"/>
        <property name="ode.java.home" value="${Env-JAVA_HOME}"/>
    </target>

    <target name="try-jdk-dot-home" if="jdk.home" unless="ode.java.home">
        <echo message="'ode.java.home' not set trying 'jdk.home'"/>
        <property name="ode.java.home" value="${jdk.home}"/>
    </target>

    <target name="try-java-dot-home" if="java.home" unless="ode.java.home">
        <echo message="'ode.java.home' not set trying 'java.home'"/>
        <property name="ode.java.home" value="${java.home}"/>
    </target>

    <target name="fail-no-ode-java-home" depends="try-ENV-java-underscore-home,try-jdk-dot-home,try-java-dot-home" unless="ode.java.home">
        <fail message="property 'ode.java.home' is not set (try sys env JAVA_HOME or setting ode.java.home in example.properties)"/>
    </target>

    <target name="validate-ode-java-home" depends="init-extensions,fail-no-ode-java-home" if="ode.java.home">
        <available file="${ode.java.home}/bin/java${ode.exe.extension}" property="ode.java.home.good"/>
    </target>

    <target name="fail-invalid-ode-java-home" depends="validate-ode-java-home" unless="ode.java.home.good">
        <fail message="Java Home invalid: 'ode.java.home'=${ode.java.home}"/>
    </target>

    <target name="validate-ode-home">
        <available file="${lib.dir}/ode-bootstrap.jar" property="ode.home.good"/>
    </target>

    <target name="fail-invalid-ode-home" depends="validate-ode-home" unless="ode.home.good">
        <fail message="Invalid property 'ode.home'=${ode.home}"/>
    </target>

    <target name="init" depends="init-extensions,fail-invalid-ode-home,fail-invalid-ode-java-home">
        <echo message="ode.home = ${ode.home}"/>
        <echo message="ode.java.home = ${ode.java.home}"/>
    
        <!-- Ant Env Takes gets first crack at basic ode properties override -->
        <!-- example.properties gets second crack at basic ode properties override -->
        <!-- ode.properties is default authority  -->
        <property file="${ode.home}/etc/ode.properties"/>
    
        <property name="ode.default.javaopts"
                value=""/>

        <path id="cpath.ode">
            <fileset dir="${lib.dir}" includes="**/*.jar" />
            <pathelement location="${ode.home}/etc" />
        </path>

        <taskdef classpathref="cpath.ode" resource="com/fs/ode/tools/anttasks.properties"
                onerror="ignore" />

        <mkdir dir="${build.dir}"/>
    </target>

    <target name="_sendsoap" depends="init">
        <echo message="ode.sendsoap.url=${ode.sendsoap.url}"/>
        <echo message="ode.sendsoap.filename=${ode.sendsoap.filename}"/>
        <exec executable="${ode.home}/bin/sendsoap${ode.script.extension}" dir="${ode.home}">
            <env key="JAVA_HOME" value="${ode.java.home}"/>
            <arg value="${ode.sendsoap.url}"/>
            <arg value="${ode.sendsoap.filename}"/>
        </exec>
    </target>

</project>
<commit_msg>ODE-16 Fixed remaining com.fs references in the ANT build.<commit_after>
<!-- ANT Build File used for building JBI examples. This file
     is imported from each example directory, and should not
     be used directly. -->

<project name="example-build" default="bpelc">
    <property environment="env"/>
    <property name="ode.home" location="${basedir}/../../../" />

    <!--
    <property file="${basedir}/../example.properties"/>
    -->
  
    <!-- pick up environmental ode.xxx properties -->
    <property file="${ode.home}/etc/ode.properties"/>

    <property name="resources" value="-" />
    <property name="cbpfilename" value="${ant.project.name}.cbp" />
    <property name="rrfilename" value="${ant.project.name}.rr" />
    <property name="wsdlfilename" value="${ant.project.name}.wsdl" />
    <property name="sufilename" value="${ant.project.name}-Process.zip" />
    <property name="safilename" value="${ant.project.name}-sa.zip" />
    
    <property name="uri.wsdl" value="urn:/${ant.project.name}.wsdl" />
    <property name="url.bpel" value="file:${basedir}/${ant.project.name}.bpel" />

    <property name="lib.dir" location="${ode.home}/lib"/>
    <property name="etc.dir" location="${ode.home}/etc" />

    <property name="build.dir" location="build" />

    <property name="cbpfile" location="${build.dir}/${cbpfilename}" />
    <property name="rrfile" location="${build.dir}/${rrfilename}" />
    <property name="sufile" location="${build.dir}/${sufilename}" />
    <property name="safile" location="${build.dir}/${safilename}" />

    <target name="clean" description="Clean intermediate artifacts.">
        <delete dir="${build.dir}"/>
    </target>


    <target name="jbi-sa" description="Generate JBI system assembly." depends="service-unit">
        <zip destfile="${safile}">
            <zipfileset file="${sufile}"/>
            <zipfileset file="jbi.xml" prefix="META-INF"/>
        </zip>
    </target>

    <target name="bpelc" description="Compile BPEL process." depends="rr">
        <antcall target="_bpelc" />
    </target>

    <target name="rr" description="Generate ODE resource repository">
        <antcall target="_rr" />
    </target>

    <target name="_rr" depends="init">
        <delete dir="${rrfile}" />
        <mkdir dir="${rrfile}" />
        <ode-rr rrdir="${rrfile}">
            <!--rrfileset dir="." includes="${wsdlfilename}" desturi="urn:/" recursive="yes" /-->
            <rrfileset dir="." includes="*.wsdl" desturi="urn:/" recursive="yes" />
            <rrfileset dir="." includes="*.xsd" desturi="urn:/" recursive="yes" />
        </ode-rr>
    </target>

    <target name="_bpelc" depends="init">
        <bpelc targetdir="${build.dir}" rr="${rrfile}" wsdl="${uri.wsdl}">
            <bpel url="${url.bpel}" />
        </bpelc>
    </target>

    <target name="service-unit" depends="init,clean,bpelc">
        <zip destfile="${sufile}">
            <fileset dir="${build.dir}" includes="**/*"/>
        </zip>
    </target>
    

    <target name="init-extensions">
        <condition property="ode.script.extension" value=".bat">
            <os family="windows"/>
        </condition>
        <condition property="ode.script.extension" value="">
            <os family="unix"/>
        </condition>
        <condition property="ode.exe.extension" value=".exe">
            <os family="windows"/>
        </condition>
        <condition property="ode.exe.extension" value="">
            <os family="unix"/>
        </condition>
    </target>
  
  <!-- if example.properties has ode.java.home assigned it has highest priority
       and overrides the system environment JAVA_HOME 

       if ode.java.home not set in example.properties and system environment
       JAVA_HOME is set then ode.java.home becomes JAVA_HOME -->

    <target name="try-ENV-java-underscore-home" if="Env-JAVA_HOME" unless="ode.java.home">
        <echo message="'ode.java.home' not set trying 'Env-JAVA_HOME'"/>
        <property name="ode.java.home" value="${Env-JAVA_HOME}"/>
    </target>

    <target name="try-jdk-dot-home" if="jdk.home" unless="ode.java.home">
        <echo message="'ode.java.home' not set trying 'jdk.home'"/>
        <property name="ode.java.home" value="${jdk.home}"/>
    </target>

    <target name="try-java-dot-home" if="java.home" unless="ode.java.home">
        <echo message="'ode.java.home' not set trying 'java.home'"/>
        <property name="ode.java.home" value="${java.home}"/>
    </target>

    <target name="fail-no-ode-java-home" depends="try-ENV-java-underscore-home,try-jdk-dot-home,try-java-dot-home" unless="ode.java.home">
        <fail message="property 'ode.java.home' is not set (try sys env JAVA_HOME or setting ode.java.home in example.properties)"/>
    </target>

    <target name="validate-ode-java-home" depends="init-extensions,fail-no-ode-java-home" if="ode.java.home">
        <available file="${ode.java.home}/bin/java${ode.exe.extension}" property="ode.java.home.good"/>
    </target>

    <target name="fail-invalid-ode-java-home" depends="validate-ode-java-home" unless="ode.java.home.good">
        <fail message="Java Home invalid: 'ode.java.home'=${ode.java.home}"/>
    </target>

    <target name="validate-ode-home">
        <available file="${lib.dir}/ode-bootstrap.jar" property="ode.home.good"/>
    </target>

    <target name="fail-invalid-ode-home" depends="validate-ode-home" unless="ode.home.good">
        <fail message="Invalid property 'ode.home'=${ode.home}"/>
    </target>

    <target name="init" depends="init-extensions,fail-invalid-ode-home,fail-invalid-ode-java-home">
        <echo message="ode.home = ${ode.home}"/>
        <echo message="ode.java.home = ${ode.java.home}"/>
    
        <!-- Ant Env Takes gets first crack at basic ode properties override -->
        <!-- example.properties gets second crack at basic ode properties override -->
        <!-- ode.properties is default authority  -->
        <property file="${ode.home}/etc/ode.properties"/>
    
        <property name="ode.default.javaopts"
                value=""/>

        <path id="cpath.ode">
            <fileset dir="${lib.dir}" includes="**/*.jar" />
            <pathelement location="${ode.home}/etc" />
        </path>

        <taskdef classpathref="cpath.ode" resource="org/apache/ode/tools/anttasks.properties"
                onerror="ignore" />

        <mkdir dir="${build.dir}"/>
    </target>

    <target name="_sendsoap" depends="init">
        <echo message="ode.sendsoap.url=${ode.sendsoap.url}"/>
        <echo message="ode.sendsoap.filename=${ode.sendsoap.filename}"/>
        <exec executable="${ode.home}/bin/sendsoap${ode.script.extension}" dir="${ode.home}">
            <env key="JAVA_HOME" value="${ode.java.home}"/>
            <arg value="${ode.sendsoap.url}"/>
            <arg value="${ode.sendsoap.filename}"/>
        </exec>
    </target>

</project>

{'fraction_non_alphanumeric': 0.19491156857060019, 'fraction_numerical': 0.00014496955639315743, 'mean_word_length': 2.9096061207140833, 'pattern_counts': {'":': 0, '<': 252, '<?xml version=': 0, '>': 252, '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': '3620362', 'n_tokens_mistral': 4318, 'n_tokens_neox': 4179, 'n_words': 811}