<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="ProActive" default="compile" basedir=".">
	<taskdef name="if" classname="ise.antelope.tasks.IfTask"/>

	<import file="common.xml" />
	<import file="doc.xml" />

	<!-- Osgi properties -->
	<property name="manifest.dir" value="${src.extensions.dir}/org/objectweb/proactive/extensions/osgi/Manifest/" />
	<property name="manifest.example.dir" value="${src.examples.dir}/org/objectweb/proactive/examples/osgi/hello/Manifest/" />
	<property name="bundle.dir" value="${base.dir}/dist/bundle" />
	<property name="osgi.res.dir" value="${src.extensions.dir}/org/objectweb/proactive/extensions/osgi/res/"/>
	<property name="manifest.connector.dir" value="${src.extensions.dir}/org/objectweb/proactive/extensions/osgi/connector/Manifest/"/>
	<!--
		Create a timestamp for this build 
		If ${version} is defined its value is used as string version for this build
		Otherwise the timestamp is used
	-->
	<tstamp>
		<format property="TODAY" pattern="yyyy-MM-dd" />
	</tstamp>

	<if name="version">
		<property name="version_" value="${version}"/>
		<else>
			<property name="version_" value="${TODAY}"/>
		</else>
	</if>


	<!-- ================================================================ -->
	<!--                   define the different classpaths                -->
	<!--  =============================================================== -->

	<path id="test.classpath">
		<pathelement location="${dist.dir}/ProActive/ProActive.jar"/>
		<path refid="project.libs"/>
		<pathelement location="${cl.test.dir}/"/>
	</path>

	<path id="examples.classpath">
		<path refid="project.classpath" />
		<pathelement location="${lib.dir}/examples/clibwrapper_jiio.jar" />
		<pathelement location="${lib.dir}/examples/jai_codec.jar" />
		<pathelement location="${lib.dir}/examples/jai_core.jar" />
		<pathelement location="${lib.dir}/examples/mlibwrapper_jai.jar" />
		<pathelement location="${lib.dir}/examples/jai_imageio.jar" />
	</path>


	<!-- ================================================================ -->
	<!--                          Compile All                             -->
	<!--  =============================================================== -->

	<target name="compile" depends="core, extensions, extra, util, examples" description="build the class files" />


	<!-- ================================================================ -->
	<!--                  Clean up generated files                        -->
	<!--  =============================================================== -->

	<target name="clean" description="Remove all generated files">
		<delete dir="${classes.dir}" />
		<delete dir="${dist.dir}" />
		<delete dir="${docs.dir}" />
		<delete dir="${classlibs.dir}" />
		<delete dir="${test.classes.dir}" />
		<delete file="tests.log" />
		<delete file="descriptors/examples/DescriptorExamples.xsd"/>
		<delete dir="${junit.dir}" />
		<delete dir="${emma.dir}" />
	</target>


	<target name="check" depends="-init,util">
		<macrodef name="checkDir">
			<attribute name="dir" />
			<attribute name="tmpdir"/>
			<attribute name="prop"/>
			<sequential>
				<delete dir="@{tmpdir}" />
				<copy todir="@{tmpdir}">
					<fileset dir="@{dir}" />
				</copy>

				<format_m srcDir="@{tmpdir}" />

				<java fork="true" resultproperty="@{prop}" classname="diff.DiffJavaDir">
					<classpath refid="project.classpath" />
					<arg value="@{dir}" />
					<arg value="@{tmpdir}" />
				</java>
				<delete dir="@{tmpdir}" />
			</sequential>
		</macrodef>
		
		<parallel threadsperprocessor="1">
			<checkDir prop="check.proactive"  dir="${src.proactive.dir}"  tmpdir="${classes.dir}/tmp/ProActive"/>
			<checkDir prop="check.extensions" dir="${src.extensions.dir}" tmpdir="${classes.dir}/tmp/Extensions" />
			<checkDir prop="check.extra"      dir="${src.extra.dir}"      tmpdir="${classes.dir}/tmp/Extra" />
			<checkDir prop="check.examples"   dir="${src.examples.dir}"   tmpdir="${classes.dir}/tmp/Examples" />
			<checkDir prop="check.test"       dir="${src.test.dir}"       tmpdir="${classes.dir}/tmp/Tests" />
		</parallel>

		<condition property="check.failed">
			<or>
				<isfailure code="${check.proactive}" />
				<isfailure code="${check.extensions}" />
				<isfailure code="${check.extra}" />
				<isfailure code="${check.examples}" />
				<isfailure code="${check.test}" />
			</or>
		</condition>

		<if name="check.failed" exists="true">
			<fail message="Please use Jalopy (,/build format)" />
		</if>
	</target>

	<!-- ================================================================ -->
	<!--                       Initialisation                             -->
	<!--  =============================================================== -->

	<target name="-init">
		<!-- Create the build directory structure used by compile -->
		<mkdir dir="${classes.dir}" />
		<mkdir dir="${cl.examples.dir}"/>
		<mkdir dir="${cl.extra.dir}"/>
		<mkdir dir="${cl.extensions.dir}"/>
		<mkdir dir="${cl.proactive.dir}"/>
		<mkdir dir="${cl.test.dir}"/>
		<mkdir dir="${cl.utils.dir}"/>

		<echo message="--- Debugging is ${debug} ---" />
	</target>


	<target name="-configurationCopy" depends="-init">
		<copy toDir="${cl.proactive.dir}">
			<fileset dir="${src.proactive.dir}">
				<include name="org/**/*.xml" />
				<include name="org/**/*.fractal" />
				<include name="org/**/*.properties" />
				<include name="org/**/*.xsd" />
				<include name="org/**/*.png" />
				<include name="org/objectweb/proactive/core/component/adl/xml/proactive.dtd" />
			</fileset>
		</copy>
		<!-- copy descriptor schema -->
		<copy todir="${cl.proactive.dir}/${proactive.core.path}/descriptor/xml/" overwrite="yes">
			<fileset dir="${base.dir}/descriptors">
				<include name="*.xsd"/>
			</fileset>
		</copy>
		<copy todir="${base.dir}/descriptors/examples" overwrite="yes" file="${base.dir}/descriptors/DescriptorSchema.xsd"/>
	</target>


	<!-- ================================================================ -->
	<!--                   Compile ProActive Core                         -->
	<!--  =============================================================== -->

	<target name="core" depends="-configurationCopy" description="Compile the ProActive core classes">
		<!-- If it is a release, update ProActive.getVersion() -->
		<if name="version">
			<replaceregexp 
				file="${src.proactive.dir}/${proactive.path}/ProActive.java"		
				match="\$Id.*\$"
				replace="${version}"
				byline="true" />
		</if>

		<javac srcdir="${src.proactive.dir}:${src.utils.dir}" destdir="${cl.proactive.dir}" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
			<include name="**/*.java" />

			<!-- XXX, MicroTimer should be in core or not used by the core-->
		</javac>

		<rmic base="${cl.proactive.dir}" sourcebase="${cl.proactive.dir}" stubversion="1.2">
			<classpath refid="project.classpath" />
			<include name="org/objectweb/proactive/core/body/jini/JiniRemoteBodyImpl.class"/>
			<include name="org/objectweb/proactive/core/body/rmi/RmiRemoteBodyImpl.class"/>
			<include name="org/objectweb/proactive/core/body/rmi/RmiRemoteBodyForwarderImp.class"/>
			<include name="org/objectweb/proactive/core/body/ft/servers/FTServer.class"/>
			<include name="org/objectweb/proactive/core/runtime/rmi/RmiProActiveRuntimeImpl.class"/>
			<include name="org/objectweb/proactive/core/runtime/rmi/RmiProActiveRuntimeForwarderImpl.class"/>
			<include name="org/objectweb/proactive/core/runtime/jini/JiniRuntimeImpl.class"/>
		</rmic>

		<echo message="Java primitive type wrapper stubs generating..." />
		<java classname="org.objectweb.proactive.ext.util.StubGenerator" fork="true">
			<classpath refid="project.classpath" />
			<arg line="-srcDir ${cl.proactive.dir} -pkg org.objectweb.proactive.core.util.wrapper" />
		</java>
		
		<!-- XXX: MPI should be in Extensions -->
	
		<if>
			<bool>
				<and>
					<os family="Unix"/>
					<available file="mpicc" filepath="/bin:/usr/bin:/usr/local/bin"/>
					<!-- Bug #3128: Disable MPI anyway -->
					<available file="mpiIsBrokenIDontWantIt" filepath="/bin"/>
				</and>
			</bool>
				
				
			<!-- Delete existing header file to avoid conflict -->
			<delete>
				<fileset dir="${src.proactive.dir}/org/objectweb/proactive/mpi/control">
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm.h"/>
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm_MessageRecvHandler.h"/>
				</fileset>
			</delete>
		
			<!-- Generate header file (based on classpath) -->
			<javah 
				classpath="${cl.proactive.dir}" 
				force="yes" 
				class="org.objectweb.proactive.mpi.control.ProActiveMPIComm" 
				destdir="${src.proactive.dir}/org/objectweb/proactive/mpi/control/" />

			<!-- Generate library -->
			<exec dir="${cl.proactive.dir}" executable="mpicc" os="Linux">
				<arg line=" -I${java.home}/../include -I${java.home}/../include/linux ${src.proactive.dir}/org/objectweb/proactive/mpi/control/ProActiveMPIComm.c -o ${cl.proactive.dir}/${proactive.path}/mpi/control/libProActiveMPIComm.so -shared" />
			</exec>
							
			<!-- Delete object file generated in classes repository -->
			<delete>
				<fileset dir="${cl.proactive.dir}">
				    <include name="ProActiveMPIComm.o"/>
				</fileset>
			</delete>

			<!-- Delete existing header file to avoid conflict -->
			<delete>
				<fileset dir="${src.proactive.dir}/org/objectweb/proactive/mpi/control">
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm.h"/>
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm_MessageRecvHandler.h"/>
				</fileset>
			</delete>

			<!-- execute configure to generate Makefiles -->
			<exec dir="${src.proactive.dir}/${proactive.path}/mpi/control/config" executable="sh" os="Linux">
				<arg line="configure.sh " />
			</exec>

			<else>			
				<echo>Wrapping with control is only available for Unix and mpicc must be installed</echo>
			</else>
		</if>
	</target>


	<!-- ================================================================ -->
	<!--                   Compile ProActive Modules                      -->
	<!--  =============================================================== -->

	<target name="extensions" depends="core" description="Compile the ProActive extensions classes" >
		<subant target="-compile" inheritall="yes" failonerror="true">
			<fileset dir="${src.extensions.dir}" includes="**/build.xml"/>
		</subant>
	</target>

	
	<target name="extra" depends="core" description="Compile the ProActive extensions classes" >
		<subant target="-compile" inheritall="yes" failonerror="true" >
			<fileset dir="${src.extra.dir}" includes="**/build.xml"/>
		</subant>
	</target>

	
	<target name="p2p_daemon">
		<exec dir="${daemon.dir}/src/common" executable="cc" os="Linux, Darwin, SunOS">
			<arg line="-Wall -g -o proactivep2p -x c proactivep2p.cpp proactivep2p.h" />
		</exec>
		<exec dir="${daemon.dir}/src/common" executable="cc" os="Linux, Darwin, SunOS">
			<arg line="-Wall -g -o p2pctl -x c p2pctl.c proactivep2p.h" />
		</exec>
		<mkdir dir="${daemon.dir}/build" />
		<move file="${daemon.dir}/src/common/proactivep2p" todir="${daemon.dir}/build" />
		<move file="${daemon.dir}/src/common/p2pctl" todir="${daemon.dir}/build" />
	</target>


	<!-- ================================================================ -->
	<!--                      Compile Examples                            -->
	<!--  =============================================================== -->

	<target name="examples" depends="extensions" description="Compile all the examples">
		<!-- XXX, MicroTimer should be in core or not used by examples-->
		<javac srcdir="${src.examples.dir}:${src.utils.dir}" destdir="${cl.examples.dir}" includes="**/*.java" excludes="${proactive.path}/examples/nbody/common/NBody3DFrame.java" deprecation="on" source="${source}" debug="${debug}" encoding="UTF-8">
			<classpath refid="examples.classpath" />
		</javac>

		<copy todir="${cl.examples.dir}/${proactive.path}/examples" includeEmptyDirs="no">
			<fileset dir="${src.examples.dir}/${proactive.path}/examples">
				<exclude name="**/*.java" />
			</fileset>
		</copy>

		<available classname="com.sun.j3d.utils.behaviors.mouse.MouseWheelZoom" property="java3d_present"/>
		<if name="java3d_present">
			<echo message="Info: Java3D installed." />
			<javac srcdir="${src.examples.dir}" destdir="${cl.examples.dir}" includes="${proactive.path}/examples/nbody/common/NBody3DFrame.java" deprecation="on" source="${source}" debug="${debug}">
				<classpath refid="examples.classpath" />
			</javac>
			<else>
				<echo level="warning" message="Info: Java 3D dependencies were not resolved." />
			</else>
		</if>
	</target>

	<macrodef name="junitMacro">
		<attribute name="nodeDescriptor" />
		<element name="jvmargs" optional="yes" />
		<sequential>
			<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="unitTests/**" deprecation="on" source="${source}" debug="${debug}">
				<classpath refid="project.classpath" />
			</javac>
			<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="functionalTests/**" deprecation="on" source="${source}" debug="${debug}">
				<classpath refid="test.classpath" />
			</javac>
			<copy toDir="${cl.test.dir}">
				<fileset dir="${src.test.dir}">
					<include name="functionalTests/**/*.xml" />
					<include name="functionalTests/**/*.fractal" />
					<include name="functionalTests/**/*.properties" />
					<include name="functionalTests/**/*.xsd" />
				</fileset>
			</copy>

			<delete dir="${junit.dir}"/>
			<mkdir dir="${junit.dir}"/>
		
			<junit printsummary="yes" forkmode="perTest" showoutput="yes">
				<sysproperty key="PROACTIVE_TEST" value="1"/>
				<jvmarg value="-Dproactive.dir=${base.dir}"/>
	
				<classpath refid="test.classpath"/>
				<jvmarg value="-Djava.security.policy=${base.dir}/compile/proactive.java.policy" />
				<jvmarg value="-Dlog4j.configuration=file:${base.dir}/compile/proactive-log4j" />
				<jvmarg value="-DfunctionalTests.descriptor.defaultnodes.file=@{nodeDescriptor}" />
				<jvmargs/>

		
				<formatter type="xml"/>
				<batchtest fork="yes" todir="${junit.dir}">
					<fileset dir="${cl.test.dir}">
						<include name="unitTests/**/*.class"/>		
						<include name="functionalTests/**/*Test*.class"/>
						<exclude name="functionalTests/security/*/*.class"/>
						<exclude name="**/*$*.class"/>
						<exclude name="functionalTests/*.class"/>
					</fileset>
				</batchtest>
			</junit>
		</sequential>
	</macrodef>


	<target name="junitDistributed" depends="proActiveJar" description="Run all non regression tests">
		<junitMacro nodeDescriptor="/functionalTests/descriptor/defaultnodes/Nodes.xml" />
	</target>

	<target name="junit" depends="proActiveJar" description="Run all non regression tests on the current host only">
		<junitMacro nodedescriptor="/functionalTests/descriptor/defaultnodes/NodesLocal.xml"/>
	</target>
	
