<commit_before><project name="aws-tasks" default="test">

	<!--
	  Copyright 2010 the original author or authors.

	  Licensed under the Apache License, Version 2.0 (the "License");
	  you may not use this file except in compliance with the License.
	  You may obtain a copy of the License at

	  http://www.apache.org/licenses/LICENSE-2.0

	  Unless required by applicable law or agreed to in writing, software
	  distributed under the License is distributed on an "AS IS" BASIS,
	  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	  See the License for the specific language governing permissions and
	  limitations under the License.
	-->

	<property name="root.dir" value="${basedir}" />
	<property file="${root.dir}/build.properties" />
	<import file="${root.dir}/build.util.xml" />



	<!-- ================================================================== -->
	<!-- Classpath 				                                            -->
	<!-- ================================================================== -->

	<path id="compile.classpath">
		<fileset dir="${lib.dir}/compile">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
		<fileset dir="${lib.dir}/provided">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>
	<path id="test.classpath">
		<fileset dir="${lib.dir}/test">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>
	<path id="provided.classpath">
		<fileset dir="${lib.dir}/provided">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>
	<path id="build.classpath">
		<fileset dir="${lib.dir}/build">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>



	<!-- ================================================================== -->
	<!-- General cleaning sources                                           -->
	<!-- ================================================================== -->

	<target name="clean" description="--> clean project build files">
		<echo>cleaning ${ant.project.name}</echo>
		<delete includeemptydirs="true" failonerror="false">
			<fileset dir="${build.dir}" excludes="classes-*-eclipse/" />
		</delete>
	</target>



	<!-- ================================================================== -->
	<!-- Build sources                                                      -->
	<!-- ================================================================== -->

	<target name="compile" description="--> compile main classes">
		<mkdir dir="${build.dir.main-classes}" />
		<javac encoding="${build.encoding}" srcdir="${main.src.dir}" includes="**/*.java" destdir="${build.dir.main-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="compile.classpath" />
		</javac>
		<copy todir="${build.dir.main-classes}">
			<fileset dir="${main.res.dir}"/>
		</copy>
	</target>

	<target name="compile-examples" description="--> compile example classes">
		<mkdir dir="${build.dir.examples-classes}" />
		<javac encoding="${build.encoding}" srcdir="${examples.src.dir}" includes="**/*.java" destdir="${build.dir.examples-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="test.classpath" />
			<classpath refid="compile.classpath" />
			<classpath refid="test.path" />
		</javac>
	</target>



	<!-- ================================================================== -->
	<!-- Build sources                                                      -->
	<!-- ================================================================== -->

	<target name="check-header" description="--> check header">
		<exec command="bash src/build/ant/checkHeaders.sh ${basedir}/src" failonerror="true"/>
	</target>



	<!-- ================================================================== -->
	<!-- Unit Tests                                                         -->
	<!-- ================================================================== -->

	<target name="compile-test" depends="check-header,compile">
		<echo>*** Building Unit Tests Sources ***</echo>
		<mkdir dir="${build.dir.test-classes}" />
		<path id="test.path">
			<pathelement location="${build.dir.main-classes}" />
		</path>

		<javac encoding="${build.encoding}" srcdir="${test.src.dir}" includes="**/*.java" destdir="${build.dir.test-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="test.classpath" />
			<classpath refid="compile.classpath" />
			<classpath refid="test.path" />
		</javac>
		<javac encoding="${build.encoding}" srcdir="${it.src.dir}" includes="**/*.java" destdir="${build.dir.test-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="test.classpath" />
			<classpath refid="compile.classpath" />
			<classpath refid="test.path" />
		</javac>
	</target>

	<target name="test" depends="unit, it" description="--> run unit &amp; integration tests" />

	<target name="unit" description="--> run unit tests">
		<antcall target="runTests" >
			<param name="test.batch.dir" value="${test.src.dir}" />
		</antcall>
	</target>

	<target name="it" description="--> run integration tests">
		<property name="ec2.properties" value="${it.res.dir}/ec2.properties"/>
		<available file="${ec2.properties}" property="ec2.configured" value="true"/>
		<fail unless="ec2.configured" message="please create and edit ${ec2.properties} to run integration tests (see ${ec2.properties}.template)"/>

        <antcall target="runTests">
            <param name="build.dir.test-reports" value="${build.dir.it-reports}" />
            <param name="build.dir.test-classes" value="${build.dir.it-classes}" />
            <param name="test.res.dir" value="${it.res.dir}" />
        	<!--<param name="test.src.dir" value="${it.src.dir}" />-->
        	<param name="test.batch.dir" value="${it.src.dir}" />
        </antcall>
    </target>

	<target name="runTests" depends="compile-test">
		<delete dir="${build.dir.test-reports}" />
		<mkdir dir="${build.dir.test-reports}" />

		<junit showoutput="false" printsummary="yes" haltonfailure="no" fork="yes" maxmemory="256m" dir="${basedir}" errorProperty="tests.failed" failureProperty="tests.failed">
			<sysproperty key="net.sourceforge.cobertura.datafile" file="${reports.dir}/aws-tasks.ser" />
			<classpath>
				<pathelement location="${instrumented.dir}" />
				<pathelement location="${build.dir.main-classes}" />
				<pathelement location="${build.dir.test-classes}" />
				<pathelement location="${test.res.dir}" />
				<pathelement location="${main.res.dir}" />
				<path refid="test.classpath" />
				<path refid="compile.classpath" />
			</classpath>
			<formatter type="plain" />
			<batchtest fork="yes" todir="${build.dir.test-reports}" unless="testcase">
				<fileset dir="${test.batch.dir}">
					<include name="**/*Test.java" unless="testcase" />
					<exclude name="**/Abstract*.java" unless="testcase" />
					<include name="${testcase}" if="testcase" />
				</fileset>
			</batchtest>
			<batchtest fork="yes" todir="${build.dir.test-reports}" if="testcase">
				<fileset dir="${test.batch.dir}" includes="**/${testcase}.java" />
			</batchtest>
		</junit>
		<fail if="tests.failed">Tests failed!</fail>
	</target>



	<!-- ================================================================== -->
	<!-- Build jar from sources                                             -->
	<!-- ================================================================== -->

	<target name="jars" depends="jar,jar-sources" description="--> create the aws-tasks + source jar"/>
	
	<target name="jar" depends="compile" description="--> create the aws-tasks jar">
		<buildJar jarname="${jar.name}" mainclasses="${build.dir.main-classes}"/>
	</target>
	
	<target name="jar-sources" description="--> create the aws-tasks sources jar">
        <buildJar jarname="${jar.sources.name}" mainclasses="${main.src.dir}" />
    </target>
	
	<!-- ================================================================== -->
	<!-- Java Doc                                                           -->
	<!-- ================================================================== -->

	<target name="doc" depends="compile" description="--> create javadoc">
		<mkdir dir="${build.javadoc}" />
		<javadoc packagenames="${javadoc.package}" destdir="${build.javadoc}" author="true" version="true" use="true" windowtitle="${name} ${version} API" doctitle="${name} ${version} API" bottom="Copyright &amp;copy; ${javadoc.year} ???">
			<packageset dir="${main.src.dir}" />
			<link href="${javadoc.link.java}" />
			<classpath>
				<path refid="compile.classpath" />
			</classpath>
			<group title="${javadoc.title}" packages="${javadoc.package}*" />
		</javadoc>
	</target>

	<!-- ================================================================== -->
	<!-- Generate a distribution                                            -->
	<!-- ================================================================== -->

	<target name="upgradeAwsSdk" description="--> upgrades the aws-sdk libs">
		<property name="sdkDownload" value="${build.dir}/aws-java-sdk.zip"/>
		<get src="http://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip" 
		    dest="${sdkDownload}"/>
		<unzip src="${sdkDownload}"
		       dest="${build.dir}">
		</unzip>
		<delete>
		    <fileset dir="lib/compile/aws-sdk" includes="aws-java-sdk-*.jar"/>
		 </delete>
		<copy todir="lib/compile/aws-sdk" flatten="true">
		    <fileset dir="${build.dir}">
		    	<include name="aws-java-sdk-*/lib/aws-java-sdk-*.jar"/>
		    	<exclude name="aws-java-sdk-*/lib/aws-java-sdk-*javadoc.jar"/>
		    	<exclude name="aws-java-sdk-*/lib/aws-java-sdk-flow*.jar"/>
	    	</fileset>
	    </copy>
		
		<echo message="Updating of the core jars done! Please compare ${build.dir}/aws-java-sdk-*/third-party and lib/compile/aws-sdk for changed third-party dependencies!"/>
	</target>


	<!-- ================================================================== -->
	<!-- Generate a distribution                                            -->
	<!-- ================================================================== -->

	<target name="dist" depends="check-header, jar, doc" description="--> build distribution">
		<defaultexcludes add="**/.git/**,**/.gitignore"/>
		<delete dir="${build.dir.dist}" />

		<!-- create target directory -->
		<mkdir dir="${build.dir.dist}" />
		<mkdir dir="${build.dir.dist}/docs" />
		<mkdir dir="${build.dir.dist}/docs/javadoc" />
		<mkdir dir="${build.dir.dist}/lib" />
		<mkdir dir="${build.dir.dist}/src" />

		<!-- copy  javadoc to target dir  -->
		<copy todir="${build.dir.dist}/docs/javadoc">
			<fileset dir="${build.javadoc}" />
		</copy>
		<!-- copy jars -->
		<copy todir="${build.dir.dist}/lib" flatten="true">
			<fileset dir="${lib.dir}/compile" >
				<exclude name="*-sources.jar"/>
			</fileset>
		</copy>
		<!-- copy src -->
		<copy todir="${build.dir.dist}/src">
			<fileset dir="${basedir}/src">
				<include name="main/**"/>
				<include name="examples/**"/>
				<exclude name="it/resources/ec2.properties"/>
			</fileset>
		</copy>
		<!-- copy to dist dir -->
		<copy todir="${build.dir.dist}">
			<fileset file="${build.dir}/${jar.name}" />
			<fileset file="${basedir}/LICENSE" />
			<fileset file="${basedir}/README.markdown" />
			<fileset file="${it.res.dir}/ec2.properties.template" />
		</copy>


		<tar longfile="gnu" compression="gzip" destfile="${build.release.file}" >
		    <tarfileset dir="${build.dir.dist}" prefix="${name}-${version}">
		    </tarfileset>
		</tar>
	</target>



	<!-- ================================================================== -->
	<!-- Generating eclipse file                                            -->
	<!-- ================================================================== -->

	<target name="eclipse" depends="clean-eclipse" description="--> create Eclipse project files">
		<taskdef name="eclipse" classname="prantl.ant.eclipse.EclipseTask" classpathref="build.classpath" />
		<mkdir dir="${build.dir.main-classes-eclipse}" />
		<mkdir dir="${build.dir.test-classes-eclipse}" />
		<mkdir dir="${build.dir.it-classes-eclipse}" />
		<eclipse updatealways="true">
			<settings>
				<jdtcore compilercompliance="6.0" />
				<resources encoding="UTF-8" />
			</settings>
			<project name="${ant.project.name}" />
			<classpath>
				<container path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" />

				<source path="${basedir}/${main.src.dir}" output="${build.dir.main-classes-eclipse}" />
				<source path="${basedir}/${main.res.dir}" output="${build.dir.main-classes-eclipse}" />
				<source path="${basedir}/${examples.java.src.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${examples.ant.src.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${test.src.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${test.res.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${it.src.dir}" output="${build.dir.it-classes-eclipse}" />
				<source path="${basedir}/${it.res.dir}" output="${build.dir.it-classes-eclipse}" />

				<output path="${build.dir.main-classes-eclipse}" />
				<library pathref="test.classpath" exported="false" />
				<library pathref="compile.classpath" />
			</classpath>
		</eclipse>
		<concat destfile="${root.dir}/.settings/org.eclipse.jdt.core.prefs" append="true">
			<filelist dir="${root.dir}/src/build/eclipse/" files="eclipse-formatter" />
		</concat>
		<copy file="${root.dir}/src/build/eclipse/org.eclipse.jdt.ui.prefs" todir="${root.dir}/.settings" />
		<replace file="${root.dir}/.settings/org.eclipse.jdt.core.prefs" token="org.eclipse.jdt.core.compiler.compliance=6.0" value="org.eclipse.jdt.core.compiler.compliance=1.6" />
		<replaceregexp file=".classpath" match="path=&quot;(.*).jar&quot;" replace="path=&quot;\1.jar&quot; sourcepath=&quot;\1-sources.jar&quot;" flags="g" /><commit_msg>* update minimum required java version to 1.7 in eclipse setup<commit_after><project name="aws-tasks" default="test">

	<!--
	  Copyright 2010 the original author or authors.

	  Licensed under the Apache License, Version 2.0 (the "License");
	  you may not use this file except in compliance with the License.
	  You may obtain a copy of the License at

	  http://www.apache.org/licenses/LICENSE-2.0

	  Unless required by applicable law or agreed to in writing, software
	  distributed under the License is distributed on an "AS IS" BASIS,
	  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	  See the License for the specific language governing permissions and
	  limitations under the License.
	-->

	<property name="root.dir" value="${basedir}" />
	<property file="${root.dir}/build.properties" />
	<import file="${root.dir}/build.util.xml" />



	<!-- ================================================================== -->
	<!-- Classpath 				                                            -->
	<!-- ================================================================== -->

	<path id="compile.classpath">
		<fileset dir="${lib.dir}/compile">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
		<fileset dir="${lib.dir}/provided">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>
	<path id="test.classpath">
		<fileset dir="${lib.dir}/test">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>
	<path id="provided.classpath">
		<fileset dir="${lib.dir}/provided">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>
	<path id="build.classpath">
		<fileset dir="${lib.dir}/build">
			<include name="**/*.jar" />
			<exclude name="**/*-sources.jar" />
		</fileset>
	</path>



	<!-- ================================================================== -->
	<!-- General cleaning sources                                           -->
	<!-- ================================================================== -->

	<target name="clean" description="--> clean project build files">
		<echo>cleaning ${ant.project.name}</echo>
		<delete includeemptydirs="true" failonerror="false">
			<fileset dir="${build.dir}" excludes="classes-*-eclipse/" />
		</delete>
	</target>



	<!-- ================================================================== -->
	<!-- Build sources                                                      -->
	<!-- ================================================================== -->

	<target name="compile" description="--> compile main classes">
		<mkdir dir="${build.dir.main-classes}" />
		<javac encoding="${build.encoding}" srcdir="${main.src.dir}" includes="**/*.java" destdir="${build.dir.main-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="compile.classpath" />
		</javac>
		<copy todir="${build.dir.main-classes}">
			<fileset dir="${main.res.dir}"/>
		</copy>
	</target>

	<target name="compile-examples" description="--> compile example classes">
		<mkdir dir="${build.dir.examples-classes}" />
		<javac encoding="${build.encoding}" srcdir="${examples.src.dir}" includes="**/*.java" destdir="${build.dir.examples-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="test.classpath" />
			<classpath refid="compile.classpath" />
			<classpath refid="test.path" />
		</javac>
	</target>



	<!-- ================================================================== -->
	<!-- Build sources                                                      -->
	<!-- ================================================================== -->

	<target name="check-header" description="--> check header">
		<exec command="bash src/build/ant/checkHeaders.sh ${basedir}/src" failonerror="true"/>
	</target>



	<!-- ================================================================== -->
	<!-- Unit Tests                                                         -->
	<!-- ================================================================== -->

	<target name="compile-test" depends="check-header,compile">
		<echo>*** Building Unit Tests Sources ***</echo>
		<mkdir dir="${build.dir.test-classes}" />
		<path id="test.path">
			<pathelement location="${build.dir.main-classes}" />
		</path>

		<javac encoding="${build.encoding}" srcdir="${test.src.dir}" includes="**/*.java" destdir="${build.dir.test-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="test.classpath" />
			<classpath refid="compile.classpath" />
			<classpath refid="test.path" />
		</javac>
		<javac encoding="${build.encoding}" srcdir="${it.src.dir}" includes="**/*.java" destdir="${build.dir.test-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
			<compilerarg line="${javac.args} ${javac.args.warnings}" />
			<classpath refid="test.classpath" />
			<classpath refid="compile.classpath" />
			<classpath refid="test.path" />
		</javac>
	</target>

	<target name="test" depends="unit, it" description="--> run unit &amp; integration tests" />

	<target name="unit" description="--> run unit tests">
		<antcall target="runTests" >
			<param name="test.batch.dir" value="${test.src.dir}" />
		</antcall>
	</target>

	<target name="it" description="--> run integration tests">
		<property name="ec2.properties" value="${it.res.dir}/ec2.properties"/>
		<available file="${ec2.properties}" property="ec2.configured" value="true"/>
		<fail unless="ec2.configured" message="please create and edit ${ec2.properties} to run integration tests (see ${ec2.properties}.template)"/>

        <antcall target="runTests">
            <param name="build.dir.test-reports" value="${build.dir.it-reports}" />
            <param name="build.dir.test-classes" value="${build.dir.it-classes}" />
            <param name="test.res.dir" value="${it.res.dir}" />
        	<!--<param name="test.src.dir" value="${it.src.dir}" />-->
        	<param name="test.batch.dir" value="${it.src.dir}" />
        </antcall>
    </target>

	<target name="runTests" depends="compile-test">
		<delete dir="${build.dir.test-reports}" />
		<mkdir dir="${build.dir.test-reports}" />

		<junit showoutput="false" printsummary="yes" haltonfailure="no" fork="yes" maxmemory="256m" dir="${basedir}" errorProperty="tests.failed" failureProperty="tests.failed">
			<sysproperty key="net.sourceforge.cobertura.datafile" file="${reports.dir}/aws-tasks.ser" />
			<classpath>
				<pathelement location="${instrumented.dir}" />
				<pathelement location="${build.dir.main-classes}" />
				<pathelement location="${build.dir.test-classes}" />
				<pathelement location="${test.res.dir}" />
				<pathelement location="${main.res.dir}" />
				<path refid="test.classpath" />
				<path refid="compile.classpath" />
			</classpath>
			<formatter type="plain" />
			<batchtest fork="yes" todir="${build.dir.test-reports}" unless="testcase">
				<fileset dir="${test.batch.dir}">
					<include name="**/*Test.java" unless="testcase" />
					<exclude name="**/Abstract*.java" unless="testcase" />
					<include name="${testcase}" if="testcase" />
				</fileset>
			</batchtest>
			<batchtest fork="yes" todir="${build.dir.test-reports}" if="testcase">
				<fileset dir="${test.batch.dir}" includes="**/${testcase}.java" />
			</batchtest>
		</junit>
		<fail if="tests.failed">Tests failed!</fail>
	</target>



	<!-- ================================================================== -->
	<!-- Build jar from sources                                             -->
	<!-- ================================================================== -->

	<target name="jars" depends="jar,jar-sources" description="--> create the aws-tasks + source jar"/>
	
	<target name="jar" depends="compile" description="--> create the aws-tasks jar">
		<buildJar jarname="${jar.name}" mainclasses="${build.dir.main-classes}"/>
	</target>
	
	<target name="jar-sources" description="--> create the aws-tasks sources jar">
        <buildJar jarname="${jar.sources.name}" mainclasses="${main.src.dir}" />
    </target>
	
	<!-- ================================================================== -->
	<!-- Java Doc                                                           -->
	<!-- ================================================================== -->

	<target name="doc" depends="compile" description="--> create javadoc">
		<mkdir dir="${build.javadoc}" />
		<javadoc packagenames="${javadoc.package}" destdir="${build.javadoc}" author="true" version="true" use="true" windowtitle="${name} ${version} API" doctitle="${name} ${version} API" bottom="Copyright &amp;copy; ${javadoc.year} ???">
			<packageset dir="${main.src.dir}" />
			<link href="${javadoc.link.java}" />
			<classpath>
				<path refid="compile.classpath" />
			</classpath>
			<group title="${javadoc.title}" packages="${javadoc.package}*" />
		</javadoc>
	</target>

	<!-- ================================================================== -->
	<!-- Generate a distribution                                            -->
	<!-- ================================================================== -->

	<target name="upgradeAwsSdk" description="--> upgrades the aws-sdk libs">
		<property name="sdkDownload" value="${build.dir}/aws-java-sdk.zip"/>
		<get src="http://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip" 
		    dest="${sdkDownload}"/>
		<unzip src="${sdkDownload}"
		       dest="${build.dir}">
		</unzip>
		<delete>
		    <fileset dir="lib/compile/aws-sdk" includes="aws-java-sdk-*.jar"/>
		 </delete>
		<copy todir="lib/compile/aws-sdk" flatten="true">
		    <fileset dir="${build.dir}">
		    	<include name="aws-java-sdk-*/lib/aws-java-sdk-*.jar"/>
		    	<exclude name="aws-java-sdk-*/lib/aws-java-sdk-*javadoc.jar"/>
		    	<exclude name="aws-java-sdk-*/lib/aws-java-sdk-flow*.jar"/>
	    	</fileset>
	    </copy>
		
		<echo message="Updating of the core jars done! Please compare ${build.dir}/aws-java-sdk-*/third-party and lib/compile/aws-sdk for changed third-party dependencies!"/>
	</target>


	<!-- ================================================================== -->
	<!-- Generate a distribution                                            -->
	<!-- ================================================================== -->

	<target name="dist" depends="check-header, jar, doc" description="--> build distribution">
		<defaultexcludes add="**/.git/**,**/.gitignore"/>
		<delete dir="${build.dir.dist}" />

		<!-- create target directory -->
		<mkdir dir="${build.dir.dist}" />
		<mkdir dir="${build.dir.dist}/docs" />
		<mkdir dir="${build.dir.dist}/docs/javadoc" />
		<mkdir dir="${build.dir.dist}/lib" />
		<mkdir dir="${build.dir.dist}/src" />

		<!-- copy  javadoc to target dir  -->
		<copy todir="${build.dir.dist}/docs/javadoc">
			<fileset dir="${build.javadoc}" />
		</copy>
		<!-- copy jars -->
		<copy todir="${build.dir.dist}/lib" flatten="true">
			<fileset dir="${lib.dir}/compile" >
				<exclude name="*-sources.jar"/>
			</fileset>
		</copy>
		<!-- copy src -->
		<copy todir="${build.dir.dist}/src">
			<fileset dir="${basedir}/src">
				<include name="main/**"/>
				<include name="examples/**"/>
				<exclude name="it/resources/ec2.properties"/>
			</fileset>
		</copy>
		<!-- copy to dist dir -->
		<copy todir="${build.dir.dist}">
			<fileset file="${build.dir}/${jar.name}" />
			<fileset file="${basedir}/LICENSE" />
			<fileset file="${basedir}/README.markdown" />
			<fileset file="${it.res.dir}/ec2.properties.template" />
		</copy>


		<tar longfile="gnu" compression="gzip" destfile="${build.release.file}" >
		    <tarfileset dir="${build.dir.dist}" prefix="${name}-${version}">
		    </tarfileset>
		</tar>
	</target>



	<!-- ================================================================== -->
	<!-- Generating eclipse file                                            -->
	<!-- ================================================================== -->

	<target name="eclipse" depends="clean-eclipse" description="--> create Eclipse project files">
		<taskdef name="eclipse" classname="prantl.ant.eclipse.EclipseTask" classpathref="build.classpath" />
		<mkdir dir="${build.dir.main-classes-eclipse}" />
		<mkdir dir="${build.dir.test-classes-eclipse}" />
		<mkdir dir="${build.dir.it-classes-eclipse}" />
		<eclipse updatealways="true">
			<settings>
				<jdtcore compilercompliance="6.0" />
				<resources encoding="UTF-8" />
			</settings>
			<project name="${ant.project.name}" />
			<classpath>
				<container path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" />

				<source path="${basedir}/${main.src.dir}" output="${build.dir.main-classes-eclipse}" />
				<source path="${basedir}/${main.res.dir}" output="${build.dir.main-classes-eclipse}" />
				<source path="${basedir}/${examples.java.src.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${examples.ant.src.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${test.src.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${test.res.dir}" output="${build.dir.test-classes-eclipse}" />
				<source path="${basedir}/${it.src.dir}" output="${build.dir.it-classes-eclipse}" />
				<source path="${basedir}/${it.res.dir}" output="${build.dir.it-classes-eclipse}" />

				<output path="${build.dir.main-classes-eclipse}" />
				<library pathref="test.classpath" exported="false" />
				<library pathref="compile.classpath" />
			</classpath>
		</eclipse>
		<concat destfile="${root.dir}/.settings/org.eclipse.jdt.core.prefs" append="true">
			<filelist dir="${root.dir}/src/build/eclipse/" files="eclipse-formatter" />
		</concat>
		<copy file="${root.dir}/src/build/eclipse/org.eclipse.jdt.ui.prefs" todir="${root.dir}/.settings" />
		<replace file="${root.dir}/.settings/org.eclipse.jdt.core.prefs" token="org.eclipse.jdt.core.compiler.compliance=6.0" value="org.eclipse.jdt.core.compiler.compliance=1.7" />
		<replace file="${root.dir}/.settings/org.eclipse.jdt.core.prefs" token="org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6" value="org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7" />
		<replace file="${root.dir}/.settings/org.eclipse.jdt.core.prefs" token="org.eclipse.jdt.core.compiler.source=1.6" value="org.eclipse.jdt.core.compiler.source=1.7" />
		<replaceregexp file=".classpath" match="path=&quot;(.*).jar&quot;" replace="path=&quot;\1.jar&quot; sourcepath=&quot;\1-sources.jar&quot;" flags="g" />
{'fraction_non_alphanumeric': 0.29060977658323534, 'fraction_numerical': 0.0024189484293633463, 'mean_word_length': 3.736791852323361, 'pattern_counts': {'":': 0, '<': 537, '<?xml version=': 0, '>': 565, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 46, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3537346', 'n_tokens_mistral': 9649, 'n_tokens_neox': 8517, 'n_words': 1490}