<commit_before><project name="tigase-defs">

 <macrodef name="compile">
	<attribute name="srcdir"/>
	<attribute name="excldir" default=""/>
	<attribute name="deprecation" default="off"/>
	<attribute name="xlint" default="-Xlint:-all"/>
	<sequential>
	 <mkdir dir="${build}"/>
	 <javac
		srcdir="@{srcdir}"
		excludes="@{excldir}"
		destdir="${build}"
		debug="on"
		encoding="UTF-8"
		deprecation="@{deprecation}">
		<compilerarg line="@{xlint}"/>
		<classpath>
		 <fileset dir="${libs}">
	    <include name="**/*.jar"/>
		 </fileset>
		</classpath>
	 </javac>
	</sequential>
 </macrodef>

  <macrodef name="jarfile">
    <attribute name="excludes" default=""/>
    <attribute name="filename"/>
    <attribute name="manifest" default="MANIFEST.MF"/>
    <sequential>
      <copy
        file="manifest.temp"
        tofile="@{manifest}"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Specification-Version: ).*$"
        replace="\1${ver}"
        byline="true"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Implementation-Version: ).*$"
        replace="\1${version}"
        byline="true"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Package-Version: ).*$"
        replace="\1build${build-no}"
        byline="true"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Tigase-Version: ).*$"
        replace="\1${version}"
        byline="true"/>
      <mkdir dir="${jars}"/>
      <jar jarfile="${jars}/@{filename}.jar"
        manifest="@{manifest}"
        basedir="${build}"
        excludes="@{excludes}"/>
    </sequential>
  </macrodef>

  <macrodef name="docs">
    <attribute name="packages" default=""/>
    <attribute name="excludepackages" default=""/>
    <attribute name="destdir" default="docs"/>
    <sequential>
      <mkdir dir="@{destdir}/api"/>
      <javadoc
        sourcepath="${src}"
        packagenames="@{packages}"
        excludepackagenames="@{excludepackages}"
        destdir="@{destdir}/api"
        windowtitle="${javadoc-windowtitle}"
        overview="package.html"
        failonerror="yes"
        use="true"
        author="true"
        version="true"
        verbose="false"
        protected="true"
        bottom="${javadoc-copyright}">
        <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/"
          packagelistLoc="package-list"/>
	<classpath>
	  <fileset dir="${libs}">
	    <include name="**/*.jar"/>
	  </fileset>
	</classpath>
      </javadoc>
    </sequential>
  </macrodef>

  <macrodef name="distbin">
    <attribute name="packagename"/>
    <attribute name="docsdir" default="docs"/>
    <sequential>
      <delete file="@{packagename}-${version}.zip"/>
      <delete file="@{packagename}-${version}.tar.gz"/>
      <delete dir="dist"/>
      <mkdir dir="${dist}/@{packagename}-${version}/${jars}"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts/gentoo"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts/mandriva"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts/admin"/>
      <copy
        file="${jars}/@{packagename}.jar"
        tofile="${dist}/@{packagename}-${version}/${jars}/@{packagename}.jar"/>
      <exec executable="sed" output="${dist}/@{packagename}-${version}/README">
        <arg value="-e"/>
        <arg value="s/&lt;[^>]*>//g"/>
        <arg value="-e"/>
        <arg value="s/&#60;[^>]*>//g"/>
        <arg value="-e"/>
        <arg value="s/&amp;[^; ]*;//g"/>
        <arg value="-e"/>
        <arg value="s/${APP_VER}/${version}/g"/>
        <arg value="package.html"/>
      </exec>
      <copy
        file="package.html"
        tofile="${dist}/@{packagename}-${version}/package.html"/>
      <copy
        file="License.html"
        tofile="${dist}/@{packagename}-${version}/License.html"/>
      <copy
        file="Changelog"
        tofile="${dist}/@{packagename}-${version}/Changelog"/>
      <mkdir dir="${dist}/@{packagename}-${version}/libs"/>
      <copy todir="${dist}/@{packagename}-${version}/libs">
        <filelist dir="libs">
          <file name="tigase-utils.jar"/>
          <file name="tigase-xmltools.jar"/>
          <file name="jdbc-mysql.jar"/>
          <file name="groovy-all-1.5.7.jar"/>
          <file name="groovy-engine.jar"/>
          <file name="jdbc-postgresql.jar"/>
          <file name="derby.jar"/>
          <file name="derbytools.jar"/>
          <file name="jtds-1.2.2.jar"/>
          <file name="tigase-extras.jar"/>
          <file name="tigase-muc.jar"/>
          <file name="tigase-pubsub.jar"/>
        </filelist>
      </copy>
      <mkdir dir="${dist}/@{packagename}-${version}/certs"/>
      <copy todir="${dist}/@{packagename}-${version}/certs">
        <filelist dir="certs">
          <file name="dummy.cer"/>
          <file name="rsa-keystore"/><commit_msg>small naming convention fix (redmine #35)<commit_after><project name="tigase-defs">

 <macrodef name="compile">
	<attribute name="srcdir"/>
	<attribute name="excldir" default=""/>
	<attribute name="deprecation" default="off"/>
	<attribute name="xlint" default="-Xlint:-all"/>
	<sequential>
	 <mkdir dir="${build}"/>
	 <javac
		srcdir="@{srcdir}"
		excludes="@{excldir}"
		destdir="${build}"
		debug="on"
		encoding="UTF-8"
		deprecation="@{deprecation}">
		<compilerarg line="@{xlint}"/>
		<classpath>
		 <fileset dir="${libs}">
	    <include name="**/*.jar"/>
		 </fileset>
		</classpath>
	 </javac>
	</sequential>
 </macrodef>

  <macrodef name="jarfile">
    <attribute name="excludes" default=""/>
    <attribute name="filename"/>
    <attribute name="manifest" default="MANIFEST.MF"/>
    <sequential>
      <copy
        file="manifest.temp"
        tofile="@{manifest}"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Specification-Version: ).*$"
        replace="\1${ver}"
        byline="true"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Implementation-Version: ).*$"
        replace="\1${version}"
        byline="true"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Package-Version: ).*$"
        replace="\1build${build-no}"
        byline="true"/>
      <replaceregexp
        file="@{manifest}"
        match="^(Tigase-Version: ).*$"
        replace="\1${version}"
        byline="true"/>
      <mkdir dir="${jars}"/>
      <jar jarfile="${jars}/@{filename}.jar"
        manifest="@{manifest}"
        basedir="${build}"
        excludes="@{excludes}"/>
    </sequential>
  </macrodef>

  <macrodef name="docs">
    <attribute name="packages" default=""/>
    <attribute name="excludepackages" default=""/>
    <attribute name="destdir" default="docs"/>
    <sequential>
      <mkdir dir="@{destdir}/api"/>
      <javadoc
        sourcepath="${src}"
        packagenames="@{packages}"
        excludepackagenames="@{excludepackages}"
        destdir="@{destdir}/api"
        windowtitle="${javadoc-windowtitle}"
        overview="package.html"
        failonerror="yes"
        use="true"
        author="true"
        version="true"
        verbose="false"
        protected="true"
        bottom="${javadoc-copyright}">
        <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/"
          packagelistLoc="package-list"/>
	<classpath>
	  <fileset dir="${libs}">
	    <include name="**/*.jar"/>
	  </fileset>
	</classpath>
      </javadoc>
    </sequential>
  </macrodef>

  <macrodef name="distbin">
    <attribute name="packagename"/>
    <attribute name="docsdir" default="docs"/>
    <sequential>
      <delete file="@{packagename}-${version}.zip"/>
      <delete file="@{packagename}-${version}.tar.gz"/>
      <delete dir="dist"/>
      <mkdir dir="${dist}/@{packagename}-${version}/${jars}"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts/gentoo"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts/mandriva"/>
      <mkdir dir="${dist}/@{packagename}-${version}/scripts/admin"/>
      <copy
        file="${jars}/@{packagename}.jar"
        tofile="${dist}/@{packagename}-${version}/${jars}/@{packagename}.jar"/>
      <exec executable="sed" output="${dist}/@{packagename}-${version}/README">
        <arg value="-e"/>
        <arg value="s/&lt;[^>]*>//g"/>
        <arg value="-e"/>
        <arg value="s/&#60;[^>]*>//g"/>
        <arg value="-e"/>
        <arg value="s/&amp;[^; ]*;//g"/>
        <arg value="-e"/>
        <arg value="s/${APP_VER}/${version}/g"/>
        <arg value="package.html"/>
      </exec>
      <copy
        file="package.html"
        tofile="${dist}/@{packagename}-${version}/package.html"/>
      <copy
        file="License.html"
        tofile="${dist}/@{packagename}-${version}/License.html"/>
      <copy
        file="ChangeLog"
        tofile="${dist}/@{packagename}-${version}/ChangeLog"/>
      <mkdir dir="${dist}/@{packagename}-${version}/libs"/>
      <copy todir="${dist}/@{packagename}-${version}/libs">
        <filelist dir="libs">
          <file name="tigase-utils.jar"/>
          <file name="tigase-xmltools.jar"/>
          <file name="jdbc-mysql.jar"/>
          <file name="groovy-all-1.5.7.jar"/>
          <file name="groovy-engine.jar"/>
          <file name="jdbc-postgresql.jar"/>
          <file name="derby.jar"/>
          <file name="derbytools.jar"/>
          <file name="jtds-1.2.2.jar"/>
          <file name="tigase-extras.jar"/>
          <file name="tigase-muc.jar"/>
          <file name="tigase-pubsub.jar"/>
        </filelist>
      </copy>
      <mkdir dir="${dist}/@{packagename}-${version}/certs"/>
      <copy todir="${dist}/@{packagename}-${version}/certs">
        <filelist dir="certs">
          <file name="dummy.cer"/>
          <file name="rsa-keystore"/>
{'fraction_non_alphanumeric': 0.22435897435897437, 'fraction_numerical': 0.003663003663003663, 'mean_word_length': 2.673019431988042, 'pattern_counts': {'":': 0, '<': 197, '<?xml version=': 0, '>': 205, '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': '4358582', 'n_tokens_mistral': 3300, 'n_tokens_neox': 3120, 'n_words': 450}