<commit_before><?xml version="1.0"?>
<!-- ================================================================= -->
<!-- caGrid 1.0 metadata utils build file                              -->
<!-- ================================================================= -->

<project name="caGrid-identifiers" default="compile" basedir=".">
	<!-- Environment -->
	<property environment="env" />
	<property file="${basedir}/build.properties" />
	<property file="${basedir}/project.properties" />

	<!-- Information -->
	<property name="project.name" value="${ant.project.name}" />

	<property name="src.dir" value="${basedir}/src" />
	<property name="domain.dir" value="${basedir}/domain/src" />
	<property name="build.dir" value="${basedir}/build" />
	<property name="javadoc.dir" value="${build.dir}/javadoc" />
	<property name="classes.dir" value="${build.dir}/classes" />
	<property name="jar.dir" value="${build.dir}/lib" />
	<property name="namingauthority.jarfile" value="${jar.dir}/${project.name}-namingauthority-${project.version}.jar" />
	<property name="lib.dir" value="${basedir}/lib" />
	<property name="ext.lib.dir" value="${basedir}/ext/dependencies/impl/jars" />
	<property name="ext.test.lib.dir" location="${basedir}/ext/dependencies/test/jars" />

	<!-- checkstyle stuff -->
	<property name="checkstyle.dir" value="${basedir}/checkstyle" />
	<property name="checkstyle.resource.dir" value="${checkstyle.dir}/resources"/>
	<property name="checkstyle.out.dir" value="${checkstyle.dir}/output"/>
	
	<!-- javac options -->
	<property name="java.source" value="1.5" />
	<property name="java.debug" value="true" />	
	
	<!-- testing stuff -->
	<property name="test.dir" location="${basedir}/test" />
	<property name="test.src.dir" location="${test.dir}/src" />
	<property name="test.classes.dir" location="${build.dir}/test_classes" />
	<property name="test.lib.dir" location="${test.dir}/lib" />
	<property name="test.logs.dir" location="${test.dir}/logs" />
	<property name="test.project.jar" location="${jar.dir}/${project.name}-namingauthority-tests-${project.version}.jar" />

	<import file="test/test.xml" />
	<import file="webapp.xml" />
	<import file="dependencies-build.xml" />

	<!-- ============================================================== -->
	<!-- Globus properties                                              -->
	<!-- ============================================================== -->
	<target name="checkGlobus" depends="setGlobus">
		<condition property="globus.not.found">
			<or>
				<not>
					<isset property="ext.globus.dir" />
				</not>
				<equals arg1="${ext.globus.dir}" arg2="" />
			</or>
		</condition>
		<fail message="Globus installation is not set in either GLOBUS_LOCATION or ext.globus.dir" if="globus.not.found" />
		<echo message="Globus: ${ext.globus.dir}" />
	</target>
	<target name="setGlobus" if="env.GLOBUS_LOCATION">
		<!-- GT4 build files and directories-->
		<property name="ext.globus.dir" value="${env.GLOBUS_LOCATION}" />
		<property name="build.stubs" location="build-stubs.xml" />
		<property name="schema.src" location="${ext.globus.dir}/share/schema" />
		<property name="build.packages" location="${ext.globus.dir}/share/globus_wsrf_common/build-packages.xml" />
		<!-- Copied from build.stubs file, as there is no way to "append" to the value in the remote file -->
		<property name="GT4.ns.excludes" value="-x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl -x http://schemas.xmlsoap.org/ws/2004/04/trust -x http://schemas.xmlsoap.org/ws/2002/12/policy -x http://schemas.xmlsoap.org/ws/2002/07/utility -x http://schemas.xmlsoap.org/ws/2004/04/sc -x http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd -x http://www.w3.org/2000/09/xmldsig# -x http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd -x http://schemas.xmlsoap.org/ws/2004/09/enumeration" />
	</target>


	<!-- =============================================================== -->
	<!-- Define the Classpaths                                           -->
	<!-- =============================================================== -->
	<target name="defineClasspaths" depends="checkGlobus">
		<path id="build.classpath">
			<fileset dir="${lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.globus.dir}/lib">
				<include name="*.jar" />
			</fileset>
		</path>

		<path id="run.classpath">
			<pathelement location="${classes.dir}" />
			<fileset dir="${lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
		</path>

		<path id="test.classpath">
			<pathelement path="${classes.dir}" />
			<pathelement path="${test.dir}/resources" />
			<fileset dir="${test.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.test.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
		</path>	

	</target>


	<!-- =============================================================== -->
	<!-- Prepares the build directory                                    -->
	<!-- =============================================================== -->
	<target name="prepare" depends="defineClasspaths">
		<tstamp />
		<mkdir dir="${build.dir}" />
	</target>


	<!-- =============================================================== -->
	<!-- Compiles the source code                                        -->
	<!-- =============================================================== -->
	<target name="compileDomain" depends="prepare" description="compiles domain classes.">
		<mkdir dir="${classes.dir}" />
		<javac srcdir="${domain.dir}" destdir="${classes.dir}" source="${java.source}" debug="${java.debug}" deprecation="off" optimize="off">
			<classpath refid="build.classpath" />
		</javac>
		<copy toDir="${classes.dir}">
			<fileset dir="${domain.dir}">
				<include name="**/*" />
				<exclude name="**/*.java" />
			</fileset>
		</copy>
	</target>

	<target name="compile" depends="compileDomain" description="compiles.">
		<javac srcdir="${src.dir}" destdir="${classes.dir}" source="${java.source}" debug="${java.debug}" deprecation="off" optimize="off">
			<classpath refid="build.classpath" />
		</javac>
		<copy toDir="${classes.dir}">
			<fileset dir="${src.dir}">
				<include name="**/*" />
				<exclude name="**/*.java" />
			</fileset>
		</copy>
	</target>

	<!-- =============================================================== -->
	<!-- Compiles the test source code                                   -->
	<!-- =============================================================== -->
	<target name="compile-tests" depends="prepare" description="compiles.">
		<mkdir dir="${test.classes.dir}" />
		<javac srcdir="${test.src.dir}" destdir="${test.classes.dir}" source="${java.source}" debug="${java.debug}" deprecation="off" optimize="off">
			<classpath refid="test.classpath" />
		</javac>
	</target>


	<!-- ============================================================== -->
	<!-- Cleans up generated stuff                                      -->
	<!-- ============================================================== -->
	<target name="clean" depends="" description="Removes generated files.">
		<delete dir="${build.dir}" />
	</target>

	<target name="jar" depends="compile" description="Builds the naming authority jar file">
		<mkdir dir="${jar.dir}" />
		<jar jarfile="${namingauthority.jarfile}" basedir="${classes.dir}">
			<include name="**/*" />
			<manifest>
				<attribute name="Built-By" value="${user.name}" />
			</manifest>
		</jar>
	</target>

	<target name="jar-tests" depends="compile-tests" description="Builds the Jar Files">
		<mkdir dir="${jar.dir}" />
		<jar jarfile="${test.project.jar}" basedir="${test.classes.dir}">
			<manifest>
				<attribute name="Built-By" value="${user.name}" />
			</manifest>
		</jar>
	</target>

	<!-- =================================================================== -->
	<!-- Builds Code Docuementation                                          -->
	<!-- =================================================================== -->
	<target name="javadoc" depends="compile" description="Creates the API documentation.">
		<javadoc packagenames="*" destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${project.name} API">
			<sourcepath>
				<pathelement path="${src.dir}" />
			</sourcepath>

			<classpath>
				<path refid="build.classpath" />
			</classpath>

			<tag name="todo" scope="all" description="To do:" />
			<tag name="created" scope="all" description="Created On:" />
		</javadoc>
	</target>


	<!-- ============================================================== -->
	<!-- Builds from scratch                                                -->
	<!-- ============================================================== -->
	<target name="all" description="Builds the entire application" depends="clean,jar,jar-tests" />

	<!-- ============================================================== -->
	<!-- Deploys Naming Authority to Tomcat                             -->
	<!-- ============================================================== --><commit_msg>target all is modified to include checkstyle task.<commit_after><?xml version="1.0"?>
