<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" />

	<property name="proactive.path" value="org/objectweb/proactive" />
	<property name="proactive.core.path" value="${proactive.path}/core" />
	<property name="proactive.ext.path" value="${proactive.path}/ext" />

	<!-- Osgi properties -->
	<property name="manifest.dir" value="${src.dir}/org/objectweb/proactive/osgi/Manifest/" />
	<property name="manifest.example.dir" value="${src.dir}/org/objectweb/proactive/examples/osgi/hello/Manifest/" />
	<property name="config.dir" value="${classes.dir}/${proactive.core.path}/config/" />
	<property name="bundle.dir" value="${base.dir}/dist/bundle" />

	<!--
		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, util, ic2d, 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"/>
	</target>


	<target name="check" depends="-init,util">
		<property name="tmp.dir" value="${classes.dir}/tmp"/>
		<macrodef name="checkDir">
			<attribute name="dir" />
			<sequential>
				<delete dir="${tmp.dir}" />
				<copy todir="${tmp.dir}">
					<fileset dir="@{dir}" />
				</copy>

				<format_m srcDir="${tmp.dir}" />

				<java fork="true" resultproperty="diffReturnVal" classname="util.diff.DiffJavaDir">
					<classpath refid="project.classpath" />
					<arg value="@{dir}" />
					<arg value="${tmp.dir}" />
				</java>
				<delete dir="${tmp.dir}" />
				<if name="diffReturnVal" value="1">
					<fail message="Please use Jalopy" />
				</if>
			</sequential>
		</macrodef>

		<checkDir dir="${src.proactive.dir}" />
		<checkDir dir="${src.extensions.dir}" />
		<checkDir dir="${src.examples.dir}" />
	</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.ic2d.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/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>
	</target>


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

	<target name="extensions" depends="core" description="Compile the ProActive extensions classes" >
		<subant target="-compile" inheritall="yes" >
			<fileset dir="${src.extensions.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 ic2d                            -->
	<!--  =============================================================== -->

	<target name="ic2d" depends="core" description="Compile the IC2D Tool">
		<javac srcdir="${src.ic2d.dir}" destdir="${cl.ic2d.dir}" includes="**/*.java" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
		</javac>
		<copy todir="${cl.ic2d.dir}/${proactive.path}/ic2d/gui/images" includeEmptyDirs="no">
			<fileset dir="${src.ic2d.dir}/${proactive.path}/ic2d/gui/images" />
		</copy>
		<!-- JobMonitor images -->
		<copy todir="${cl.ic2d.dir}/${proactive.path}/ic2d/gui/jobmonitor/images" includeEmptyDirs="no">
			<fileset dir="${src.ic2d.dir}/${proactive.path}/ic2d/gui/jobmonitor/images" />
		</copy>
	</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>


	<!-- ================================================================ -->
	<!--                      Compile Test Suite                         -->
	<!--  =============================================================== -->

	<target name="testsuite" depends="core">
		<!-- XXX Depends on core because of ProActiveLogger -->
		<copy toDir="${cl.test.dir}/testsuite">
			<fileset dir="${src.test.dir}/testsuite">
				<include name="**/*.properties" />
				<include name="**/*.css" />
				<include name="**/*.xml" />
				<include name="**/*.xsl" />
				<include name="**/*.xsd" />
			</fileset>
		</copy>
		<mkdir dir="${test.classes.dir}"/>
		<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="testsuite/**" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
		</javac>
	</target>


	<!-- ================================================================ -->
	<!--            Compile non regression test                            -->
	<!-- ================================================================ -->

	<target name="nonregressiontest" depends="testsuite, compile">
		<copy toDir="${cl.test.dir}">
			<fileset dir="${src.test.dir}">
				<include name="nonregressiontest/**/*.xml" />
				<include name="nonregressiontest/**/*.fractal" />
				<include name="nonregressiontest/**/*.properties" />
				<include name="nonregressiontest/**/*.xsd" />
			</fileset>
		</copy>
		<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="nonregressiontest/**" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
		</javac>
	</target>


	<!-- ================================================================ -->
	<!--       Run non regression test with TestSuite API                  -->
	<!-- ================================================================ -->

	<macrodef name="runTestsMacro">
		<attribute name="nodeDescriptor" />
		<element name="jvmargs" optional="yes" />
		<sequential>
			<delete dir="${base.dir}/compile/log" />
			<java classname="nonregressiontest.MainManager" fork="true">
				<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="-Xdebug" />
				<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888"/>
				<jvmarg value="-Dnonregressiontest.descriptor.defaultnodes.file=@{nodeDescriptor}" />
				<jvmargs/>
			</java>
		</sequential>
	</macrodef>


	<target name="runTests" depends="nonregressiontest, proActiveJar" description="Run all non regression tests">
		<runTestsMacro nodeDescriptor="/nonregressiontest/descriptor/defaultnodes/Nodes.xml" />
	</target>


	<target name="runTestsLocal" depends="nonregressiontest, proActiveJar" description="Run all non regression tests on the current host only">
		<runTestsMacro nodedescriptor="/nonregressiontest/descriptor/defaultnodes/NodesLocal.xml"/>
	</target>


	<target name="runTestsLocalIbis" depends="nonregressiontest, proActiveJar">
		<runTestsMacro nodedescriptor="/nonregressiontest/descriptor/defaultnodes/NodesLocalIbis.xml">
			<jvmargs>
				<jvmarg value="-Dproactive.rmi=ibis" />
				<jvmarg value="-Dibis.serialization=sun" />
				<jvmarg value="-Dibis.name_server.host=localhost" />
				<jvmarg value="-Dibis.name_server.pool=rutget" />
				<jvmarg value="-Dibis.pool_host_number=1" />
				<jvmarg value="-Dibis.name_server.key=12" />
				<jvmarg value="-Dibis.property.file=/home1/fabrice/workIbis/Ibis/properties" />
			</jvmargs>
		</runTestsMacro>
	</target>


	<!-- ================================================================ -->
	<!--   Tests coverage : need clover license in user.home directory    -->
	<!-- ================================================================ -->

	<!-- Commented for the release
    <property name="coverage.dir" value="${base.dir}/compile/coverage"/>
    
    <path id="coverage.classpath">
    <path refid="test.classpath"/>
    <pathelement location="${base.dir}/dev/lib/clover.jar"/>
    <pathelement location="${base.dir}/dev/lib/cenquatasks.jar"/>
    </path>
    
    <taskdef resource="com/cenqua/ant/antlib.xml" classpath="${base.dir}/dev/lib/cenquatasks.jar"/>
    <extendclasspath path="${base.dir}/dev/lib/clover.jar"/>
    <taskdef resource="clovertasks" classpath="${base.dir}/dev/lib/clover.jar"/>
    
    <target name="coverage-init">
    <delete file="coverage*.*"/>
    <copy file="${user.home}/clover.license" todir="${base.dir}/dev/lib"/>
    <clover-setup initString="coverage.db">
    <files>
    <exclude name="org/objectweb/proactive/ic2d/**/*.java"/>
    <exclude name="org/objectweb/proactive/examples/**/*.java"/>
    <exclude name="org/objectweb/proactive/ext/**/*.java"/>
    <exclude name="nonregressiontest/**/*.java"/>
    <exclude name="testsuite/**/*.java"/>
    </files>
    </clover-setup>
    </target>
    
    <target name="testsCoverage" depends="coverage-init, compile, proActiveJar, testsuite, nonregressiontest">
    <delete file="${base.dir}/compile/tests.log"/> -->
	<!-- classloader test needs clover tasks as specified in deployment-coverage.xml file -->
	<!-- 
    <move file="${classes.dir}/nonregressiontest/runtime/classloader/deployment-coverage.xml" tofile="${classes.dir}/nonregressiontest/runtime/classloader/deployment.xml"/>
    <java classname="nonregressiontest.MainManager" fork="true">
    <classpath refid="coverage.classpath"/>
    <jvmarg value="-Djava.security.policy=${base.dir}/compile/proactive.java.policy"/>
    <jvmarg value="-Dlog4j.configuration=file:${base.dir}/compile/proactive-log4j"/>
    <jvmarg value="-Dnonregressiontest.descriptor.defaultnodes.file=/nonregressiontest/descriptor/defaultnodes/NodesLocal.xml"/>
    </java>
    <clover-report>
    <current outfile="clover_html">
    <format type="html"/>
    </current>
    </clover-report>
    </target> -->


	<!-- ================================================================ -->
	<!--                      Compile TryWithCatch annotator              -->
	<!--  =============================================================== -->

	<target name="trywithcatch" depends="-init">
		<javac srcdir="${src.utils.dir}" destdir="${cl.utils.dir}" includes="trywithcatch/**" deprecation="on" source="${source}" debug="${debug}" />
	</target>


	<!-- ================================================================ -->
	<!--                      Compile util                                -->
	<!--  =============================================================== -->

	<target name="util" depends="-init, core">
		<!-- XXX Timer is in core.util.Profiling -->
		<javac srcdir="${src.utils.dir}" destdir="${cl.utils.dir}" includes="**" deprecation="on" source="${source}" debug="${debug}" >
			<classpath refid="project.classpath" />
		</javac>
	</target>




	<!-- ================================================================ -->
	<!--                      Create ProActive.jar                        -->
	<!--  =============================================================== -->
	<target name="proActiveJar" depends="dist-mk-dir, compile" description="Create the ProActive jar, to be used for instance on a distant host">
		<jar jarfile="${PAdist.dir}/ProActive.jar">
			<fileset dir="${cl.proactive.dir}" includes="**"/>
			<fileset dir="${cl.extensions.dir}"    includes="**"/>
		</jar>
	</target>


	<!-- ================================================================ -->
	<!--           Generate ProActive stubs for all classes               -->
	<!-- ================================================================ -->

	<target name="stubGenerator" depends="-init">
		<javac srcdir="${src.dir}" destdir="${classes.dir}" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
			<include name="${proactive.path}/ext/util/StubGenerator.java" />
		</javac>
	</target>


	<target name="stub" depends="stubGenerator, core">
		<property name="stub.classdir" value="${cl.proactive.dir}" />

		<java classname="org.objectweb.proactive.ext.util.StubGenerator" fork="true">
			<classpath refid="project.classpath" />
			<arg line="-srcDir ${cl.proactive.dir} -pkg org.objectweb.proactive" />
		</java>
	</target>


	<!-- ================================================================ -->
	<!--                  Create  distribution bin                        -->
	<!--  =============================================================== -->

	<target name="dist-mk-dir" description="Make distribution directories">
		<delete dir="${dist.dir}" />
		<mkdir dir="${dist.dir}" />
		<mkdir dir="${PAdist.dir}" />
	</target>


	<target name="dist-cp-files" depends="dist-mk-dir" 
		description="Copy files for the release">
		<!--        copy docs / scripts / src / compile / lib      -->
		<copy todir="${PAdist.dir}" includeEmptyDirs="no">
			<fileset dir="${base.dir}">
				<include name="README.html" />
				<include name="docs/**" />
				<include name="doc-src/**" />
				<include name="scripts/**" />
				<include name="src/org/**" />
				<include name="compile/**" />
				<include name="lib/**" />
				<include name="descriptors/**" />
				<include name="p2p/**" />
				<include name="ic2d-plugins-src/**" />

				<exclude name="p2p/config/**" />
				<exclude name="**/.svn" />
				<exclude name="scripts/unix/grid5000/**" />
				<exclude name="scripts/unix/gridexperiment/**" />
			</fileset>
		</copy>
		<!-- set right files permissions -->
		<chmod dir="${PAdist.dir}/scripts/unix" perm="755" includes="**/*.sh" />
		<chmod file="${PAdist.dir}/compile/build" perm="755" />
	</target>


	<target name="dist-examples_ic2d-jar" 
		depends="dist-mk-dir, compile">
		<!-- Build the examples Jar -->
		<jar jarfile="${PAdist.dir}/ProActive_examples.jar" 
			basedir="${cl.examples.dir}" 
			includes="**" />
		<!-- Build ic2d (NOT ECLIPSE version) Jar -->
		<jar jarfile="${PAdist.dir}/ic2d.jar" basedir="${cl.ic2d.dir}"
			includes="**" />
	</target>


	<target name="dist-bin"
		depends="dist-examples_ic2d-jar, proActiveJar, dist-cp-files"
		description="Create zip with only jars">
		<!-- Zip with Jars: PA, PAExamples, required libs, scripts -->
		<zip zipfile="${dist.dir}/ProActive-bin_${version_}.zip">
			<zipfileset dir="${PAdist.dir}" filemode="755" prefix="ProActive">
				<exclude name="src/**" />
				<exclude name="compile/**" />
				<exclude name="doc-src/**" />
				<exclude name="p2p/**" />
				<exclude name="docs/**" />
				<exclude name="README.html" />
				<exclude name="ic2d-plugins-src/**" />
			</zipfileset>
		</zip>
	</target>


	<target name="dist-doc" depends="docs, dist-cp-files"
		description="Create zip with only doc">
		<zip zipfile="${dist.dir}/ProActive-doc_${version_}.zip">
			<zipfileset dir="${PAdist.dir}/docs" prefix="ProActive/docs" />
		</zip>
	</target>


	<target name="dist-src" depends="dist-cp-files"
		description="Create zip with only sources and libs">
		<zip zipfile="${dist.dir}/ProActive-src_${version_}.zip">
			<zipfileset dir="${PAdist.dir}" filemode="755" prefix="ProActive" >
				<exclude name="docs/**"/>
				<exclude name="ProActive_examples.jar" />
				<exclude name="ic2d.jar" />
				<exclude name="ProActive.jar" />
			</zipfileset>
		</zip>
	</target>


	<target name="dist-bundle" depends="dist-cp-files, proActiveJar, dist-examples_ic2d-jar"
		description="Create a zip with everythings">
		<zip zipfile="${dist.dir}/ProActive-bundle_${version_}.zip">
			<zipfileset dir="${PAdist.dir}" filemode="755" prefix="ProActive">
				<exclude name="doc-src/**" />
			</zipfileset>
		</zip>
	</target>


	<target name="dist" depends="dist-doc, dist-bin, dist-src, dist-bundle" 
		description="Create zips for release"/>


	<!-- ================================================================ -->
	<!--        Same as below + format source files                       -->
	<!--  =============================================================== -->

	<target name="copyright_format" depends="update_copyright_and_version, format" />


	<!-- ================================================================ -->
	<!--        Update Copyright and Version in every text files          -->
	<!--  =============================================================== -->

	<target name="update_copyright_and_version" depends="util">
		<java classname="util.UpdateCopyrightAndVersion" fork="true">
			<classpath refid="project.classpath" />
			<!--  base dir -->
			<arg value="${base.dir}" />
			<!--  exclude dirs -->
			<arg value="${docs.dir}" />
			<arg value="${dist.dir}" />
			<arg value="${classes.dir}" />
			<arg value="${test-classes.dir}" />
			<arg value="${lib.dir}" />
			<arg value="${dev.dir}" />
		</java>
	</target>


	<!-- ================================================================ -->
	<!--            Formats the project sources                           -->
	<!-- ================================================================ -->

	<macrodef name="format_m">
		<attribute name="srcDir" />
		<attribute name="loglevel" default="WARN"/>
		<sequential>
			<!-- declare the Jalopy task -->
			<taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
				<classpath>
					<fileset dir="${base.dir}/dev/lib">
						<include name="*.jar" />
					</fileset>
					<fileset dir="${lib.dir}">
						<include name="log4j.jar" />
					</fileset>
				</classpath>
			</taskdef>

			<jalopy classpathref="project.classpath" convention="${basedir}/proactiveJalopy.xml">
				<fileset dir="@{srcDir}">
					<include name="**/*.java" />
				</fileset>
			</jalopy>
		</sequential>
	</macrodef>

	<target name="format" description="Formats the project source files">
		<format_m srcdir="${src.proactive.dir}"/>
		<format_m srcdir="${src.extensions.dir}"/>
		<format_m srcdir="${src.examples.dir}"/>
	</target>

	<!-- ================================================================ -->
	<!--               Ibisc to generate stubs/skels                      -->
	<!-- ================================================================ -->
	<target name="ibis" description="Everything related to ProActive IBIS">
		<delete>
			<fileset dir="${classes.dir}" includes="**/rmi*.java" />
		</delete>
		<java classname="ibis.frontend.rmi.Main" fork="true" dir="${classes.dir}/org/objectweb/proactive/core/body/ibis/">
			<classpath refid="project.classpath" />
			<arg value="org.objectweb.proactive.core.body.ibis.IbisRemoteBodyImpl" />
		</java>
		<java classname="ibis.frontend.rmi.Main" fork="true" dir="${classes.dir}/org/objectweb/proactive/core/runtime/ibis/">
			<classpath refid="project.classpath" />
			<arg value="org.objectweb.proactive.core.runtime.ibis.RemoteProActiveRuntimeImpl" />
		</java>
		<javac srcdir="${classes.dir}" destdir="${classes.dir}" deprecation="on" source="${source}" debug="${debug}">
			<include name="**/*.java" />
			<classpath refid="project.classpath" />
		</javac>
	</target>


	<target name="jdepend"  depends="compile" description="JDepend report">
		<macrodef name="jdependMacro">
			<attribute name="outputfile" />
			<attribute name="classesdir" />
			<sequential>
				<jdepend format="xml" outputfile="${base.dir}/@{outputfile}.xml">
					<classespath>
						<pathelement location="@{classesdir}" />
					</classespath>
				</jdepend>
				<xslt includes="@{outputfile}.xml" basedir="${base.dir}" destdir="${base.dir}" style="jdepend.xsl" />
				<delete>
					<fileset dir="${base.dir}">
						<include name="@{outputfile}.xml"/>
					</fileset>
				</delete>
				<echo> --> JDepend report available: ${base.dir}/@{outputfile}.html</echo>
			</sequential>
		</macrodef>

		<jdependMacro outputfile="jdepend_core" classesdir="${cl.proactive.dir}" />
		<jdependMacro outputfile="jdepend_all"  classesdir="${classes.dir}"/>
	</target>


	<!-- ==================================================================== -->
	<!-- Compile native MicroTimer                                                    -->
	<!-- ==================================================================== -->
	<target name="microTimer">
		<exec dir="${src.dir}/org/objectweb/proactive/core/util/timer" executable="g++" os="Linux">
			<arg line=" -shared -o libMicroTimer.so  MicroTimer.cc" />
		</exec>
		<copy file="${src.dir}/org/objectweb/proactive/core/util/timer/libMicroTimer.so" todir="${lib.dir}" />
	</target>