<!--	
	<target name="runTestsLocalHttp" depends="nonregressiontest, proActiveJar" description="Run all non regression tests on the current host only">
			<junitMacro nodedescriptor="/nonregressiontest/descriptor/defaultnodes/NodesLocal.xml">
			<jvmargs>
				<jvmarg value="-Dproactive.communication.protocol=http" />
				<jvmarg value="-Dproactive.http.port=2026" />
				<jvmarg value="-Dproactive.locationserver.rmi=http://locahost:2026/LocationServer" />
			</jvmargs>
			</runTestsMacro>
	</target>
-->
	<commit_msg>disable some component tests until I fix it ...<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="ProActive" default="compile" basedir=".">
	<taskdef name="if" classname="ise.antelope.tasks.IfTask"/>

	<import file="common.xml" />
	<import file="doc.xml" />

	<!-- Osgi properties -->
	<property name="manifest.dir" value="${src.extensions.dir}/org/objectweb/proactive/extensions/osgi/Manifest/" />
	<property name="manifest.example.dir" value="${src.examples.dir}/org/objectweb/proactive/examples/osgi/hello/Manifest/" />
	<property name="bundle.dir" value="${base.dir}/dist/bundle" />
	<property name="osgi.res.dir" value="${src.extensions.dir}/org/objectweb/proactive/extensions/osgi/res/"/>
	<property name="manifest.connector.dir" value="${src.extensions.dir}/org/objectweb/proactive/extensions/osgi/connector/Manifest/"/>
	<!--
		Create a timestamp for this build 
		If ${version} is defined its value is used as string version for this build
		Otherwise the timestamp is used
	-->
	<tstamp>
		<format property="TODAY" pattern="yyyy-MM-dd" />
	</tstamp>

	<if name="version">
		<property name="version_" value="${version}"/>
		<else>
			<property name="version_" value="${TODAY}"/>
		</else>
	</if>


	<!-- ================================================================ -->
	<!--                   define the different classpaths                -->
	<!--  =============================================================== -->

	<path id="test.classpath">
		<pathelement location="${dist.dir}/ProActive/ProActive.jar"/>
		<path refid="project.libs"/>
		<pathelement location="${cl.test.dir}/"/>
	</path>

	<path id="examples.classpath">
		<path refid="project.classpath" />
		<pathelement location="${lib.dir}/examples/clibwrapper_jiio.jar" />
		<pathelement location="${lib.dir}/examples/jai_codec.jar" />
		<pathelement location="${lib.dir}/examples/jai_core.jar" />
		<pathelement location="${lib.dir}/examples/mlibwrapper_jai.jar" />
		<pathelement location="${lib.dir}/examples/jai_imageio.jar" />
	</path>


	<!-- ================================================================ -->
	<!--                          Compile All                             -->
	<!--  =============================================================== -->

	<target name="compile" depends="core, extensions, extra, util, examples" description="build the class files" />


	<!-- ================================================================ -->
	<!--                  Clean up generated files                        -->
	<!--  =============================================================== -->

	<target name="clean" description="Remove all generated files">
		<delete dir="${classes.dir}" />
		<delete dir="${dist.dir}" />
		<delete dir="${docs.dir}" />
		<delete dir="${classlibs.dir}" />
		<delete dir="${test.classes.dir}" />
		<delete file="tests.log" />
		<delete file="descriptors/examples/DescriptorExamples.xsd"/>
		<delete dir="${junit.dir}" />
		<delete dir="${emma.dir}" />
	</target>


	<target name="check" depends="-init,util">
		<macrodef name="checkDir">
			<attribute name="dir" />
			<attribute name="tmpdir"/>
			<attribute name="prop"/>
			<sequential>
				<delete dir="@{tmpdir}" />
				<copy todir="@{tmpdir}">
					<fileset dir="@{dir}" />
				</copy>

				<format_m srcDir="@{tmpdir}" />

				<java fork="true" resultproperty="@{prop}" classname="diff.DiffJavaDir">
					<classpath refid="project.classpath" />
					<arg value="@{dir}" />
					<arg value="@{tmpdir}" />
				</java>
				<delete dir="@{tmpdir}" />
			</sequential>
		</macrodef>
		
		<parallel threadsperprocessor="1">
			<checkDir prop="check.proactive"  dir="${src.proactive.dir}"  tmpdir="${classes.dir}/tmp/ProActive"/>
			<checkDir prop="check.extensions" dir="${src.extensions.dir}" tmpdir="${classes.dir}/tmp/Extensions" />
			<checkDir prop="check.extra"      dir="${src.extra.dir}"      tmpdir="${classes.dir}/tmp/Extra" />
			<checkDir prop="check.examples"   dir="${src.examples.dir}"   tmpdir="${classes.dir}/tmp/Examples" />
			<checkDir prop="check.test"       dir="${src.test.dir}"       tmpdir="${classes.dir}/tmp/Tests" />
		</parallel>

		<condition property="check.failed">
			<or>
				<isfailure code="${check.proactive}" />
				<isfailure code="${check.extensions}" />
				<isfailure code="${check.extra}" />
				<isfailure code="${check.examples}" />
				<isfailure code="${check.test}" />
			</or>
		</condition>

		<if name="check.failed" exists="true">
			<fail message="Please use Jalopy (,/build format)" />
		</if>
	</target>

	<!-- ================================================================ -->
	<!--                       Initialisation                             -->
	<!--  =============================================================== -->

	<target name="-init">
		<!-- Create the build directory structure used by compile -->
		<mkdir dir="${classes.dir}" />
		<mkdir dir="${cl.examples.dir}"/>
		<mkdir dir="${cl.extra.dir}"/>
		<mkdir dir="${cl.extensions.dir}"/>
		<mkdir dir="${cl.proactive.dir}"/>
		<mkdir dir="${cl.test.dir}"/>
		<mkdir dir="${cl.utils.dir}"/>

		<echo message="--- Debugging is ${debug} ---" />
	</target>


	<target name="-configurationCopy" depends="-init">
		<copy toDir="${cl.proactive.dir}">
			<fileset dir="${src.proactive.dir}">
				<include name="org/**/*.xml" />
				<include name="org/**/*.fractal" />
				<include name="org/**/*.properties" />
				<include name="org/**/*.xsd" />
				<include name="org/**/*.png" />
				<include name="org/objectweb/proactive/core/component/adl/xml/proactive.dtd" />
			</fileset>
		</copy>
		<!-- copy descriptor schema -->
		<copy todir="${cl.proactive.dir}/${proactive.core.path}/descriptor/xml/" overwrite="yes">
			<fileset dir="${base.dir}/descriptors">
				<include name="*.xsd"/>
			</fileset>
		</copy>
		<copy todir="${base.dir}/descriptors/examples" overwrite="yes" file="${base.dir}/descriptors/DescriptorSchema.xsd"/>
	</target>


	<!-- ================================================================ -->
	<!--                   Compile ProActive Core                         -->
	<!--  =============================================================== -->

	<target name="core" depends="-configurationCopy" description="Compile the ProActive core classes">
		<!-- If it is a release, update ProActive.getVersion() -->
		<if name="version">
			<replaceregexp 
				file="${src.proactive.dir}/${proactive.path}/ProActive.java"		
				match="\$Id.*\$"
				replace="${version}"
				byline="true" />
		</if>

		<javac srcdir="${src.proactive.dir}:${src.utils.dir}" destdir="${cl.proactive.dir}" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
			<include name="**/*.java" />

			<!-- XXX, MicroTimer should be in core or not used by the core-->
		</javac>

		<rmic base="${cl.proactive.dir}" sourcebase="${cl.proactive.dir}" stubversion="1.2">
			<classpath refid="project.classpath" />
			<include name="org/objectweb/proactive/core/body/jini/JiniRemoteBodyImpl.class"/>
			<include name="org/objectweb/proactive/core/body/rmi/RmiRemoteBodyImpl.class"/>
			<include name="org/objectweb/proactive/core/body/rmi/RmiRemoteBodyForwarderImp.class"/>
			<include name="org/objectweb/proactive/core/body/ft/servers/FTServer.class"/>
			<include name="org/objectweb/proactive/core/runtime/rmi/RmiProActiveRuntimeImpl.class"/>
			<include name="org/objectweb/proactive/core/runtime/rmi/RmiProActiveRuntimeForwarderImpl.class"/>
			<include name="org/objectweb/proactive/core/runtime/jini/JiniRuntimeImpl.class"/>
		</rmic>

		<echo message="Java primitive type wrapper stubs generating..." />
		<java classname="org.objectweb.proactive.ext.util.StubGenerator" fork="true">
			<classpath refid="project.classpath" />
			<arg line="-srcDir ${cl.proactive.dir} -pkg org.objectweb.proactive.core.util.wrapper" />
		</java>
		
		<!-- XXX: MPI should be in Extensions -->
	
		<if>
			<bool>
				<and>
					<os family="Unix"/>
					<available file="mpicc" filepath="/bin:/usr/bin:/usr/local/bin"/>
					<!-- Bug #3128: Disable MPI anyway -->
					<available file="mpiIsBrokenIDontWantIt" filepath="/bin"/>
				</and>
			</bool>
				
				
			<!-- Delete existing header file to avoid conflict -->
			<delete>
				<fileset dir="${src.proactive.dir}/org/objectweb/proactive/mpi/control">
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm.h"/>
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm_MessageRecvHandler.h"/>
				</fileset>
			</delete>
		
			<!-- Generate header file (based on classpath) -->
			<javah 
				classpath="${cl.proactive.dir}" 
				force="yes" 
				class="org.objectweb.proactive.mpi.control.ProActiveMPIComm" 
				destdir="${src.proactive.dir}/org/objectweb/proactive/mpi/control/" />

			<!-- Generate library -->
			<exec dir="${cl.proactive.dir}" executable="mpicc" os="Linux">
				<arg line=" -I${java.home}/../include -I${java.home}/../include/linux ${src.proactive.dir}/org/objectweb/proactive/mpi/control/ProActiveMPIComm.c -o ${cl.proactive.dir}/${proactive.path}/mpi/control/libProActiveMPIComm.so -shared" />
			</exec>
							
			<!-- Delete object file generated in classes repository -->
			<delete>
				<fileset dir="${cl.proactive.dir}">
				    <include name="ProActiveMPIComm.o"/>
				</fileset>
			</delete>

			<!-- Delete existing header file to avoid conflict -->
			<delete>
				<fileset dir="${src.proactive.dir}/org/objectweb/proactive/mpi/control">
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm.h"/>
					<include name="org_objectweb_proactive_mpi_control_ProActiveMPIComm_MessageRecvHandler.h"/>
				</fileset>
			</delete>

			<!-- execute configure to generate Makefiles -->
			<exec dir="${src.proactive.dir}/${proactive.path}/mpi/control/config" executable="sh" os="Linux">
				<arg line="configure.sh " />
			</exec>

			<else>			
				<echo>Wrapping with control is only available for Unix and mpicc must be installed</echo>
			</else>
		</if>
	</target>


	<!-- ================================================================ -->
	<!--                   Compile ProActive Modules                      -->
	<!--  =============================================================== -->

	<target name="extensions" depends="core" description="Compile the ProActive extensions classes" >
		<subant target="-compile" inheritall="yes" failonerror="true">
			<fileset dir="${src.extensions.dir}" includes="**/build.xml"/>
		</subant>
	</target>

	
	<target name="extra" depends="core" description="Compile the ProActive extensions classes" >
		<subant target="-compile" inheritall="yes" failonerror="true" >
			<fileset dir="${src.extra.dir}" includes="**/build.xml"/>
		</subant>
	</target>

	
	<target name="p2p_daemon">
		<exec dir="${daemon.dir}/src/common" executable="cc" os="Linux, Darwin, SunOS">
			<arg line="-Wall -g -o proactivep2p -x c proactivep2p.cpp proactivep2p.h" />
		</exec>
		<exec dir="${daemon.dir}/src/common" executable="cc" os="Linux, Darwin, SunOS">
			<arg line="-Wall -g -o p2pctl -x c p2pctl.c proactivep2p.h" />
		</exec>
		<mkdir dir="${daemon.dir}/build" />
		<move file="${daemon.dir}/src/common/proactivep2p" todir="${daemon.dir}/build" />
		<move file="${daemon.dir}/src/common/p2pctl" todir="${daemon.dir}/build" />
	</target>


	<!-- ================================================================ -->
	<!--                      Compile Examples                            -->
	<!--  =============================================================== -->

	<target name="examples" depends="extensions" description="Compile all the examples">
		<!-- XXX, MicroTimer should be in core or not used by examples-->
		<javac srcdir="${src.examples.dir}:${src.utils.dir}" destdir="${cl.examples.dir}" includes="**/*.java" excludes="${proactive.path}/examples/nbody/common/NBody3DFrame.java" deprecation="on" source="${source}" debug="${debug}" encoding="UTF-8">
			<classpath refid="examples.classpath" />
		</javac>

		<copy todir="${cl.examples.dir}/${proactive.path}/examples" includeEmptyDirs="no">
			<fileset dir="${src.examples.dir}/${proactive.path}/examples">
				<exclude name="**/*.java" />
			</fileset>
		</copy>

		<available classname="com.sun.j3d.utils.behaviors.mouse.MouseWheelZoom" property="java3d_present"/>
		<if name="java3d_present">
			<echo message="Info: Java3D installed." />
			<javac srcdir="${src.examples.dir}" destdir="${cl.examples.dir}" includes="${proactive.path}/examples/nbody/common/NBody3DFrame.java" deprecation="on" source="${source}" debug="${debug}">
				<classpath refid="examples.classpath" />
			</javac>
			<else>
				<echo level="warning" message="Info: Java 3D dependencies were not resolved." />
			</else>
		</if>
	</target>

	<macrodef name="junitMacro">
		<attribute name="nodeDescriptor" />
		<element name="jvmargs" optional="yes" />
		<sequential>
			<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="unitTests/**" deprecation="on" source="${source}" debug="${debug}">
				<classpath refid="project.classpath" />
			</javac>
			<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="functionalTests/**" deprecation="on" source="${source}" debug="${debug}">
				<classpath refid="test.classpath" />
			</javac>
			<copy toDir="${cl.test.dir}">
				<fileset dir="${src.test.dir}">
					<include name="functionalTests/**/*.xml" />
					<include name="functionalTests/**/*.fractal" />
					<include name="functionalTests/**/*.properties" />
					<include name="functionalTests/**/*.xsd" />
				</fileset>
			</copy>

			<delete dir="${junit.dir}"/>
			<mkdir dir="${junit.dir}"/>
		
			<junit printsummary="yes" forkmode="perTest" showoutput="yes">
				<sysproperty key="PROACTIVE_TEST" value="1"/>
				<jvmarg value="-Dproactive.dir=${base.dir}"/>
	
				<classpath refid="test.classpath"/>
				<jvmarg value="-Djava.security.policy=${base.dir}/compile/proactive.java.policy" />
				<jvmarg value="-Dlog4j.configuration=file:${base.dir}/compile/proactive-log4j" />
				<jvmarg value="-DfunctionalTests.descriptor.defaultnodes.file=@{nodeDescriptor}" />
				<jvmargs/>

		
				<formatter type="xml"/>
				<batchtest fork="yes" todir="${junit.dir}">
					<fileset dir="${cl.test.dir}">
   						<include name="unitTests/**/*.class"/>
						<include name="functionalTests/**/*Test*.class"/>
						<exclude name="functionalTests/security/*/*.class"/>
						<exclude name="**/*$*.class"/>
						<exclude name="functionalTests/*.class"/>
						<exclude name="functionalTests/component/collectiveitf/**/*"/>
						<exclude name="functionalTests/component/conform/**/*"/>
						<exclude name="functionalTests/component/lookup/**/*"/>
						<exclude name="functionalTests/component/migration/**/*"/>
					</fileset>
				</batchtest>
			</junit>
		</sequential>
	</macrodef>


	<target name="junitDistributed" depends="proActiveJar" description="Run all non regression tests">
		<junitMacro nodeDescriptor="/functionalTests/descriptor/defaultnodes/Nodes.xml" />
	</target>

	<target name="junit" depends="proActiveJar" description="Run all non regression tests on the current host only">
		<junitMacro nodedescriptor="/functionalTests/descriptor/defaultnodes/NodesLocal.xml"/>
	</target>
	
<!--	
	<target name="runTestsLocalHttp" depends="nonregressiontest, proActiveJar" description="Run all non regression tests on the current host only">
			<junitMacro nodedescriptor="/nonregressiontest/descriptor/defaultnodes/NodesLocal.xml">
			<jvmargs>
				<jvmarg value="-Dproactive.communication.protocol=http" />
				<jvmarg value="-Dproactive.http.port=2026" />
				<jvmarg value="-Dproactive.locationserver.rmi=http://locahost:2026/LocationServer" />
			</jvmargs>
			</runTestsMacro>
	</target>
-->
	
{'fraction_non_alphanumeric': 0.24681436895690595, 'fraction_numerical': 0.0024332458218607926, 'mean_word_length': 3.8599657694103002, 'pattern_counts': {'":': 0, '<': 619, '<?xml version=': 2, '>': 619, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 26}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '184155', 'n_tokens_mistral': 11055, 'n_tokens_neox': 9449, 'n_words': 1618}