<!-- ================================================================= -->
<!-- caGrid 1.0 metadata utils build file                              -->
<!-- ================================================================= -->

<project name="caGrid-identifiers" default="compile" basedir=".">
	<!-- Environment -->
	<property environment="env" />
	<property file="${basedir}/build.properties" />
	<property file="${basedir}/project.properties" />

	<!-- Information -->
	<property name="project.name" value="${ant.project.name}" />

	<property name="src.dir" value="${basedir}/src" />
	<property name="domain.dir" value="${basedir}/domain/src" />
	<property name="build.dir" value="${basedir}/build" />
	<property name="javadoc.dir" value="${build.dir}/javadoc" />
	<property name="classes.dir" value="${build.dir}/classes" />
	<property name="jar.dir" value="${build.dir}/lib" />
	<property name="namingauthority.jarfile" value="${jar.dir}/${project.name}-namingauthority-${project.version}.jar" />
	<property name="lib.dir" value="${basedir}/lib" />
	<property name="ext.lib.dir" value="${basedir}/ext/dependencies/impl/jars" />
	<property name="ext.test.lib.dir" location="${basedir}/ext/dependencies/test/jars" />

	<!-- checkstyle stuff -->
	<property name="checkstyle.dir" value="${basedir}/checkstyle" />
	<property name="checkstyle.resource.dir" value="${checkstyle.dir}/resources"/>
	<property name="checkstyle.out.dir" value="${checkstyle.dir}/output"/>
	
	<!-- javac options -->
	<property name="java.source" value="1.5" />
	<property name="java.debug" value="true" />	
	
	<!-- testing stuff -->
	<property name="test.dir" location="${basedir}/test" />
	<property name="test.src.dir" location="${test.dir}/src" />
	<property name="test.classes.dir" location="${build.dir}/test_classes" />
	<property name="test.lib.dir" location="${test.dir}/lib" />
	<property name="test.logs.dir" location="${test.dir}/logs" />
	<property name="test.project.jar" location="${jar.dir}/${project.name}-namingauthority-tests-${project.version}.jar" />

	<import file="test/test.xml" />
	<import file="webapp.xml" />
	<import file="dependencies-build.xml" />

	<!-- ============================================================== -->
	<!-- Globus properties                                              -->
	<!-- ============================================================== -->
	<target name="checkGlobus" depends="setGlobus">
		<condition property="globus.not.found">
			<or>
				<not>
					<isset property="ext.globus.dir" />
				</not>
				<equals arg1="${ext.globus.dir}" arg2="" />
			</or>
		</condition>
		<fail message="Globus installation is not set in either GLOBUS_LOCATION or ext.globus.dir" if="globus.not.found" />
		<echo message="Globus: ${ext.globus.dir}" />
	</target>
	<target name="setGlobus" if="env.GLOBUS_LOCATION">
		<!-- GT4 build files and directories-->
		<property name="ext.globus.dir" value="${env.GLOBUS_LOCATION}" />
		<property name="build.stubs" location="build-stubs.xml" />
		<property name="schema.src" location="${ext.globus.dir}/share/schema" />
		<property name="build.packages" location="${ext.globus.dir}/share/globus_wsrf_common/build-packages.xml" />
		<!-- Copied from build.stubs file, as there is no way to "append" to the value in the remote file -->
		<property name="GT4.ns.excludes" value="-x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl -x http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd -x http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl -x http://schemas.xmlsoap.org/ws/2004/04/trust -x http://schemas.xmlsoap.org/ws/2002/12/policy -x http://schemas.xmlsoap.org/ws/2002/07/utility -x http://schemas.xmlsoap.org/ws/2004/04/sc -x http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd -x http://www.w3.org/2000/09/xmldsig# -x http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd -x http://schemas.xmlsoap.org/ws/2004/09/enumeration" />
	</target>


	<!-- =============================================================== -->
	<!-- Define the Classpaths                                           -->
	<!-- =============================================================== -->
	<target name="defineClasspaths" depends="checkGlobus">
		<path id="build.classpath">
			<fileset dir="${lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.globus.dir}/lib">
				<include name="*.jar" />
			</fileset>
		</path>

		<path id="run.classpath">
			<pathelement location="${classes.dir}" />
			<fileset dir="${lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
		</path>

		<path id="test.classpath">
			<pathelement path="${classes.dir}" />
			<pathelement path="${test.dir}/resources" />
			<fileset dir="${test.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.test.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${lib.dir}">
				<include name="**/*.jar" />
			</fileset>
			<fileset dir="${ext.lib.dir}">
				<include name="**/*.jar" />
			</fileset>
		</path>	

	</target>


	<!-- =============================================================== -->
	<!-- Prepares the build directory                                    -->
	<!-- =============================================================== -->
	<target name="prepare" depends="defineClasspaths">
		<tstamp />
		<mkdir dir="${build.dir}" />
	</target>


	<!-- =============================================================== -->
	<!-- Compiles the source code                                        -->
	<!-- =============================================================== -->
	<target name="compileDomain" depends="prepare" description="compiles domain classes.">
		<mkdir dir="${classes.dir}" />
		<javac srcdir="${domain.dir}" destdir="${classes.dir}" source="${java.source}" debug="${java.debug}" deprecation="off" optimize="off">
			<classpath refid="build.classpath" />
		</javac>
		<copy toDir="${classes.dir}">
			<fileset dir="${domain.dir}">
				<include name="**/*" />
				<exclude name="**/*.java" />
			</fileset>
		</copy>
	</target>

	<target name="compile" depends="compileDomain" description="compiles.">
		<javac srcdir="${src.dir}" destdir="${classes.dir}" source="${java.source}" debug="${java.debug}" deprecation="off" optimize="off">
			<classpath refid="build.classpath" />
		</javac>
		<copy toDir="${classes.dir}">
			<fileset dir="${src.dir}">
				<include name="**/*" />
				<exclude name="**/*.java" />
			</fileset>
		</copy>
	</target>

	<!-- =============================================================== -->
	<!-- Compiles the test source code                                   -->
	<!-- =============================================================== -->
	<target name="compile-tests" depends="prepare" description="compiles.">
		<mkdir dir="${test.classes.dir}" />
		<javac srcdir="${test.src.dir}" destdir="${test.classes.dir}" source="${java.source}" debug="${java.debug}" deprecation="off" optimize="off">
			<classpath refid="test.classpath" />
		</javac>
	</target>


	<!-- ============================================================== -->
	<!-- Cleans up generated stuff                                      -->
	<!-- ============================================================== -->
	<target name="clean" depends="" description="Removes generated files.">
		<delete dir="${build.dir}" />
	</target>

	<target name="jar" depends="compile" description="Builds the naming authority jar file">
		<mkdir dir="${jar.dir}" />
		<jar jarfile="${namingauthority.jarfile}" basedir="${classes.dir}">
			<include name="**/*" />
			<manifest>
				<attribute name="Built-By" value="${user.name}" />
			</manifest>
		</jar>
	</target>

	<target name="jar-tests" depends="compile-tests" description="Builds the Jar Files">
		<mkdir dir="${jar.dir}" />
		<jar jarfile="${test.project.jar}" basedir="${test.classes.dir}">
			<manifest>
				<attribute name="Built-By" value="${user.name}" />
			</manifest>
		</jar>
	</target>

	<!-- =================================================================== -->
	<!-- Builds Code Docuementation                                          -->
	<!-- =================================================================== -->
	<target name="javadoc" depends="compile" description="Creates the API documentation.">
		<javadoc packagenames="*" destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${project.name} API">
			<sourcepath>
				<pathelement path="${src.dir}" />
			</sourcepath>

			<classpath>
				<path refid="build.classpath" />
			</classpath>

			<tag name="todo" scope="all" description="To do:" />
			<tag name="created" scope="all" description="Created On:" />
		</javadoc>
	</target>


	<!-- ============================================================== -->
	<!-- Builds from scratch                                                -->
	<!-- ============================================================== -->
	<target name="all" description="Builds the entire application" depends="clean,jar,jar-tests,checkstyle" />

	<!-- ============================================================== -->
	<!-- Deploys Naming Authority to Tomcat                             -->
	<!-- ============================================================== -->
{'fraction_non_alphanumeric': 0.3220988503488258, 'fraction_numerical': 0.017195637221185025, 'mean_word_length': 3.6976690514654975, 'pattern_counts': {'":': 0, '<': 383, '<?xml version=': 2, '>': 383, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 24}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1065904', 'n_tokens_mistral': 6916, 'n_tokens_neox': 6091, 'n_words': 955}