<commit_before><?xml version="1.0"?>
<!--
  ~ Copyright (c) 2007-2012 The Broad Institute, Inc.
  ~ SOFTWARE COPYRIGHT NOTICE
  ~ This software and its documentation are the copyright of the Broad Institute, Inc. All rights are reserved.
  ~
  ~ This software is supplied without any warranty or guaranteed support whatsoever. The Broad Institute is not responsible for its use, misuse, or functionality.
  ~
  ~ This software is licensed under the terms of the GNU Lesser General Public License (LGPL),
  ~ Version 2.1 which is available at http://www.opensource.org/licenses/lgpl-2.1.php.
  -->

<project name="igvtools" basedir="../." default="create-zips">
    <property name="scripts.dir" value="${basedir}/scripts"/>
    <property name="docs.dir" value="${basedir}/docs"/>
    <property name="tmp.dir" value="tmp"/>
    <property name="main-class" value="org.broad.igv.tools.IgvTools"/>
    <property name="title" value="IGVTools"/>
    <property name="jarname" value="igvtools"/>
    <property name="deploy.dir" value="igvtools-dist"/>
    <property name="genome.dir" value="../server/web/resources/prod/"/>
    <property name="version" value="v0.0"/>
    <property name="build-number" value="0.0"/>

    <import file="${basedir}/build_macros.xml"/>


    <target name="extract-classes">
        <unzip dest="${tmp.dir}">
            <patternset>
                <include name="**/*.class"/>
            </patternset>
            <fileset dir="lib">
                <include name="**/*.jar"/>
            </fileset>
        </unzip>
    </target>

    <target name="init">
        <path id="library.classpath">
            <fileset id="jar.lib" dir="lib"/>
        </path>
    </target>

    <target name="compile" depends="init">
        <delete dir="${tmp.dir}"/>
        <mkdir dir="${tmp.dir}"/>

        <!-- Copy resource files to the tmp directory (.txt files, etc) -->
        <copy todir="${tmp.dir}" overwrite="true">
            <fileset dir="src">
                <exclude name="**/*.form"/>
                <exclude name="**/*.java"/>
                <exclude name="**/*.svn"/>
                <exclude name="**/manifest.mf"/>
            </fileset>
        </copy>

        <javac debug="true" defaultexcludes="false" deprecation="true"
               destdir="${tmp.dir}" optimize="false" proceed="false"
               srcdir="src">
            <classpath refid="library.classpath"/>
        </javac>
    </target>

    <target name="package-jar" depends="compile">
        <antcall target="extract-classes"/>
        <delete dir="${ant.project.name}-dist"/>
        <mkdir dir="${ant.project.name}-dist"/>

        <write_version targetFile="${tmp.dir}/resources/about.properties"/>

        <jar destfile="${ant.project.name}-dist/${jarname}.jar">
            <classfileset dir="${tmp.dir}">
                <root classname="${main-class}"/>
                <root classname="org.apache.log4j.ConsoleAppender"/>
                <rootfileset dir="${tmp.dir}" includes="org/apache/commons/logging/**/*.class"/>
                <rootfileset dir="${tmp.dir}" includes="ncsa/hdf/hdf5lib/exceptions/*.class"/>
                <rootfileset dir="${tmp.dir}" includes="org/broad/igv/itdf/*.class"/>
            </classfileset>
            <fileset dir="${tmp.dir}" includes="resources/**, log4j.properties"/>
            <fileset dir="." includes="docs/**"/>
            <manifest>
                <attribute name="Implementation-Title" value="${title}"/>
                <attribute name="Main-Class" value="${main-class}"/>
            </manifest>
        </jar>
    </target>

    <target name="create-zips" depends="cleanup, compile, package-jar">


        <fileset id="scripts" dir="${scripts.dir}">
            <include name="igvtools"/>
            <include name="igvtools_gui"/>
            <include name="igvtools_gui.command"/>
            <include name="igvtools.bat"/>
            <include name="igvtools_gui.bat"/>
        </fileset>

        <zip destfile="${deploy.dir}/igvtools_${version}.zip" whenempty="fail" defaultexcludes="true">
            <zipfileset dir="${ant.project.name}-dist" includes="${jarname}.jar" prefix="${title}"/>
            <zipfileset refid="scripts" prefix="${title}" filemode="755"/>
            <zipfileset dir="${docs.dir}" includes="igvtools_readme.txt" prefix="${title}"/>
            <zipfileset dir="${genome.dir}" includes="genomes/*.genome" prefix="${title}"/>
        </zip>

        <zip destfile="${deploy.dir}/igvtools_nogenomes_${version}.zip" whenempty="fail" defaultexcludes="true">
            <zipfileset dir="${ant.project.name}-dist" includes="${jarname}.jar" prefix="${title}"/>
            <zipfileset refid="scripts" prefix="${title}" filemode="755"/>
            <zipfileset dir="${docs.dir}" includes="igvtools_readme.txt" prefix="${title}"/>
        </zip>
    </target>

    <target name="deploy" depends="create-zips">
        <copy todir="${deploy.dir}" overwrite="true">
            <fileset dir="${ant.project.name}-dist" includes="*.zip"/>
        </copy>
    </target>

    <target name="cleanup">
        <delete quiet="true">
            <fileset dir="${tmp.dir}"/>
            <fileset dir="${ant.project.name}-dist"/>
        </delete>
    </target>