</project>
<commit_msg>Updated DiffJavaDir package in build.xml<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" />

	<property name="proactive.path" value="org/objectweb/proactive" />
	<property name="proactive.core.path" value="${proactive.path}/core" />
	<property name="proactive.ext.path" value="${proactive.path}/ext" />

	<!-- Osgi properties -->
	<property name="manifest.dir" value="${src.dir}/org/objectweb/proactive/osgi/Manifest/" />
	<property name="manifest.example.dir" value="${src.dir}/org/objectweb/proactive/examples/osgi/hello/Manifest/" />
	<property name="config.dir" value="${classes.dir}/${proactive.core.path}/config/" />
	<property name="bundle.dir" value="${base.dir}/dist/bundle" />

	<!--
		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, util, ic2d, 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"/>
	</target>


	<target name="check" depends="-init,util">
		<property name="tmp.dir" value="${classes.dir}/tmp"/>
		<macrodef name="checkDir">
			<attribute name="dir" />
			<sequential>
				<delete dir="${tmp.dir}" />
				<copy todir="${tmp.dir}">
					<fileset dir="@{dir}" />
				</copy>

				<format_m srcDir="${tmp.dir}" />

				<java fork="true" resultproperty="diffReturnVal" classname="diff.DiffJavaDir">
					<classpath refid="project.classpath" />
					<arg value="@{dir}" />
					<arg value="${tmp.dir}" />
				</java>
				<delete dir="${tmp.dir}" />
				<if name="diffReturnVal" value="1">
					<fail message="Please use Jalopy" />
				</if>
			</sequential>
		</macrodef>

		<checkDir dir="${src.proactive.dir}" />
		<checkDir dir="${src.extensions.dir}" />
		<checkDir dir="${src.examples.dir}" />
	</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.ic2d.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/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>
	</target>


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

	<target name="extensions" depends="core" description="Compile the ProActive extensions classes" >
		<subant target="-compile" inheritall="yes" >
			<fileset dir="${src.extensions.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 ic2d                            -->
	<!--  =============================================================== -->

	<target name="ic2d" depends="core" description="Compile the IC2D Tool">
		<javac srcdir="${src.ic2d.dir}" destdir="${cl.ic2d.dir}" includes="**/*.java" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
		</javac>
		<copy todir="${cl.ic2d.dir}/${proactive.path}/ic2d/gui/images" includeEmptyDirs="no">
			<fileset dir="${src.ic2d.dir}/${proactive.path}/ic2d/gui/images" />
		</copy>
		<!-- JobMonitor images -->
		<copy todir="${cl.ic2d.dir}/${proactive.path}/ic2d/gui/jobmonitor/images" includeEmptyDirs="no">
			<fileset dir="${src.ic2d.dir}/${proactive.path}/ic2d/gui/jobmonitor/images" />
		</copy>
	</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>


	<!-- ================================================================ -->
	<!--                      Compile Test Suite                         -->
	<!--  =============================================================== -->

	<target name="testsuite" depends="core">
		<!-- XXX Depends on core because of ProActiveLogger -->
		<copy toDir="${cl.test.dir}/testsuite">
			<fileset dir="${src.test.dir}/testsuite">
				<include name="**/*.properties" />
				<include name="**/*.css" />
				<include name="**/*.xml" />
				<include name="**/*.xsl" />
				<include name="**/*.xsd" />
			</fileset>
		</copy>
		<mkdir dir="${test.classes.dir}"/>
		<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="testsuite/**" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
		</javac>
	</target>


	<!-- ================================================================ -->
	<!--            Compile non regression test                            -->
	<!-- ================================================================ -->

	<target name="nonregressiontest" depends="testsuite, compile">
		<copy toDir="${cl.test.dir}">
			<fileset dir="${src.test.dir}">
				<include name="nonregressiontest/**/*.xml" />
				<include name="nonregressiontest/**/*.fractal" />
				<include name="nonregressiontest/**/*.properties" />
				<include name="nonregressiontest/**/*.xsd" />
			</fileset>
		</copy>
		<javac srcdir="${src.test.dir}" destdir="${cl.test.dir}" includes="nonregressiontest/**" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
		</javac>
	</target>


	<!-- ================================================================ -->
	<!--       Run non regression test with TestSuite API                  -->
	<!-- ================================================================ -->

	<macrodef name="runTestsMacro">
		<attribute name="nodeDescriptor" />
		<element name="jvmargs" optional="yes" />
		<sequential>
			<delete dir="${base.dir}/compile/log" />
			<java classname="nonregressiontest.MainManager" fork="true">
				<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="-Xdebug" />
				<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888"/>
				<jvmarg value="-Dnonregressiontest.descriptor.defaultnodes.file=@{nodeDescriptor}" />
				<jvmargs/>
			</java>
		</sequential>
	</macrodef>


	<target name="runTests" depends="nonregressiontest, proActiveJar" description="Run all non regression tests">
		<runTestsMacro nodeDescriptor="/nonregressiontest/descriptor/defaultnodes/Nodes.xml" />
	</target>


	<target name="runTestsLocal" depends="nonregressiontest, proActiveJar" description="Run all non regression tests on the current host only">
		<runTestsMacro nodedescriptor="/nonregressiontest/descriptor/defaultnodes/NodesLocal.xml"/>
	</target>


	<target name="runTestsLocalIbis" depends="nonregressiontest, proActiveJar">
		<runTestsMacro nodedescriptor="/nonregressiontest/descriptor/defaultnodes/NodesLocalIbis.xml">
			<jvmargs>
				<jvmarg value="-Dproactive.rmi=ibis" />
				<jvmarg value="-Dibis.serialization=sun" />
				<jvmarg value="-Dibis.name_server.host=localhost" />
				<jvmarg value="-Dibis.name_server.pool=rutget" />
				<jvmarg value="-Dibis.pool_host_number=1" />
				<jvmarg value="-Dibis.name_server.key=12" />
				<jvmarg value="-Dibis.property.file=/home1/fabrice/workIbis/Ibis/properties" />
			</jvmargs>
		</runTestsMacro>
	</target>


	<!-- ================================================================ -->
	<!--   Tests coverage : need clover license in user.home directory    -->
	<!-- ================================================================ -->

	<!-- Commented for the release
    <property name="coverage.dir" value="${base.dir}/compile/coverage"/>
    
    <path id="coverage.classpath">
    <path refid="test.classpath"/>
    <pathelement location="${base.dir}/dev/lib/clover.jar"/>
    <pathelement location="${base.dir}/dev/lib/cenquatasks.jar"/>
    </path>
    
    <taskdef resource="com/cenqua/ant/antlib.xml" classpath="${base.dir}/dev/lib/cenquatasks.jar"/>
    <extendclasspath path="${base.dir}/dev/lib/clover.jar"/>
    <taskdef resource="clovertasks" classpath="${base.dir}/dev/lib/clover.jar"/>
    
    <target name="coverage-init">
    <delete file="coverage*.*"/>
    <copy file="${user.home}/clover.license" todir="${base.dir}/dev/lib"/>
    <clover-setup initString="coverage.db">
    <files>
    <exclude name="org/objectweb/proactive/ic2d/**/*.java"/>
    <exclude name="org/objectweb/proactive/examples/**/*.java"/>
    <exclude name="org/objectweb/proactive/ext/**/*.java"/>
    <exclude name="nonregressiontest/**/*.java"/>
    <exclude name="testsuite/**/*.java"/>
    </files>
    </clover-setup>
    </target>
    
    <target name="testsCoverage" depends="coverage-init, compile, proActiveJar, testsuite, nonregressiontest">
    <delete file="${base.dir}/compile/tests.log"/> -->
	<!-- classloader test needs clover tasks as specified in deployment-coverage.xml file -->
	<!-- 
    <move file="${classes.dir}/nonregressiontest/runtime/classloader/deployment-coverage.xml" tofile="${classes.dir}/nonregressiontest/runtime/classloader/deployment.xml"/>
    <java classname="nonregressiontest.MainManager" fork="true">
    <classpath refid="coverage.classpath"/>
    <jvmarg value="-Djava.security.policy=${base.dir}/compile/proactive.java.policy"/>
    <jvmarg value="-Dlog4j.configuration=file:${base.dir}/compile/proactive-log4j"/>
    <jvmarg value="-Dnonregressiontest.descriptor.defaultnodes.file=/nonregressiontest/descriptor/defaultnodes/NodesLocal.xml"/>
    </java>
    <clover-report>
    <current outfile="clover_html">
    <format type="html"/>
    </current>
    </clover-report>
    </target> -->


	<!-- ================================================================ -->
	<!--                      Compile TryWithCatch annotator              -->
	<!--  =============================================================== -->

	<target name="trywithcatch" depends="-init">
		<javac srcdir="${src.utils.dir}" destdir="${cl.utils.dir}" includes="trywithcatch/**" deprecation="on" source="${source}" debug="${debug}" />
	</target>


	<!-- ================================================================ -->
	<!--                      Compile util                                -->
	<!--  =============================================================== -->

	<target name="util" depends="-init, core">
		<!-- XXX Timer is in core.util.Profiling -->
		<javac srcdir="${src.utils.dir}" destdir="${cl.utils.dir}" includes="**" deprecation="on" source="${source}" debug="${debug}" >
			<classpath refid="project.classpath" />
		</javac>
	</target>




	<!-- ================================================================ -->
	<!--                      Create ProActive.jar                        -->
	<!--  =============================================================== -->
	<target name="proActiveJar" depends="dist-mk-dir, compile" description="Create the ProActive jar, to be used for instance on a distant host">
		<jar jarfile="${PAdist.dir}/ProActive.jar">
			<fileset dir="${cl.proactive.dir}" includes="**"/>
			<fileset dir="${cl.extensions.dir}"    includes="**"/>
		</jar>
	</target>


	<!-- ================================================================ -->
	<!--           Generate ProActive stubs for all classes               -->
	<!-- ================================================================ -->

	<target name="stubGenerator" depends="-init">
		<javac srcdir="${src.dir}" destdir="${classes.dir}" deprecation="on" source="${source}" debug="${debug}">
			<classpath refid="project.classpath" />
			<include name="${proactive.path}/ext/util/StubGenerator.java" />
		</javac>
	</target>


	<target name="stub" depends="stubGenerator, core">
		<property name="stub.classdir" value="${cl.proactive.dir}" />

		<java classname="org.objectweb.proactive.ext.util.StubGenerator" fork="true">
			<classpath refid="project.classpath" />
			<arg line="-srcDir ${cl.proactive.dir} -pkg org.objectweb.proactive" />
		</java>
	</target>


	<!-- ================================================================ -->
	<!--                  Create  distribution bin                        -->
	<!--  =============================================================== -->

	<target name="dist-mk-dir" description="Make distribution directories">
		<delete dir="${dist.dir}" />
		<mkdir dir="${dist.dir}" />
		<mkdir dir="${PAdist.dir}" />
	</target>


	<target name="dist-cp-files" depends="dist-mk-dir" 
		description="Copy files for the release">
		<!--        copy docs / scripts / src / compile / lib      -->
		<copy todir="${PAdist.dir}" includeEmptyDirs="no">
			<fileset dir="${base.dir}">
				<include name="README.html" />
				<include name="docs/**" />
				<include name="doc-src/**" />
				<include name="scripts/**" />
				<include name="src/org/**" />
				<include name="compile/**" />
				<include name="lib/**" />
				<include name="descriptors/**" />
				<include name="p2p/**" />
				<include name="ic2d-plugins-src/**" />

				<exclude name="p2p/config/**" />
				<exclude name="**/.svn" />
				<exclude name="scripts/unix/grid5000/**" />
				<exclude name="scripts/unix/gridexperiment/**" />
			</fileset>
		</copy>
		<!-- set right files permissions -->
		<chmod dir="${PAdist.dir}/scripts/unix" perm="755" includes="**/*.sh" />
		<chmod file="${PAdist.dir}/compile/build" perm="755" />
	</target>


	<target name="dist-examples_ic2d-jar" 
		depends="dist-mk-dir, compile">
		<!-- Build the examples Jar -->
		<jar jarfile="${PAdist.dir}/ProActive_examples.jar" 
			basedir="${cl.examples.dir}" 
			includes="**" />
		<!-- Build ic2d (NOT ECLIPSE version) Jar -->
		<jar jarfile="${PAdist.dir}/ic2d.jar" basedir="${cl.ic2d.dir}"
			includes="**" />
	</target>


	<target name="dist-bin"
		depends="dist-examples_ic2d-jar, proActiveJar, dist-cp-files"
		description="Create zip with only jars">
		<!-- Zip with Jars: PA, PAExamples, required libs, scripts -->
		<zip zipfile="${dist.dir}/ProActive-bin_${version_}.zip">
			<zipfileset dir="${PAdist.dir}" filemode="755" prefix="ProActive">
				<exclude name="src/**" />
				<exclude name="compile/**" />
				<exclude name="doc-src/**" />
				<exclude name="p2p/**" />
				<exclude name="docs/**" />
				<exclude name="README.html" />
				<exclude name="ic2d-plugins-src/**" />
			</zipfileset>
		</zip>
	</target>


	<target name="dist-doc" depends="docs, dist-cp-files"
		description="Create zip with only doc">
		<zip zipfile="${dist.dir}/ProActive-doc_${version_}.zip">
			<zipfileset dir="${PAdist.dir}/docs" prefix="ProActive/docs" />
		</zip>
	</target>


	<target name="dist-src" depends="dist-cp-files"
		description="Create zip with only sources and libs">
		<zip zipfile="${dist.dir}/ProActive-src_${version_}.zip">
			<zipfileset dir="${PAdist.dir}" filemode="755" prefix="ProActive" >
				<exclude name="docs/**"/>
				<exclude name="ProActive_examples.jar" />
				<exclude name="ic2d.jar" />
				<exclude name="ProActive.jar" />
			</zipfileset>
		</zip>
	</target>


	<target name="dist-bundle" depends="dist-cp-files, proActiveJar, dist-examples_ic2d-jar"
		description="Create a zip with everythings">
		<zip zipfile="${dist.dir}/ProActive-bundle_${version_}.zip">
			<zipfileset dir="${PAdist.dir}" filemode="755" prefix="ProActive">
				<exclude name="doc-src/**" />
			</zipfileset>
		</zip>
	</target>


	<target name="dist" depends="dist-doc, dist-bin, dist-src, dist-bundle" 
		description="Create zips for release"/>


	<!-- ================================================================ -->
	<!--        Same as below + format source files                       -->
	<!--  =============================================================== -->

	<target name="copyright_format" depends="update_copyright_and_version, format" />


	<!-- ================================================================ -->
	<!--        Update Copyright and Version in every text files          -->
	<!--  =============================================================== -->

	<target name="update_copyright_and_version" depends="util">
		<java classname="util.UpdateCopyrightAndVersion" fork="true">
			<classpath refid="project.classpath" />
			<!--  base dir -->
			<arg value="${base.dir}" />
			<!--  exclude dirs -->
			<arg value="${docs.dir}" />
			<arg value="${dist.dir}" />
			<arg value="${classes.dir}" />
			<arg value="${test-classes.dir}" />
			<arg value="${lib.dir}" />
			<arg value="${dev.dir}" />
		</java>
	</target>


	<!-- ================================================================ -->
	<!--            Formats the project sources                           -->
	<!-- ================================================================ -->

	<macrodef name="format_m">
		<attribute name="srcDir" />
		<attribute name="loglevel" default="WARN"/>
		<sequential>
			<!-- declare the Jalopy task -->
			<taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
				<classpath>
					<fileset dir="${base.dir}/dev/lib">
						<include name="*.jar" />
					</fileset>
					<fileset dir="${lib.dir}">
						<include name="log4j.jar" />
					</fileset>
				</classpath>
			</taskdef>

			<jalopy classpathref="project.classpath" convention="${basedir}/proactiveJalopy.xml">
				<fileset dir="@{srcDir}">
					<include name="**/*.java" />
				</fileset>
			</jalopy>
		</sequential>
	</macrodef>

	<target name="format" description="Formats the project source files">
		<format_m srcdir="${src.proactive.dir}"/>
		<format_m srcdir="${src.extensions.dir}"/>
		<format_m srcdir="${src.examples.dir}"/>
	</target>

	<!-- ================================================================ -->
	<!--               Ibisc to generate stubs/skels                      -->
	<!-- ================================================================ -->
	<target name="ibis" description="Everything related to ProActive IBIS">
		<delete>
			<fileset dir="${classes.dir}" includes="**/rmi*.java" />
		</delete>
		<java classname="ibis.frontend.rmi.Main" fork="true" dir="${classes.dir}/org/objectweb/proactive/core/body/ibis/">
			<classpath refid="project.classpath" />
			<arg value="org.objectweb.proactive.core.body.ibis.IbisRemoteBodyImpl" />
		</java>
		<java classname="ibis.frontend.rmi.Main" fork="true" dir="${classes.dir}/org/objectweb/proactive/core/runtime/ibis/">
			<classpath refid="project.classpath" />
			<arg value="org.objectweb.proactive.core.runtime.ibis.RemoteProActiveRuntimeImpl" />
		</java>
		<javac srcdir="${classes.dir}" destdir="${classes.dir}" deprecation="on" source="${source}" debug="${debug}">
			<include name="**/*.java" />
			<classpath refid="project.classpath" />
		</javac>
	</target>


	<target name="jdepend"  depends="compile" description="JDepend report">
		<macrodef name="jdependMacro">
			<attribute name="outputfile" />
			<attribute name="classesdir" />
			<sequential>
				<jdepend format="xml" outputfile="${base.dir}/@{outputfile}.xml">
					<classespath>
						<pathelement location="@{classesdir}" />
					</classespath>
				</jdepend>
				<xslt includes="@{outputfile}.xml" basedir="${base.dir}" destdir="${base.dir}" style="jdepend.xsl" />
				<delete>
					<fileset dir="${base.dir}">
						<include name="@{outputfile}.xml"/>
					</fileset>
				</delete>
				<echo> --> JDepend report available: ${base.dir}/@{outputfile}.html</echo>
			</sequential>
		</macrodef>

		<jdependMacro outputfile="jdepend_core" classesdir="${cl.proactive.dir}" />
		<jdependMacro outputfile="jdepend_all"  classesdir="${classes.dir}"/>
	</target>


	<!-- ==================================================================== -->
	<!-- Compile native MicroTimer                                                    -->
	<!-- ==================================================================== -->
	<target name="microTimer">
		<exec dir="${src.dir}/org/objectweb/proactive/core/util/timer" executable="g++" os="Linux">
			<arg line=" -shared -o libMicroTimer.so  MicroTimer.cc" />
		</exec>
		<copy file="${src.dir}/org/objectweb/proactive/core/util/timer/libMicroTimer.so" todir="${lib.dir}" />
	</target>

</project>

{'fraction_non_alphanumeric': 0.2925476474091721, 'fraction_numerical': 0.0030896366885050626, 'mean_word_length': 3.7856951990736616, 'pattern_counts': {'":': 0, '<': 1071, '<?xml version=': 2, '>': 1073, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 45}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2176722', 'n_tokens_mistral': 18047, 'n_tokens_neox': 15764, 'n_words': 2634}