<commit_before><!--
  Tasks and target for building a complete web application which includes a
  model, and is deployable

  properties:
    base.webapp.path - the path to the base war file that we will add to

-->

<project name="application" default="default" basedir="."
         xmlns:appl="http://www.intermine.org/ns/im-appl-proj/1"
         xmlns:task="http://www.intermine.org/ns/im-task-proj/1">

  <dirname property="application.xml.basedir" file="${ant.file.application}"/>

  <import file="${application.xml.basedir}/webapp.xml"/>
  <import file="${application.xml.basedir}/task.xml"/>


  <target name="-init-summarise-objectstore"
          depends="init, -init-deps, -init-task-xml, -init-properties, -pre-jar"/>

  <target name="retrieve-objectstore-summary" depends="-init-summarise-objectstore"
          unless="temporary.webapp.project">
    <!-- Summarise objectstore -->
    <echo level="debug" message="Retrieving object store summary from ${objectstore.name}..."/>
    <summarise-objectstore alias="${objectstore.name}"
                           configFileName="objectstoresummary.config.properties"
                           outputFile="${build.dir}/webapp/WEB-INF/objectstoresummary.properties"/>
  </target>


  <target name="-pre-init" depends="webapp.-pre-init">
    <!-- Files -->
    <property name="default.template.queries" location="resources/default-template-queries.xml"/>
    <!-- Location of model-less intermine-webapp.war -->
    <property name="source.intermine.webapp.war" location="${application.xml.basedir}/../${base.webapp.path}"/>
  </target>

  <!-- WAR INSTEAD OF JAR -->

  <target name="-check-keystore">
    <script language="javascript">
      // home, suffix and fileName are all java.lang.String
      var home = project.getProperty('user.home');
      var suffix = project.getProperty('release-suffix');
      var fileName = project.getProperty('intermine.properties.file', '')
                            .replaceAll('\\.properties', '-keystore.jks');
      project.setProperty('keystore', home + '/.intermine/' + fileName + suffix);<commit_msg>Helpfully, project.getProperty has a different API to Properties.getProperty<commit_after><!--
  Tasks and target for building a complete web application which includes a
  model, and is deployable

  properties:
    base.webapp.path - the path to the base war file that we will add to

-->

<project name="application" default="default" basedir="."
         xmlns:appl="http://www.intermine.org/ns/im-appl-proj/1"
         xmlns:task="http://www.intermine.org/ns/im-task-proj/1">

  <dirname property="application.xml.basedir" file="${ant.file.application}"/>

  <import file="${application.xml.basedir}/webapp.xml"/>
  <import file="${application.xml.basedir}/task.xml"/>


  <target name="-init-summarise-objectstore"
          depends="init, -init-deps, -init-task-xml, -init-properties, -pre-jar"/>

  <target name="retrieve-objectstore-summary" depends="-init-summarise-objectstore"
          unless="temporary.webapp.project">
    <!-- Summarise objectstore -->
    <echo level="debug" message="Retrieving object store summary from ${objectstore.name}..."/>
    <summarise-objectstore alias="${objectstore.name}"
                           configFileName="objectstoresummary.config.properties"
                           outputFile="${build.dir}/webapp/WEB-INF/objectstoresummary.properties"/>
  </target>


  <target name="-pre-init" depends="webapp.-pre-init">
    <!-- Files -->
    <property name="default.template.queries" location="resources/default-template-queries.xml"/>
    <!-- Location of model-less intermine-webapp.war -->
    <property name="source.intermine.webapp.war" location="${application.xml.basedir}/../${base.webapp.path}"/>
  </target>

  <!-- WAR INSTEAD OF JAR -->

  <target name="-check-keystore">
    <script language="javascript">
      // home, suffix and fileName are all java.lang.String
      var home = project.getProperty('user.home');
      var suffix = project.getProperty('release-suffix');
      var fileName = project.getProperty('intermine.properties.file');
      if (fileName) {
        fileName = fileName.replaceAll('\\.properties', '-keystore.jks');
        project.setProperty('keystore', home + '/.intermine/' + fileName + suffix);
      }
{'fraction_non_alphanumeric': 0.16321785631248548, 'fraction_numerical': 0.0009300162752848175, 'mean_word_length': 3.246791707798618, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 20}, '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': '1424227', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1241, 'n_words': 241}