</project>
<commit_msg>Modify build-tools.xml so by default we don't build with genomes (to be more user friendly and for EA version), and to provide more fine-grained control<commit_after><?xml version="1.0"?>
<!--
  ~ Copyright (c) 2007-2012 The Broad Institute, Inc.
  ~ SOFTWARE COPYRIGHT NOTICE
  ~ This software and its documentation are the copyright of the Broad Institute, Inc. All rights are reserved.
  ~
  ~ This software is supplied without any warranty or guaranteed support whatsoever. The Broad Institute is not responsible for its use, misuse, or functionality.
  ~
  ~ This software is licensed under the terms of the GNU Lesser General Public License (LGPL),
  ~ Version 2.1 which is available at http://www.opensource.org/licenses/lgpl-2.1.php.
  -->

<project name="igvtools" basedir="../." default="create-nogenomes-zip">
    <property name="scripts.dir" value="${basedir}/scripts"/>
    <property name="docs.dir" value="${basedir}/docs"/>
    <property name="tmp.dir" value="tmp"/>
    <property name="main-class" value="org.broad.igv.tools.IgvTools"/>
    <property name="title" value="IGVTools"/>
    <property name="jarname" value="igvtools"/>
    <property name="deploy.dir" value="igvtools-dist"/>
    <property name="genome.dir" value="../server/web/resources/prod/"/>
    <property name="version" value="v0.0"/>
    <property name="build-number" value="0.0"/>

    <import file="${basedir}/build_macros.xml"/>


    <target name="extract-classes">
        <unzip dest="${tmp.dir}">
            <patternset>
                <include name="**/*.class"/>
            </patternset>
            <fileset dir="lib">
                <include name="**/*.jar"/>
            </fileset>
        </unzip>
    </target>

    <target name="init">
        <path id="library.classpath">
            <fileset id="jar.lib" dir="lib"/>
        </path>
    </target>

    <target name="compile" depends="init">
        <delete dir="${tmp.dir}"/>
        <mkdir dir="${tmp.dir}"/>

        <!-- Copy resource files to the tmp directory (.txt files, etc) -->
        <copy todir="${tmp.dir}" overwrite="true">
            <fileset dir="src">
                <exclude name="**/*.form"/>
                <exclude name="**/*.java"/>
                <exclude name="**/*.svn"/>
                <exclude name="**/manifest.mf"/>
            </fileset>
        </copy>

        <javac debug="true" defaultexcludes="false" deprecation="true"
               destdir="${tmp.dir}" optimize="false" proceed="false"
               srcdir="src">
            <classpath refid="library.classpath"/>
        </javac>
    </target>

    <target name="package-jar" depends="compile">
        <antcall target="extract-classes"/>
        <delete dir="${ant.project.name}-dist"/>
        <mkdir dir="${ant.project.name}-dist"/>

        <write_version targetFile="${tmp.dir}/resources/about.properties"/>

        <jar destfile="${ant.project.name}-dist/${jarname}.jar">
            <classfileset dir="${tmp.dir}">
                <root classname="${main-class}"/>
                <root classname="org.apache.log4j.ConsoleAppender"/>
                <rootfileset dir="${tmp.dir}" includes="org/apache/commons/logging/**/*.class"/>
                <rootfileset dir="${tmp.dir}" includes="ncsa/hdf/hdf5lib/exceptions/*.class"/>
                <rootfileset dir="${tmp.dir}" includes="org/broad/igv/itdf/*.class"/>
            </classfileset>
            <fileset dir="${tmp.dir}" includes="resources/**, log4j.properties"/>
            <fileset dir="." includes="docs/**"/>
            <manifest>
                <attribute name="Implementation-Title" value="${title}"/>
                <attribute name="Main-Class" value="${main-class}"/>
            </manifest>
        </jar>
    </target>

    <fileset id="scripts" dir="${scripts.dir}">
        <include name="igvtools"/>
        <include name="igvtools_gui"/>
        <include name="igvtools_gui.command"/>
        <include name="igvtools.bat"/>
        <include name="igvtools_gui.bat"/>
    </fileset>

    <target name="create-genomes-zip" depends="cleanup, compile, package-jar">
        <zip destfile="${deploy.dir}/igvtools_${version}.zip" whenempty="fail" defaultexcludes="true">
            <zipfileset dir="${ant.project.name}-dist" includes="${jarname}.jar" prefix="${title}"/>
            <zipfileset refid="scripts" prefix="${title}" filemode="755"/>
            <zipfileset dir="${docs.dir}" includes="igvtools_readme.txt" prefix="${title}"/>
            <zipfileset dir="${genome.dir}" includes="genomes/*.genome" prefix="${title}"/>
        </zip>
    </target>

    <target name="create-nogenomes-zip" depends="cleanup, compile, package-jar">
        <zip destfile="${deploy.dir}/igvtools_nogenomes_${version}.zip" whenempty="fail" defaultexcludes="true">
            <zipfileset dir="${ant.project.name}-dist" includes="${jarname}.jar" prefix="${title}"/>
            <zipfileset refid="scripts" prefix="${title}" filemode="755"/>
            <zipfileset dir="${docs.dir}" includes="igvtools_readme.txt" prefix="${title}"/>
        </zip>
    </target>


    <target name="create-both-zips" depends="create-genomes-zip, create-nogenomes-zip"/>

    <target name="deploy" depends="create-both-zips">
        <copy todir="${deploy.dir}" overwrite="true">
            <fileset dir="${ant.project.name}-dist" includes="*.zip"/>
        </copy>
    </target>

    <target name="cleanup">
        <delete quiet="true">
            <fileset dir="${tmp.dir}"/>
            <fileset dir="${ant.project.name}-dist"/>
        </delete>
    </target>

</project>

{'fraction_non_alphanumeric': 0.18669369701437524, 'fraction_numerical': 0.004976041282712864, 'mean_word_length': 2.5960901259111995, 'pattern_counts': {'":': 0, '<': 202, '<?xml version=': 2, '>': 202, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 5}, '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': '6238987', 'n_tokens_mistral': 3225, 'n_tokens_neox': 3085, 'n_words': 642}