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

<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.        -->
<!-- ====================================================================== -->
<project name="ISO21090"  basedir="." xmlns:ivy="antlib:fr.jayasoft.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">

	<!-- ====================================================================== -->
	<!-- Cleaning up target                                                     -->
	<!-- ====================================================================== -->

	<!-- Ivy -->
	<property name="software.dir" value="${basedir}"/>
	<property name="ivy.dir" location="${software.dir}/ivy" />
	<property name="ivy.settings.file" location="${ivy.dir}/cbiit-ivy-settings-with-cagrid13.xml" />
	<property name="local.repo.dir" value="${software.dir}/local-ivy-repo" />
	<property name="target.dir" value="target"/>
	<property name="target.lib" value="${target.dir}/target/lib" />
	<property name="local.ivy.repo" value="${local.repo.dir}" />

	<!-- Project properties -->
	<property name="release.version"			value="2.1" />
	<property name="release.src.package.file.name"	value="iso21090.src.2.1.zip" />
	<property name="build.finalName"			value="iso-datatypes" />
	<property name="build.dir"					value="${basedir}/target" />
	<property name="lib.dir"					value="${build.dir}/lib" />
	<property name="src.dir"					value="${basedir}/src/main/java" />
	<property name="src.test.dir"				value="${basedir}/src/test/java" />
	<property name="resources.dir"				value="${basedir}/src/main/resources" />
	<property name="resources.test.dir"			value="${basedir}/src/test/resources" />
	<property name="build.outputDir"			value="${build.dir}/classes" />
	<property name="build.testOutputDir"		value="${build.dir}/test-classes" />
	<property name="build.instrumented.dir"		value="${build.dir}/instrumented" />
	<property name="test.reports"				value="${build.dir}/test-reports" />
	<property name="reporting.outputDirectory"	value="${build.dir}/site" />
	<property name="settings.offline"			value="false" />
	<property name="settings.interactiveMode"	value="true" />
	<property name="checkstyle.src.dir"			value="${basedir}/src/main/java" />
	<property name="checkstyle.config.file"		value="${basedir}/src/main/resources/Checkstyle-5.xml" />
	<property name="checkstyle.style.file"		value="${basedir}/src/main/resources/checkstyle.xsl" />
	<property name="checkstyle.report.dir"	value="${basedir}/target/report" />
	<property name="checkstyle.report.xml.file"	value="${basedir}/target/report/checkstyle_report.xml" />
	<property name="checkstyle.report.html.file" value="${basedir}/target/report/checkstyle_report.html" />
	<property name="pmd.src.dir"				value="${basedir}/src/main/java" />
	<property name="pmd.report.dir"				value="${basedir}/target/report" />
	<property name="pmd.config.file"			value="${basedir}/src/main/resources/Pmd.xml" />
	<property name="pmd.report.xml.file"		value="${basedir}/target/report/pmd_report.xml" />
	<property name="pmd.report.html.file"		value="${basedir}/target/report/pmd_report.html" />
	<property name="cobertura.src.dir"			value="${basedir}/src/main/java" />

	<!-- ====================================================================== -->
	<!-- Defining classpaths                                                    -->
	<!-- ====================================================================== -->

	<path id="build.classpath">
		<fileset dir="${lib.dir}/compile" includes="*.jar" excludes="ant-1.6.jar"/>
	</path>
	<path id="build.test.classpath">
		<fileset dir="${lib.dir}/compile" includes="*.jar" excludes="ant-1.6.jar"/>
		<fileset dir="${lib.dir}/static-analysis" includes="*.jar" excludes="ant-1.6.jar"/>
		<fileset dir="${lib.dir}/test" includes="*.jar" />
	</path>
	<path id="ivy.classpath">
		<fileset dir="${ivy.dir}/lib" includes="*.jar" />
	</path>

	<path id="static.analysis.classpath">
		<fileset dir="${lib.dir}/static-analysis" includes="**/*.jar" />

	</path>

	<!-- ====================================================================== -->
	<!-- Init target                                                     -->
	<!-- ====================================================================== -->
	<target name="init">
		<mkdir dir="${local.repo.dir}"/>

		<echo message="Locating IVY library from ${ivy.dir}"/>
		<echo message="Configuring IVY from ${ivy.settings.file}"/>
		<taskdef uri="antlib:fr.jayasoft.ivy.ant" resource="fr/jayasoft/ivy/ant/antlib.xml" classpathref="ivy.classpath" />
		<ivy:settings file="${ivy.settings.file}" />

		<ivy:resolve refresh="true" conf="static-analysis" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="static-analysis" />

		<taskdef resource="checkstyletask.properties" uri="antlib:com.puppycrawl.tools.checkstyle" classpathref="static.analysis.classpath" />
		<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="static.analysis.classpath" />
		<taskdef resource="tasks.properties" classpathref="static.analysis.classpath" />
		

	</target>
	<target name="get-dependency-jars" depends="init">
		<ivy:resolve refresh="true" conf="compile" />
		<ivy:resolve refresh="true" conf="runtime" />
		<ivy:resolve refresh="true" conf="static-analysis" />
		<ivy:resolve refresh="true" conf="test" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="compile" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="runtime" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="static-analysis" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="test" />

	</target>

	<target name="pre-compile"  description="Do nothing. Extend in sub-build">
		<!-- to be extended by sub projects/build.-->
	</target>
	<target name="compile" depends="init,get-dependency-jars,pre-compile" description="Compile the code">
		<mkdir dir="${build.outputDir}" />
		<javac destdir="${build.outputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.5" verbose="false" fork="false" source="1.5">
			<src>
				<pathelement location="${src.dir}" />
			</src>
			<classpath refid="build.classpath" />
		</javac>
		<copy todir="${build.outputDir}">
			<fileset dir="${resources.dir}" />
		</copy>
	</target>
	<target name="jar" depends="compile">
		
		<property name="version.num" value="2.1"/>
		<manifest file="MANIFEST.MF">
		        <attribute name="Built-By" value="CBIIT ISO21090 Team"/>
		        <attribute name="Implementation-Version" value="${version.num}"/>
		</manifest>

		
		<jar jarfile="${build.dir}/${build.finalName}.jar" compress="true" index="false" basedir="${build.outputDir}" excludes="**/dist.html"  manifest="MANIFEST.MF"/>
	</target>
	<target name="publish-local" depends="jar, publish-resources" description=" Publish Local">
		<ivy:publish resolver="local-project-repo" pubrevision="${release.version}" status="release" update="true" overwrite="true">
			<artifacts pattern="${target.dir}/[module]-[revision].[ext]" />
			<artifacts pattern="${target.dir}/[artifact].[ext]" />
		</ivy:publish>
	</target>

	<target name="publish-resources" />
	
	
	<target name="package" >
		<delete failonerror="false" file="../release/${release.src.package.file.name}"/>
		<zip destfile="../release/${release.src.package.file.name}"
		       basedir="."
		       excludes="**/.svn/* **/*.class **/target/*"
		/>
	</target>

	
	
	<!-- ====================================================================== -->
	<!-- Cleaning up target                                                     -->
	<!-- ====================================================================== -->

	<target name="clean" description="Clean the output directory">
		<delete dir="${build.dir}" />
		<delete dir="${lib.dir}/compile" />
		<delete dir="${lib.dir}/runtime" />
		<delete dir="${lib.dir}/static-analysis" />
		<delete dir="${lib.dir}/test" />
	</target>

	<!-- ====================================================================== -->
	<!-- Test-compilation target                                                -->
	<!-- ====================================================================== -->

	<target name="compile-tests" depends="compile" description="Compile the test code" unless="test.skip">
		<mkdir dir="${build.testOutputDir}" />
		<javac destdir="${build.testOutputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.5" verbose="false" fork="false" source="1.5">
			<src>
				<pathelement location="${src.test.dir}" />
			</src>
			<classpath>
				<path refid="build.test.classpath" />
				<pathelement location="${build.outputDir}" />
			</classpath>
		</javac>
		<copy todir="${build.testOutputDir}">
			<fileset dir="${resources.test.dir}" />
		</copy>
	</target>

	<!-- ====================================================================== -->
	<!-- Run all tests                                                          -->
	<!-- ====================================================================== -->

	<target name="test" depends="compile-tests, junit-missing" unless="junit.skipped" description="Run the test cases">
		<mkdir dir="${test.reports}" />
		<cobertura-instrument todir="${build.instrumented.dir}" datafile="${target.dir}/cobertura.ser" classpathref="static.analysis.classpath">
			<fileset dir="${build.outputDir}">
				<include name="**/*.class" />
			</fileset>
		</cobertura-instrument>

		<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true">
			<sysproperty key="net.sourceforge.cobertura.datafile" file="${target.dir}/cobertura.ser" />

			<formatter type="xml" />
			<classpath>
				<path refid="build.test.classpath" />

				<pathelement location="${build.instrumented.dir}" />
				<pathelement location="${build.outputDir}" />
				<pathelement location="${build.testOutputDir}" />
				<fileset dir="${lib.dir}/runtime" includes="*.jar" />

			</classpath>
			<batchtest todir="${test.reports}">
				<fileset dir="${src.test.dir}">
					<include name="**/Test*.java" />
					<include name="**/*Test.java" />
					<include name="**/*TestCase.java" />
					<exclude name="**/*Abstract*Test.java" />
				</fileset>
			</batchtest>
			<batchtest todir="${test.reports}">
				<fileset dir="${src.test.dir}">
					<include name="**/*Test.java" />
					<exclude name="**/*Abstract*Test.java" />
				</fileset>
			</batchtest>
		</junit>
	</target>

	<target name="test-junit-present">
		<available file="${src.test.dir}" type="dir" property="junit.present" />

		<condition property="checkstyle.analysis.skip">
			<or>
				<isfalse value="${junit.present}" />
				<istrue value="${test.skip}" />
			</or>
		</condition>
		<condition property="cobertura.analysis.skip">
			<or>
				<isfalse value="${junit.present}" />
				<istrue value="${test.skip}" />
			</or>
		</condition>
	</target>

	<target name="test-junit-status" depends="test-junit-present">
		<condition property="junit.missing">
			<and>
				<isfalse value="${junit.present}" />
				<isfalse value="${test.skip}" />
			</and>
		</condition>
		<condition property="junit.skipped">
			<or>
				<isfalse value="${junit.present}" />
				<istrue value="${test.skip}" />
			</or>
		</condition>
	</target>

	<target name="junit-missing" depends="test-junit-status" if="junit.missing">
		<echo>=================================== WARNING ===================================</echo>
		<echo> JUnit is not present in your directory. Tests not executed.</echo>
		<echo>===============================================================================</echo>

		<property name="checkstyle.analysis.skip" value="true"/>
		<property name="cobertura.analysis.skip" value="true"/>

	</target>

	<!-- ====================================================================== -->
	<!-- Javadoc target                                                         -->
	<!-- ====================================================================== -->
	<target name="javadoc" description="Generates the Javadoc of the application">
		<javadoc packagenames="*" destdir="${reporting.outputDirectory}/apidocs" 
		access="protected" verbose="false" version="true" use="true" author="true" 
		splitindex="false" nodeprecated="false" nodeprecatedlist="false" notree="false" noindex="false" 
		nohelp="false" nonavbar="false" serialwarn="false" charset="ISO-8859-1" linksource="false" 
		breakiterator="false" windowtitle="NCICB ISO 21090 Common Library ${release.version} API Documentation"
		doctitle="NCICB ISO 21090 Common Library ${release.version} API Documentation" useexternalfile="yes">
		<fileset dir="${basedir}/src/main/java" includes="**/*.java"/>
		<classpath>
			<fileset dir="${basedir}/target" includes="*.jar" />
			<fileset dir="${basedir}/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<pathelement location="${build.instrumented.dir}" />
			<pathelement location="${build.outputDir}" />
			<pathelement location="${build.testOutputDir}" />
		</classpath>
		</javadoc>
	</target>
	
	<target name="javadoc-combined" description="Generates the Javadoc of the application">
		<javadoc packagenames="*" destdir="${reporting.outputDirectory}/apidocs" 
		access="protected" verbose="false" version="true" use="true" author="true" 
		splitindex="false" nodeprecated="false" nodeprecatedlist="false" notree="false" noindex="false" 
		nohelp="false" nonavbar="false" serialwarn="false" charset="ISO-8859-1" linksource="false" 
		breakiterator="false" windowtitle="NCICB ISO 21090 Common Project ${release.version} API Documentation"
		doctitle="NCICB ISO 21090 Common Project ${release.version} API Documentation" useexternalfile="yes">
		<group title="Localization Packages" packages="gov.nih.nci.iso21090*"/>
		<group title="Extensions Packages" packages="gov.nih.nci.iso21090.grid.*"/>
		<group title="Hibernate Packages" packages="gov.nih.nci.iso21090.hibernate.*"/>
		<fileset dir="${basedir}/localization/src/main/java" includes="**/*.java"/>
		<fileset dir="${basedir}/hibernate/src/main/java" includes="**/*.java"/>
		<fileset dir="${basedir}/extensions/src/main/java" includes="**/*.java"/>
		<classpath>
			<fileset dir="${basedir}/localization/target" includes="*.jar" />
			<fileset dir="${basedir}/hibernate/target" includes="*.jar" />
			<fileset dir="${basedir}/extensions/target" includes="*.jar" />
			<fileset dir="${basedir}/localization/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<fileset dir="${basedir}/hibernate/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<fileset dir="${basedir}/extensions/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<pathelement location="${build.instrumented.dir}" />
			<pathelement location="${build.outputDir}" />
			<pathelement location="${build.testOutputDir}" />
		</classpath>
		</javadoc>
	</target>

	<!-- ====================================================================== -->
	<!-- Static Analysis targets  - checkstyle                                         -->
	<!-- ====================================================================== -->

	<target name="perform-static-analysis-checkstyle"  unless="checkstyle.analysis.skip">
		<mkdir dir="${checkstyle.report.dir}"/>
		<cs:checkstyle config="${checkstyle.config.file}" failOnViolation="true" maxerrors="0" maxwarnings="0" classpathref="static.analysis.classpath">
			<formatter type="xml" tofile="${checkstyle.report.xml.file}" />
			<fileset dir="${checkstyle.src.dir}">
				<include name="**/*.java" />
			</fileset>
		</cs:checkstyle>
		<style in="${checkstyle.report.xml.file}" out="${checkstyle.report.html.file}" style="${checkstyle.style.file}" />
	</target>
	
	<target name="perform-static-analysis-pmd"  unless="pmd.analysis.skip">
		<mkdir dir="${pmd.report.dir}"/>
		<pmd rulesetfiles="${pmd.config.file}" classpathref="static.analysis.classpath">
			<formatter type="xml" toFile="${pmd.report.xml.file}" linkPrefix="http://pmd.sourceforge.net/xref/" />
			<formatter type="html" toFile="${pmd.report.html.file}" linkPrefix="http://pmd.sourceforge.net/xref/" />

			<fileset dir="${pmd.src.dir}">
				<include name="**/*.java" />
			</fileset>
		</pmd>
	</target>
	
	<target name="perform-static-analysis-cobertura"  unless="cobertura.analysis.skip">
		<cobertura-report datafile="${target.dir}/cobertura.ser" format="xml" destdir="${build.dir}/cobertura" classpathref="static.analysis.classpath">
			<fileset dir="${cobertura.src.dir}">
				<include name="**/*.java" />
				<exclude name="**/org/iso/_21090/*.java"/>
			</fileset>
		</cobertura-report>
		<cobertura-check failureproperty="cobertura.failure" datafile="${target.dir}/cobertura.ser" haltonfailure="false" linerate="0" packagebranchrate="0" packagelinerate="0" totalbranchrate="90" totallinerate="85" classpathref="static.analysis.classpath" />
	</target>


	<target name="perform-static-analysis" depends="init,junit-missing,test,
								perform-static-analysis-checkstyle,
								perform-static-analysis-pmd,
								perform-static-analysis-cobertura" unless="analysis.skip">

	</target>

	<!-- ====================================================================== -->
	<!-- Download dependencies target                                           -->
	<!-- ====================================================================== -->

	<target name="test-offline">
		<condition property="mode.offline">
			<equals arg1="${settings.offline}" arg2="true" />
		</condition>
	</target>

	<target name="dist" depends="compile,test,perform-static-analysis,jar,publish-local" description="dist the application">
	</target>

	<target name="ivy:clean" description="Cleans up the ivy cache of this project and all sub-projects">
		<taskdef uri="antlib:fr.jayasoft.ivy.ant" resource="fr/jayasoft/ivy/ant/antlib.xml" classpathref="ivy.classpath" />
		<ivy:settings file="${ivy.settings.file}" />
		<ivy:cleancache />
	</target>
	
	


	
