<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!-- ======================================================================= -->
<!-- eXist build file : Setup default xar packages                           -->
<!-- ======================================================================= -->

<!-- $Id$ -->

<project basedir="../.." name="Setup" default="setup">

  <description>Package setup tasks</description>
  
  <!-- Additional task defs  -->
  <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
      <pathelement location="tools/ant/lib/ant-contrib-1.0b3.jar"/>
    </classpath>
  </taskdef>
  
  <property file="build.properties"/>
  
  <property name="autodeploy.repo" value="http://demo.exist-db.org/exist/apps/public-repo"/>
  <property name="autostart-dir" value="autodeploy"/>
  
  <target name="prepare">
    <mkdir dir="${autostart-dir}"/>
    <!--  Automatically download standard xar packages from public repository
        if autostart directory is empty.
  -->
    <path id="autostart-files">
      <fileset dir="${autostart-dir}">
        <include name="*.xar"/>
      </fileset>
    </path>
    
    <property name="autostart-files" refid="autostart-files"/>
    
    <condition property="autostart-empty"> 
      <equals arg1="" arg2="${autostart-files}"/> 
    </condition>
  </target>
  
  <!-- 
    Download xar files from the package website.
  -->
  <target name="setup" depends="prepare" description="Download standard xar packages.">
    <foreach list="${autodeploy}" target="download" param="xar"></foreach>
  </target>
  
  <target name="download">
    <available file="${autostart-dir}/${xar}" property="xar-installed"/>
    <antcall target="download-xar"/>
  </target>

  <target name="download-xar" unless="xar-installed">
      
    <taskdef name="fetch" classname="nl.ow.dilemma.ant.fetch.FetchTask">
        <classpath>
          <pathelement location="tools/ant/lib/asocat-exist.jar"/>
        </classpath>
    </taskdef>
    <fetch dest="${autostart-dir}" url="${autodeploy.repo}/pkg.zip?abbrev=${xar}"
           failonerror="false" maxtime="10"/>
    <unzip src="${autostart-dir}/pkg.zip" dest="${autostart-dir}"/>
    <delete file="${autostart-dir}/pkg.zip" failonerror="false"/>
  </target>
</project>
<commit_msg>10 seconds to download shared xar is too short on a 720Kbps link - changed to 120 seconds - build was failing owing to aborting the download of the xar prematurely<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!-- ======================================================================= -->
<!-- eXist build file : Setup default xar packages                           -->
<!-- ======================================================================= -->

<!-- $Id$ -->

<project basedir="../.." name="Setup" default="setup">

  <description>Package setup tasks</description>
  
  <!-- Additional task defs  -->
  <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
      <pathelement location="tools/ant/lib/ant-contrib-1.0b3.jar"/>
    </classpath>
  </taskdef>
  
  <property file="build.properties"/>
  
  <property name="autodeploy.repo" value="http://demo.exist-db.org/exist/apps/public-repo"/>
  <property name="autostart-dir" value="autodeploy"/>
  
  <target name="prepare">
    <mkdir dir="${autostart-dir}"/>
    <!--  Automatically download standard xar packages from public repository
        if autostart directory is empty.
  -->
    <path id="autostart-files">
      <fileset dir="${autostart-dir}">
        <include name="*.xar"/>
      </fileset>
    </path>
    
    <property name="autostart-files" refid="autostart-files"/>
    
    <condition property="autostart-empty"> 
      <equals arg1="" arg2="${autostart-files}"/> 
    </condition>
  </target>
  
  <!-- 
    Download xar files from the package website.
  -->
  <target name="setup" depends="prepare" description="Download standard xar packages.">
    <foreach list="${autodeploy}" target="download" param="xar"></foreach>
  </target>
  
  <target name="download">
    <available file="${autostart-dir}/${xar}" property="xar-installed"/>
    <antcall target="download-xar"/>
  </target>

  <target name="download-xar" unless="xar-installed">
      
    <taskdef name="fetch" classname="nl.ow.dilemma.ant.fetch.FetchTask">
        <classpath>
          <pathelement location="tools/ant/lib/asocat-exist.jar"/>
        </classpath>
    </taskdef>
    <fetch dest="${autostart-dir}" url="${autodeploy.repo}/pkg.zip?abbrev=${xar}"
           failonerror="false" maxtime="120"/>
    <unzip src="${autostart-dir}/pkg.zip" dest="${autostart-dir}"/>
    <delete file="${autostart-dir}/pkg.zip" failonerror="false"/>
  </target>
</project>

{'fraction_non_alphanumeric': 0.2354681885436483, 'fraction_numerical': 0.006129782287042909, 'mean_word_length': 3.418300653594771, 'pattern_counts': {'":': 0, '<': 103, '<?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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5412654', 'n_tokens_mistral': 1464, 'n_tokens_neox': 1410, 'n_words': 272}