</project>
<commit_msg>Version change to 2.1.1<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.        -->
<!-- ====================================================================== -->
<project name="ISO21090"  basedir="." xmlns:ivy="antlib:fr.jayasoft.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">

	<!-- ====================================================================== -->
	<!-- Cleaning up target                                                     -->
	<!-- ====================================================================== -->

	<!-- Ivy -->
	<property name="software.dir" value="${basedir}"/>
	<property name="ivy.dir" location="${software.dir}/ivy" />
	<property name="ivy.settings.file" location="${ivy.dir}/cbiit-ivy-settings-with-cagrid13.xml" />
	<property name="local.repo.dir" value="${software.dir}/local-ivy-repo" />
	<property name="target.dir" value="target"/>
	<property name="target.lib" value="${target.dir}/target/lib" />
	<property name="local.ivy.repo" value="${local.repo.dir}" />

	<!-- Project properties -->
	<property name="release.version"			value="2.1.1" />
	<property name="release.src.package.file.name"	value="ncicb_iso21090.src.2.1.1.zip" />
	<property name="build.finalName"			value="iso-datatypes" />
	<property name="build.dir"					value="${basedir}/target" />
	<property name="lib.dir"					value="${build.dir}/lib" />
	<property name="src.dir"					value="${basedir}/src/main/java" />
	<property name="src.test.dir"				value="${basedir}/src/test/java" />
	<property name="resources.dir"				value="${basedir}/src/main/resources" />
	<property name="resources.test.dir"			value="${basedir}/src/test/resources" />
	<property name="build.outputDir"			value="${build.dir}/classes" />
	<property name="build.testOutputDir"		value="${build.dir}/test-classes" />
	<property name="build.instrumented.dir"		value="${build.dir}/instrumented" />
	<property name="test.reports"				value="${build.dir}/test-reports" />
	<property name="reporting.outputDirectory"	value="${build.dir}/site" />
	<property name="settings.offline"			value="false" />
	<property name="settings.interactiveMode"	value="true" />
	<property name="checkstyle.src.dir"			value="${basedir}/src/main/java" />
	<property name="checkstyle.config.file"		value="${basedir}/src/main/resources/Checkstyle-5.xml" />
	<property name="checkstyle.style.file"		value="${basedir}/src/main/resources/checkstyle.xsl" />
	<property name="checkstyle.report.dir"	value="${basedir}/target/report" />
	<property name="checkstyle.report.xml.file"	value="${basedir}/target/report/checkstyle_report.xml" />
	<property name="checkstyle.report.html.file" value="${basedir}/target/report/checkstyle_report.html" />
	<property name="pmd.src.dir"				value="${basedir}/src/main/java" />
	<property name="pmd.report.dir"				value="${basedir}/target/report" />
	<property name="pmd.config.file"			value="${basedir}/src/main/resources/Pmd.xml" />
	<property name="pmd.report.xml.file"		value="${basedir}/target/report/pmd_report.xml" />
	<property name="pmd.report.html.file"		value="${basedir}/target/report/pmd_report.html" />
	<property name="cobertura.src.dir"			value="${basedir}/src/main/java" />

	<!-- ====================================================================== -->
	<!-- Defining classpaths                                                    -->
	<!-- ====================================================================== -->

	<path id="build.classpath">
		<fileset dir="${lib.dir}/compile" includes="*.jar" excludes="ant-1.6.jar"/>
	</path>
	<path id="build.test.classpath">
		<fileset dir="${lib.dir}/compile" includes="*.jar" excludes="ant-1.6.jar"/>
		<fileset dir="${lib.dir}/static-analysis" includes="*.jar" excludes="ant-1.6.jar"/>
		<fileset dir="${lib.dir}/test" includes="*.jar" />
	</path>
	<path id="ivy.classpath">
		<fileset dir="${ivy.dir}/lib" includes="*.jar" />
	</path>

	<path id="static.analysis.classpath">
		<fileset dir="${lib.dir}/static-analysis" includes="**/*.jar" />

	</path>

	<!-- ====================================================================== -->
	<!-- Init target                                                     -->
	<!-- ====================================================================== -->
	<target name="init">
		<mkdir dir="${local.repo.dir}"/>

		<echo message="Locating IVY library from ${ivy.dir}"/>
		<echo message="Configuring IVY from ${ivy.settings.file}"/>
		<taskdef uri="antlib:fr.jayasoft.ivy.ant" resource="fr/jayasoft/ivy/ant/antlib.xml" classpathref="ivy.classpath" />
		<ivy:settings file="${ivy.settings.file}" />

		<ivy:resolve refresh="true" conf="static-analysis" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="static-analysis" />

		<taskdef resource="checkstyletask.properties" uri="antlib:com.puppycrawl.tools.checkstyle" classpathref="static.analysis.classpath" />
		<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="static.analysis.classpath" />
		<taskdef resource="tasks.properties" classpathref="static.analysis.classpath" />
		

	</target>
	<target name="get-dependency-jars" depends="init">
		<ivy:resolve refresh="true" conf="compile" />
		<ivy:resolve refresh="true" conf="runtime" />
		<ivy:resolve refresh="true" conf="static-analysis" />
		<ivy:resolve refresh="true" conf="test" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="compile" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="runtime" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="static-analysis" />
		<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="test" />

	</target>

	<target name="pre-compile"  description="Do nothing. Extend in sub-build">
		<!-- to be extended by sub projects/build.-->
	</target>
	<target name="compile" depends="init,get-dependency-jars,pre-compile" description="Compile the code">
		<mkdir dir="${build.outputDir}" />
		<javac destdir="${build.outputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.5" verbose="false" fork="false" source="1.5">
			<src>
				<pathelement location="${src.dir}" />
			</src>
			<classpath refid="build.classpath" />
		</javac>
		<copy todir="${build.outputDir}">
			<fileset dir="${resources.dir}" />
		</copy>
	</target>
	<target name="jar" depends="compile">
		
		<property name="version.num" value="2.1.1"/>
		<manifest file="MANIFEST.MF">
		        <attribute name="Built-By" value="CBIIT ISO21090 Team"/>
		        <attribute name="Implementation-Version" value="${version.num}"/>
		</manifest>

		
		<jar jarfile="${build.dir}/${build.finalName}.jar" compress="true" index="false" basedir="${build.outputDir}" excludes="**/dist.html"  manifest="MANIFEST.MF"/>
	</target>
	<target name="publish-local" depends="jar, publish-resources" description=" Publish Local">
		<ivy:publish resolver="local-project-repo" pubrevision="${release.version}" status="release" update="true" overwrite="true">
			<artifacts pattern="${target.dir}/[module]-[revision].[ext]" />
			<artifacts pattern="${target.dir}/[artifact].[ext]" />
		</ivy:publish>
	</target>

	<target name="publish-resources" />
	
	
	<target name="package" >
		<delete failonerror="false" file="../release/${release.src.package.file.name}"/>
		<zip destfile="../release/${release.src.package.file.name}"
		       basedir="."
		       excludes="**/.svn/* **/*.class **/target/*"
		/>
	</target>

	
	
	<!-- ====================================================================== -->
	<!-- Cleaning up target                                                     -->
	<!-- ====================================================================== -->

	<target name="clean" description="Clean the output directory">
		<delete dir="${build.dir}" />
		<delete dir="${lib.dir}/compile" />
		<delete dir="${lib.dir}/runtime" />
		<delete dir="${lib.dir}/static-analysis" />
		<delete dir="${lib.dir}/test" />
	</target>

	<!-- ====================================================================== -->
	<!-- Test-compilation target                                                -->
	<!-- ====================================================================== -->

	<target name="compile-tests" depends="compile" description="Compile the test code" unless="test.skip">
		<mkdir dir="${build.testOutputDir}" />
		<javac destdir="${build.testOutputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.5" verbose="false" fork="false" source="1.5">
			<src>
				<pathelement location="${src.test.dir}" />
			</src>
			<classpath>
				<path refid="build.test.classpath" />
				<pathelement location="${build.outputDir}" />
			</classpath>
		</javac>
		<copy todir="${build.testOutputDir}">
			<fileset dir="${resources.test.dir}" />
		</copy>
	</target>

	<!-- ====================================================================== -->
	<!-- Run all tests                                                          -->
	<!-- ====================================================================== -->

	<target name="test" depends="compile-tests, junit-missing" unless="junit.skipped" description="Run the test cases">
		<mkdir dir="${test.reports}" />
		<cobertura-instrument todir="${build.instrumented.dir}" datafile="${target.dir}/cobertura.ser" classpathref="static.analysis.classpath">
			<fileset dir="${build.outputDir}">
				<include name="**/*.class" />
			</fileset>
		</cobertura-instrument>

		<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true">
			<sysproperty key="net.sourceforge.cobertura.datafile" file="${target.dir}/cobertura.ser" />

			<formatter type="xml" />
			<classpath>
				<path refid="build.test.classpath" />

				<pathelement location="${build.instrumented.dir}" />
				<pathelement location="${build.outputDir}" />
				<pathelement location="${build.testOutputDir}" />
				<fileset dir="${lib.dir}/runtime" includes="*.jar" />

			</classpath>
			<batchtest todir="${test.reports}">
				<fileset dir="${src.test.dir}">
					<include name="**/Test*.java" />
					<include name="**/*Test.java" />
					<include name="**/*TestCase.java" />
					<exclude name="**/*Abstract*Test.java" />
				</fileset>
			</batchtest>
			<batchtest todir="${test.reports}">
				<fileset dir="${src.test.dir}">
					<include name="**/*Test.java" />
					<exclude name="**/*Abstract*Test.java" />
				</fileset>
			</batchtest>
		</junit>
	</target>

	<target name="test-junit-present">
		<available file="${src.test.dir}" type="dir" property="junit.present" />

		<condition property="checkstyle.analysis.skip">
			<or>
				<isfalse value="${junit.present}" />
				<istrue value="${test.skip}" />
			</or>
		</condition>
		<condition property="cobertura.analysis.skip">
			<or>
				<isfalse value="${junit.present}" />
				<istrue value="${test.skip}" />
			</or>
		</condition>
	</target>

	<target name="test-junit-status" depends="test-junit-present">
		<condition property="junit.missing">
			<and>
				<isfalse value="${junit.present}" />
				<isfalse value="${test.skip}" />
			</and>
		</condition>
		<condition property="junit.skipped">
			<or>
				<isfalse value="${junit.present}" />
				<istrue value="${test.skip}" />
			</or>
		</condition>
	</target>

	<target name="junit-missing" depends="test-junit-status" if="junit.missing">
		<echo>=================================== WARNING ===================================</echo>
		<echo> JUnit is not present in your directory. Tests not executed.</echo>
		<echo>===============================================================================</echo>

		<property name="checkstyle.analysis.skip" value="true"/>
		<property name="cobertura.analysis.skip" value="true"/>

	</target>

	<!-- ====================================================================== -->
	<!-- Javadoc target                                                         -->
	<!-- ====================================================================== -->

	<target name="javadoc" description="Generates the Javadoc of the application">
		<javadoc packagenames="*" destdir="${reporting.outputDirectory}/apidocs" 
		access="protected" verbose="false" version="true" use="true" author="true" 
		splitindex="false" nodeprecated="false" nodeprecatedlist="false" notree="false" noindex="false" 
		nohelp="false" nonavbar="false" serialwarn="false" charset="ISO-8859-1" linksource="false" 
		breakiterator="false" windowtitle="NCICB ISO 21090 Common Library ${release.version} API Documentation"
		doctitle="NCICB ISO 21090 Common Library ${release.version} API Documentation" useexternalfile="yes">
		<fileset dir="${basedir}/src/main/java" includes="**/*.java"/>
		<classpath>
			<fileset dir="${basedir}/target" includes="*.jar" />
			<fileset dir="${basedir}/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<pathelement location="${build.instrumented.dir}" />
			<pathelement location="${build.outputDir}" />
			<pathelement location="${build.testOutputDir}" />
		</classpath>
		</javadoc>
	</target>
	
	<target name="javadoc-combined" description="Generates the Javadoc of the application">
		<javadoc packagenames="*" destdir="${reporting.outputDirectory}/apidocs" 
		access="protected" verbose="false" version="true" use="true" author="true" 
		splitindex="false" nodeprecated="false" nodeprecatedlist="false" notree="false" noindex="false" 
		nohelp="false" nonavbar="false" serialwarn="false" charset="ISO-8859-1" linksource="false" 
		breakiterator="false" windowtitle="NCICB ISO 21090 Common Project ${release.version} API Documentation"
		doctitle="NCICB ISO 21090 Common Project ${release.version} API Documentation" useexternalfile="yes">
		<group title="Localization Packages" packages="gov.nih.nci.iso21090*"/>
		<group title="Extensions Packages" packages="gov.nih.nci.iso21090.grid.*"/>
		<group title="Hibernate Packages" packages="gov.nih.nci.iso21090.hibernate.*"/>
		<fileset dir="${basedir}/localization/src/main/java" includes="**/*.java"/>
		<fileset dir="${basedir}/hibernate/src/main/java" includes="**/*.java"/>
		<fileset dir="${basedir}/extensions/src/main/java" includes="**/*.java"/>
		<classpath>
			<fileset dir="${basedir}/localization/target" includes="*.jar" />
			<fileset dir="${basedir}/hibernate/target" includes="*.jar" />
			<fileset dir="${basedir}/extensions/target" includes="*.jar" />
			<fileset dir="${basedir}/localization/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<fileset dir="${basedir}/hibernate/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<fileset dir="${basedir}/extensions/target/lib/test" includes="*.jar" excludes="ant-1.6.jar"/>
			<pathelement location="${build.instrumented.dir}" />
			<pathelement location="${build.outputDir}" />
			<pathelement location="${build.testOutputDir}" />
		</classpath>
		</javadoc>
	</target>

	<!-- ====================================================================== -->
	<!-- Static Analysis targets  - checkstyle                                         -->
	<!-- ====================================================================== -->

	<target name="perform-static-analysis-checkstyle"  unless="checkstyle.analysis.skip">
		<mkdir dir="${checkstyle.report.dir}"/>
		<cs:checkstyle config="${checkstyle.config.file}" failOnViolation="true" maxerrors="0" maxwarnings="0" classpathref="static.analysis.classpath">
			<formatter type="xml" tofile="${checkstyle.report.xml.file}" />
			<fileset dir="${checkstyle.src.dir}">
				<include name="**/*.java" />
			</fileset>
		</cs:checkstyle>
		<style in="${checkstyle.report.xml.file}" out="${checkstyle.report.html.file}" style="${checkstyle.style.file}" />
	</target>
	
	<target name="perform-static-analysis-pmd"  unless="pmd.analysis.skip">
		<mkdir dir="${pmd.report.dir}"/>
		<pmd rulesetfiles="${pmd.config.file}" classpathref="static.analysis.classpath">
			<formatter type="xml" toFile="${pmd.report.xml.file}" linkPrefix="http://pmd.sourceforge.net/xref/" />
			<formatter type="html" toFile="${pmd.report.html.file}" linkPrefix="http://pmd.sourceforge.net/xref/" />

			<fileset dir="${pmd.src.dir}">
				<include name="**/*.java" />
			</fileset>
		</pmd>
	</target>
	
	<target name="perform-static-analysis-cobertura"  unless="cobertura.analysis.skip">
		<cobertura-report datafile="${target.dir}/cobertura.ser" format="xml" destdir="${build.dir}/cobertura" classpathref="static.analysis.classpath">
			<fileset dir="${cobertura.src.dir}">
				<include name="**/*.java" />
				<exclude name="**/org/iso/_21090/*.java"/>
			</fileset>
		</cobertura-report>
		<cobertura-check failureproperty="cobertura.failure" datafile="${target.dir}/cobertura.ser" haltonfailure="false" linerate="0" packagebranchrate="0" packagelinerate="0" totalbranchrate="90" totallinerate="85" classpathref="static.analysis.classpath" />
	</target>


	<target name="perform-static-analysis" depends="init,junit-missing,test,
								perform-static-analysis-checkstyle,
								perform-static-analysis-pmd,
								perform-static-analysis-cobertura" unless="analysis.skip">

	</target>

	<!-- ====================================================================== -->
	<!-- Download dependencies target                                           -->
	<!-- ====================================================================== -->

	<target name="test-offline">
		<condition property="mode.offline">
			<equals arg1="${settings.offline}" arg2="true" />
		</condition>
	</target>

	<target name="dist" depends="compile,test,perform-static-analysis,jar,publish-local" description="dist the application">
	</target>

	<target name="ivy:clean" description="Cleans up the ivy cache of this project and all sub-projects">
		<taskdef uri="antlib:fr.jayasoft.ivy.ant" resource="fr/jayasoft/ivy/ant/antlib.xml" classpathref="ivy.classpath" />
		<ivy:settings file="${ivy.settings.file}" />
		<ivy:cleancache />
	</target>
	
	


	
</project>

{'fraction_non_alphanumeric': 0.27229780801209374, 'fraction_numerical': 0.006262822589353202, 'mean_word_length': 3.989225589225589, 'pattern_counts': {'":': 0, '<': 623, '<?xml version=': 2, '>': 623, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 40}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4187434', 'n_tokens_mistral': 12639, 'n_tokens_neox': 10810, 'n_words': 1665}