代码拉取完成,页面将自动刷新
<?xml version="1.0"?>
<project name="JGroups" default="compile" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Ant/ivy based build.xml file for JGroups. Needs ant to run
</description>
<property name="root.dir" value="${basedir}"/>
<property name="compile.dir" value="${root.dir}/classes"/>
<property name="conf.dir" value="${root.dir}/conf"/>
<property name="version.file" value="JGROUPS_VERSION.properties"/>
<property name="build.properties.file" value="build.properties"/>
<property file="${build.properties.file}"/>
<property name="src.dir" value="${root.dir}/src"/>
<property name="tests.dir" value="${root.dir}/tests"/>
<property name="other.dir" value="${tests.dir}/other"/>
<property name="junit.dir" value="${tests.dir}/junit"/>
<property name="junit-functional.dir" value="${tests.dir}/junit-functional"/>
<property name="byteman.dir" value="${tests.dir}/byteman"/>
<property name="time-sensitive.dir" value="${tests.dir}/time-sensitive"/>
<property name="stress.dir" value="${tests.dir}/stress"/>
<property name="perf.dir" value="${tests.dir}/perf"/>
<property name="util.dir" value="${tests.dir}/util"/>
<property name="lib.dir" value="${root.dir}/lib"/>
<property name="dist.dir" value="${root.dir}/dist"/>
<property name="tmp.dir" value="${root.dir}/tmp"/>
<property name="doc.dir" value="${root.dir}/doc"/>
<property name="manual.dir" value="${doc.dir}/manual"/>
<property name="tutorial.dir" value="${doc.dir}/tutorial"/>
<property name="javadoc.dir" value="${dist.dir}/javadoc"/>
<property name="bin.dir" value="${root.dir}/bin"/>
<property name="keystore.dir" value="${root.dir}/keystore"/>
<property name="javadoc.packages" value="org.jgroups.*"/>
<property name="timestamp" value=".timestamp"/>
<property name="protocols.adoc" value="${manual.dir}/protocols-template.adoc"/>
<property name="installation.adoc" value="${manual.dir}/installation-template.adoc"/>
<property name="maven.executable" value="mvn"/>
<property name="asciidoc.executable" value="asciidoctor"/>
<!-- Also available: colony.css, github.css etc -->
<property name="asciidoctor-style" value="./asciidoctor.css"/>
<property name="ivy.version" value="2.5.0" />
<property name="project.pom" value="${root.dir}/pom.xml"/>
<property name="manifest" value="${dist.dir}/MANIFEST.MF"/>
<!-- 5 minutes per test suite timeout -->
<property name="unittest.timeout" value="1800000"/>
<property name="test.verbose" value="0"/>
<!-- Parallelization controls (disable with "-Dparallel.classes=false") -->
<property name="parallel.classes" value="classes"/>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<path id="jg.classpath">
<pathelement location="${compile.dir}"/>
<pathelement location="${conf.dir}"/>
<pathelement location="${keystore.dir}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<!-- We need to include tools.jar for byteman to inject code into a running agent -->
<path id="jg.classpath.byteman">
<path refid="jg.classpath"/>
<pathelement location="${java.home}/../lib/tools.jar"/>
</path>
<path id="default.testclasses">
<fileset dir="${compile.dir}/org/jgroups/tests" includes="**/*.class"/>
<fileset dir="${compile.dir}/org/jgroups/blocks" includes="**/*.class"/>
<fileset dir="${compile.dir}/org/jgroups/protocols" includes="**/*.class"/>
</path>
<path id="byteman.testclasses">
<fileset dir="${compile.dir}/org/jgroups/tests/byteman" includes="**/*.class"/>
</path>
<target name="check-lib-exists">
<available file="${lib.dir}" type="dir" property="lib.dir.exists"/>
</target>
<target name="check-ivy-exists">
<mkdir dir="${lib.dir}"/>
<pathconvert property="ivy.exists" pathsep=" " setonempty="false">
<path>
<fileset dir="${lib.dir}" includes="ivy*.jar" />
</path>
</pathconvert>
</target>
<target name="check-jars-exist">
<mkdir dir="${lib.dir}"/>
<pathconvert property="jars.exist" pathsep=" " setonempty="false">
<path>
<fileset dir="${lib.dir}" excludes="ivy*.jar" />
</path>
</pathconvert>
</target>
<target name="get-ivy" description="Fetches ivy from a maven repo" depends="check-ivy-exists" unless="ivy.exists">
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"
dest="${lib.dir}" usetimestamp="true"/>
</target>
<target name="deps" depends="retrieve" description="Fetches all dependent libraries"/>
<target name="retrieve" depends="check-jars-exist,get-ivy,define-ivy-task" unless="jars.exist"
description="Retrieves all dependent libs defined in ivy.xml unless already present">
<ivy:retrieve type="jar,bundle" transitive="false"/>
<!-- Move byteman-x.y.z.jar to byteman.jar (needed by -javaagent:byteman.jar in byteman tests) -->
<move todir="${lib.dir}">
<fileset dir="${lib.dir}">
<include name="byteman-*.jar"/>
<exclude name="byteman-bmunit-*.jar"/>
<exclude name="byteman-install-*.jar"/>
<exclude name="byteman-submit-*.jar"/>
</fileset>
<globmapper from="byteman*.jar" to="byteman.jar"/>
</move>
</target>
<target name="define-testng-task">
<taskdef resource="testngtasks" classpathref="jg.classpath"/>
</target>
<target name="define-ivy-task">
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="jg.classpath"/>
</target>
<target name="prepare" depends="retrieve">
<property environment="env"/>
<mkdir dir="${compile.dir}"/>
<copy file="${build.properties.file}.template" tofile="${build.properties.file}" overwrite="false"/>
</target>
<target name="compile" depends="prepare" description="Compiles all Java files">
<javac destdir="${compile.dir}" release="11"
classpathref="jg.classpath"
modulepathref="jg.classpath"
includeantruntime="false"
debug="on"
includes="org/jgroups/**">
<src path="${src.dir}"/>
</javac>
<javac destdir="${compile.dir}" release="11"
classpathref="jg.classpath"
modulepathref="jg.classpath"
includeantruntime="false"
debug="on"
includes="org/jgroups/**">
<src path="${other.dir}"/>
<src path="${junit.dir}"/>
<src path="${junit-functional.dir}"/>
<src path="${byteman.dir}"/>
<src path="${stress.dir}"/>
<src path="${perf.dir}"/>
<src path="${util.dir}"/>
</javac>
<set-version/>
</target>
<target name="compile-plus-essential-unittests" depends="prepare"
description="Compiles sources plus selected tests (e.g. perftests) shipped with JGroups">
<javac srcdir="${src.dir}" destdir="${compile.dir}"
release="11" classpathref="jg.classpath"
modulepathref="jg.classpath"
includeantruntime="false" debug="on"
includes="org/jgroups/**">
</javac>
<javac destdir="${compile.dir}" release="11"
classpathref="jg.classpath"
modulepathref="jg.classpath"
includeantruntime="false" debug="on"
includes="org/jgroups/tests/**">
<src path="${tests.dir}/perf"/>
<src path="${tests.dir}/other"/>
</javac>
<set-version/>
</target>
<macrodef name="set-version" description="Extracts the version from the POM and sets it as a property">
<sequential>
<antcall target="write-version"/>
<property file="${compile.dir}/${version.file}"/>
<property name="version" value="${jgroups.version}"/>
<antcall target="copy-conf-dir"/>
</sequential>
</macrodef>
<target name="copy-conf-dir" description="Copies the relevant files from ./conf to ./classes">
<mkdir dir="${compile.dir}" />
<copy todir="${compile.dir}/">
<fileset dir="${conf.dir}" includes="*.btm *.jks">
<include name="scripts/**"/>
<include name="relay/**"/>
<exclude name="log4j*.xml"/>
<exclude name="settings.xml"/>
<exclude name="${version.file}"/>
</fileset>
</copy>
<copy todir="${compile.dir}/">
<fileset dir="${conf.dir}" includes="*.properties, *.xml">
<include name="scripts/**"/>
<include name="relay/**"/>
<exclude name="log4j*.xml"/>
<exclude name="settings.xml"/>
</fileset>
<filterchain> <!-- Replaces the variables with actual values fetched from properties file -->
<expandproperties />
</filterchain>
</copy>
</target>
<target name="jar"
description="Compiles and creates JARs in ./dist"
depends="jgroups.jar,jgroups-sources.jar">
<copy file="${doc.dir}/README" tofile="${dist.dir}/README" overwrite="true"/>
</target>
<target name="jgroups.jar" description="Creates the jgroups.jar (includes everything)"
depends="compile-plus-essential-unittests,compile,make-schema,make-keystore-no-compile,create-manifest,copy-conf-dir">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${compile.dir}/META-INF"/>
<jar destfile="${dist.dir}/jgroups-${version}.jar" basedir="${compile.dir}" manifest="${dist.dir}/MANIFEST.MF">
<fileset dir="${compile.dir}" includes="*.xml, *.properties, *.cfg, *.jks">
<exclude name="log4j*.xml"/>
<exclude name="settings.xml"/>
</fileset>
<fileset dir="${compile.dir}/schema">
<include name="*.xsd"/>
</fileset>
<fileset dir="${compile.dir}/META-INF"
includes="org/jgroups/**"
/>
</jar>
</target>
<target name="create-manifest" description="Builds MANIFEST>MF">
<mkdir dir="${dist.dir}"/>
<manifest file="${manifest}">
<attribute name="Main-Class" value="org.jgroups.Version"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${ant.project.name}"/>
<attribute name="Implementation-Version" value="${version}, built ${TODAY}"/>
<attribute name="Implementation-Vendor" value="JBoss, a division of Red Hat"/>
</manifest>
</target>
<target name="jgroups-sources.jar" depends="create-manifest"
description="Creates the jgroups-sources.jar (no demos, tests)">
<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.dir}/jgroups-${version}-sources.jar"
basedir="${src.dir}"
manifest="${dist.dir}/MANIFEST.MF">
</jar>
</target>
<target name="javadocs" description="Creates Javadoc documentation in ./dist/javadoc"
depends="javadoc"/>
<target name="javadoc"
depends="prepare,check-javadoc" unless="javadoc.exists"
description="Creates Javadoc documentation in ./dist/javadoc">
<mkdir dir="${javadoc.dir}"/>
<javadoc packagenames="${javadoc.packages}"
sourcepath="${src.dir}"
destdir="${javadoc.dir}"
classpathref="jg.classpath"
author="true"
version="true"
use="true"
bottom="Copyright © 1998-2030 Red Hat. All Rights Reserved."
useexternalfile="yes"
doctitle="JGroups"
overview="${src.dir}/org/jgroups/overview.html">
<tag name="todo" description="To do:"/>
</javadoc>
</target>
<target name="check-javadoc" description="Checks whether the ./dist/javadoc dir exists">
<available file="${javadoc.dir}" type="dir" property="javadoc.exists"/>
</target>
<target name="docs" description="Builds all html and pdf docs" depends="manual,tutorial">
</target>
<target name="manual" description="Generates the manual (AsciiDoc --> HTML)"
depends="check-manual,compile" unless="manual.up-to-date">
<echo message="Building manual from asciidoc ..."/>
<copy todir="${manual.dir}/">
<fileset dir="${doc.dir}/stylesheets">
<include name="*.css"/>
</fileset>
</copy>
<prot-properties-to-doc protocols-file="${protocols.adoc}" installation-file="${installation.adoc}"/>
<run-asciidoc dir="${manual.dir}" input="manual.adoc"/>
<copy todir="${manual.dir}/build/images">
<fileset dir="${manual.dir}/images">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${manual.dir}/build">
<fileset dir="${doc.dir}/stylesheets">
<include name="*.css"/>
</fileset>
</copy>
<touch file="${manual.dir}/build/${timestamp}"/>
</target>
<target name="tutorial" description="Generates the tutorial (AsciiDoc --> HTML)"
depends="check-tutorial" unless="tutorial.up-to-date">
<echo message="Building tutorial from asciidoc ..."/>
<copy todir="${tutorial.dir}/">
<fileset dir="${doc.dir}/stylesheets">
<include name="*.css"/>
</fileset>
</copy>
<run-asciidoc dir="${tutorial.dir}" input="tutorial.adoc"/>
<copy todir="${tutorial.dir}/build/code">
<fileset dir="${tutorial.dir}/code">
<include name="*"/>
</fileset>
</copy>
<copy todir="${tutorial.dir}/build/images">
<fileset dir="${tutorial.dir}/images">
<include name="*"/>
</fileset>
</copy>
<copy todir="${tutorial.dir}/build">
<fileset dir="${doc.dir}/stylesheets">
<include name="*.css"/>
</fileset>
</copy>
<touch file="${tutorial.dir}/build/${timestamp}"/>
</target>
<target name="check-tutorial">
<uptodate property="tutorial.up-to-date" targetfile="${tutorial.dir}/build/${timestamp}">
<srcfiles dir="${tutorial.dir}/" includes="**/*">
</srcfiles>
</uptodate>
<echo message="tutorial.up-to-date=${tutorial.up-to-date}"/>
</target>
<target name="check-manual">
<uptodate property="manual.up-to-date" targetfile="${manual.dir}/build/${timestamp}">
<srcfiles dir="${manual.dir}/" includes="**/*"/>
</uptodate>
<echo message="manual.up-to-date=${manual.up-to-date}"/>
</target>
<target name="make-schema" description="Creates a schema in ./classes for this version of JGroups">
<delete dir="${compile.dir}/schema" failonerror="false"/>
<mkdir dir="${compile.dir}/schema"/>
<java classname="org.jgroups.util.XMLSchemaGenerator" classpathref="jg.classpath" fork="true">
<arg line="-o ${compile.dir}/schema"/>
<jvmarg value="-Djava.awt.headless=true"/>
</java>
<copy todir="${compile.dir}/schema">
<fileset dir="${conf.dir}" includes="*.xsd"/>
</copy>
<copy todir="${compile.dir}/schema">
<fileset dir="${compile.dir}/schema">
<include name="jgroups*.xsd"/>
</fileset>
<globmapper from="jgroups*.xsd" to="jgroups.xsd"/>
</copy>
</target>
<target name="clean"
description="Removes all class files and ./dist">
<delete dir="${compile.dir}" failonerror="false"/>
<delete dir="${dist.dir}" failonerror="false"/>
<delete dir="${tmp.dir}" failonerror="false"/>
<delete dir="${root.dir}/test-output" failonerror="false"/>
<delete dir="${root.dir}/target" failonerror="false"/>
<delete dir="${keystore.dir}" failonerror="false"/>
<delete file="${root.dir}/velocity.log*" failonerror="false"/>
<delete file="${conf.dir}/MANIFEST.MF" failonerror="false"/>
<delete>
<fileset dir="${root.dir}" defaultexcludes="no">
<include name="**/*~"/>
</fileset>
</delete>
<!-- clean the docs directory if docs have been processed -->
<delete dir="${manual.dir}/build"/>
<delete dir="${tutorial.dir}/build"/>
<delete>
<fileset dir="${tutorial.dir}" defaultexcludes="no">
<include name="*.css"/>
</fileset>
</delete>
<delete>
<fileset dir="${manual.dir}" defaultexcludes="no">
<include name="*-generated.adoc"/>
<include name="*.css"/>
</fileset>
</delete>
<delete dir="${root.dir}/schema" failonerror="false"/>
</target>
<target name="clean-all" depends="clean" description="Also removes lib">
<delete dir="${lib.dir}" failonerror="false"/>
</target>
<target name="write-version">
<java classname="org.jgroups.util.WriteVersionTo" fork="true" classpathref="jg.classpath">
<arg value="-pom"/>
<arg value="${project.pom}"/>
<arg value="-input"/>
<arg value="${conf.dir}/${version.file}"/>
<arg value="-output"/>
<arg value="${compile.dir}/${version.file}"/>
<arg value="-version"/>
<arg value="jgroups.version"/>
<arg value="-codename"/>
<arg value="jgroups.codename"/>
</java>
</target>
<target name="version" depends="compile" description="Prints some info about the Ant version and the OS/JDK used">
<echo message="${ant.version}"/>
<echo message="JDK=${java.vm.version} on ${os.name} ${os.version}"/>
<java classname="org.jgroups.Version" classpathref="jg.classpath"/>
</target>
<target name="make-keystore" unless="isKeyStoreGenerated" depends="keyStoreGenerated,compile"
description="Generates a temp keystore in ./keystore (for unit tests)">
<mkdir dir="${keystore.dir}"/>
<java classname="org.jgroups.demos.KeyStoreGenerator" fork="false">
<arg value="--storeName"/>
<arg value="keystore/defaultStore.keystore"/>
<classpath refid="jg.classpath"/>
</java>
<java classname="org.jgroups.demos.KeyStoreGenerator" fork="false">
<arg value="--storeName"/>
<arg value="keystore/defaultStore2.keystore"/>
<classpath refid="jg.classpath"/>
</java>
</target>
<target name="make-keystore-no-compile" unless="isKeyStoreGenerated" depends="keyStoreGenerated"
description="Generates a temp keystore in ./keystore (for unit tests)">
<mkdir dir="${keystore.dir}"/>
<java classname="org.jgroups.demos.KeyStoreGenerator" fork="false">
<arg value="--storeName"/>
<arg value="keystore/defaultStore.keystore"/>
<classpath refid="jg.classpath"/>
</java>
<java classname="org.jgroups.demos.KeyStoreGenerator" fork="false">
<arg value="--storeName"/>
<arg value="keystore/defaultStore2.keystore"/>
<classpath refid="jg.classpath"/>
</java>
</target>
<target name="keyStoreGenerated">
<condition property="isKeyStoreGenerated">
<and>
<available filepath="${keystore.dir}" file="defaultStore.keystore"/>
<available filepath="${keystore.dir}" file="defaultStore2.keystore"/>
</and>
</condition>
</target>
<target name="postcompile" depends="make-keystore">
</target>
<!--
=============================== TestNG ======================================== -->
<target name="all-tests-eap" depends="delete-reports"
description="Runs all tests except those which are excluded from EAP">
<property name="default-excludes" value="eap-excluded"/>
<antcall target="all-tests"/>
</target>
<target name="test" depends="all-tests" description="Calls all-tests"/>
<target name="all-tests" depends="delete-reports" description="Runs all tests">
<sequential>
<antcall target="functional"/>
<antcall target="udp"/>
<antcall target="tcp"/>
<antcall target="tcp-nio"/>
<antcall target="stack-independent"/>
<antcall target="time-sensitive"/>
<antcall target="byteman"/>
</sequential>
</target>
<target name="functional" depends="postcompile,define-testng-task" description="Runs functional tests">
<mkdir dir="${tmp.dir}/test-results/xml/functional"/>
<runtest suitename="functional"
groups="functional"
parallel="${parallel.classes}"
threadcount="5" />
</target>
<target name="byteman" depends="postcompile,define-testng-task" description="Runs the byteman tests">
<mkdir dir="${tmp.dir}/test-results/xml/byteman"/>
<runtest classpath="jg.classpath.byteman"
suitename="byteman"
groups="byteman"
parallel="${parallel.classes}"
threadcount="1"
jvmarg1="-Dorg.jboss.byteman.contrib.bmunit.agent.inhibit=true"
jvmarg2="-javaagent:${lib.dir}/byteman.jar=listener:true">
</runtest>
</target>
<target name="stack-independent" depends="postcompile,define-testng-task" description="Runs stack-independent tests">
<mkdir dir="${tmp.dir}/test-results/xml/stack-independent"/>
<runtest suitename="stack-independent"
groups="stack-independent"
parallel="${parallel.classes}"
threadcount="1" />
</target>
<target name="udp" depends="postcompile,define-testng-task" description="Runs UDP tests">
<mkdir dir="${tmp.dir}/test-results/xml/udp"/>
<runtest suitename="udp"
groups="base,stack-dependent"
excludedgroups="stack-independent,broken"
parallel="${parallel.classes}"
threadcount="5"
initial.mcast.addr="${jgroups.udp.mcast_addr}"
initial.mcast.port="25000"
initial.tcp.port="25000"
jvmarg1="-Dchannel.conf=udp.xml"
/>
</target>
<target name="tcp" depends="postcompile,define-testng-task" description="Runs TCP tests">
<!-- Needed to force reading of properties. Otherwise tcp tests will fail -->
<property name="build.properties.file" value="build.properties"/>
<property file="${build.properties.file}"/>
<mkdir dir="${tmp.dir}/test-results/xml/tcp"/>
<runtest suitename="tcp"
groups="base,stack-dependent"
excludedgroups="stack-independent,broken"
parallel="${parallel.classes}"
threadcount="5"
initial.mcast.addr="${jgroups.udp.mcast_addr}"
initial.mcast.port="27000"
initial.tcp.port="27000"
jvmarg1="-Dchannel.conf=tcp.xml"
/>
</target>
<target name="tcp-nio" depends="postcompile,define-testng-task" description="Runs TCP-NIO tests">
<!-- Needed to force reading of properties. Otherwise tcp-nio tests will fail -->
<property name="build.properties.file" value="build.properties"/>
<property file="${build.properties.file}"/>
<mkdir dir="${tmp.dir}/test-results/xml/tcp-nio"/>
<runtest suitename="tcp-nio"
groups="base,stack-dependent"
excludedgroups="stack-independent,broken"
parallel="${parallel.classes}"
threadcount="5"
initial.mcast.addr="${jgroups.udp.mcast_addr}"
initial.mcast.port="27000"
initial.tcp.port="28000"
jvmarg1="-Dchannel.conf=tcp-nio.xml"
/>
</target>
<target name="time-sensitive" depends="postcompile,define-testng-task" description="Runs time-sensitive tests">
<mkdir dir="${tmp.dir}/test-results/xml/time-sensitive"/>
<runtest suitename="time-sensitive"
groups="time-sensitive"
parallel="${parallel.classes}"
threadcount="10" />
</target>
<target name="encrypt" depends="postcompile,define-testng-task" description="Runs encryption tests">
<mkdir dir="${tmp.dir}/test-results/xml/encrypt"/>
<runtest suitename="encrypt"
groups="encrypt"
parallel="${parallel.classes}"
threadcount="10" />
</target>
<target name="reports" description="Produces the test report">
<mkdir dir="${tmp.dir}/test-results/html"/>
<junitreport todir="${tmp.dir}/test-results/html">
<fileset dir="${tmp.dir}/test-results/xml">
<include name="**/*.xml"/>
</fileset>
<report format="frames" todir="${tmp.dir}/test-results/html"/>
</junitreport>
<echo message="******************************************************************"/>
<echo message="The test report is ${tmp.dir}/test-results/html/index.html"/>
<echo message="******************************************************************"/>
</target>
<target name="delete-reports" description="Removes the dir for the test reports">
<delete dir="${tmp.dir}/test-results" failonerror="false"/>
</target>
<target name="single-test" description="Run a single test" depends="define-testng-task">
<fail unless="test-class" message="Property not set: 'test-class'"/>
<echo message=" -- Running single test ${test-class}"/>
<testng classpathref="jg.classpath"
outputdir="${tmp.dir}/test-results/xml"
suitename="single-test"
threadcount="1"
usedefaultlisteners="false"
listeners="org.jgroups.util.JUnitXMLReporter">
<classfileset dir="${compile.dir}" includes="**/${test-class}.class"/>
<jvmarg value="-Djgroups.bind_addr=${jgroups.bind_addr}"/>
<jvmarg value="-Djgroups.tcpping.initial_hosts=${jgroups.tcpping.initial_hosts}"/>
<jvmarg value="-Dtests.tmp.dir=${tmp.dir}"/>
<jvmarg value="-Dlog4j.configurationFile=${conf.dir}/log4j2.xml"/>
</testng>
</target>
<macrodef name="runtest" description="Runs a configuration-dependent test suite">
<attribute name="classpath" default="jg.classpath"/>
<attribute name="suitename" />
<attribute name="groups" /> <!-- comma-separated list, e.g. udp,functional -->
<attribute name="excludedgroups" default="broken"/>
<attribute name="parallel" default="${parallel.classes}"/>
<attribute name="threadcount" default="1"/>
<attribute name="outputdir" default="${tmp.dir}/test-results/xml"/>
<attribute name="initial.mcast.addr" default="${jgroups.udp.mcast_addr}"/>
<attribute name="initial.mcast.port" default="23000"/>
<attribute name="initial.tcp.port" default="23000"/>
<attribute name="tcp.recv.buf.size" default="1000000"/>
<attribute name="tcp.send.buf.size" default="500000"/>
<attribute name="jvmarg1" default="-Dnonex=1"/>
<attribute name="jvmarg2" default="-Dnoney=1"/>
<!--<element name="additional-args" optional="true"/>-->
<sequential>
<property name="default-excludes" value=""/>
<testng classpathref="@{classpath}"
suitename="@{suitename}"
testname="@{suitename}"
groups="@{groups}"
excludedgroups="@{excludedgroups},${default-excludes}"
parallel="@{parallel}"
threadcount="@{threadcount}"
usedefaultlisteners="false"
outputdir="@{outputdir}"
listeners="org.jgroups.util.JUnitXMLReporter"
timeout="${unittest.timeout}"
timeOut="${unittest.timeout}"
verbose="0"
configfailurepolicy="continue">
<classfileset dir="${compile.dir}"/>
<!--<xmlfileset dir="${testng.conf.dir}" includes="@{xml.file}"/>-->
<sysproperty key="INITIAL_MCAST_ADDR" value="@{initial.mcast.addr}"/>
<sysproperty key="INITIAL_MCAST_PORT" value="@{initial.mcast.port}"/>
<sysproperty key="INITIAL_TCP_PORT" value="@{initial.tcp.port}"/>
<sysproperty key="tcp.recv_buf_size" value="@{tcp.recv.buf.size}"/>
<sysproperty key="tcp.send_buf_size" value="@{tcp.send.buf.size}"/>
<jvmarg value="-Djgroups.bind_addr=${jgroups.bind_addr}"/>
<jvmarg value="-Djgroups.udp.ip_ttl=0"/>
<jvmarg value="-Djgroups.tcpping.initial_hosts=${jgroups.tcpping.initial_hosts}"/>
<jvmarg value="-Djgroups.tunnel.gossip_router_hosts=${jgroups.tunnel.gossip_router_hosts}"/>
<jvmarg value="-Dtests.tmp.dir=${tmp.dir}"/>
<jvmarg value="-Dlog4j.configurationFile=${conf.dir}/log4j2.xml"/>
<jvmarg value="-Xms400M"/>
<jvmarg value="-Xmx800M"/>
<jvmarg value="@{jvmarg1}"/>
<jvmarg value="@{jvmarg2}"/>
<!--<additional-args/>-->
</testng>
</sequential>
</macrodef>
<macrodef name="prot-properties-to-doc">
<attribute name="protocols-file" default="${protocols.adoc}"/>
<attribute name="installation-file" default="${installation.adoc}"/>
<sequential>
<echo message="Replacing variables in @{protocols-file} and @{installation-file}"/>
<java classname="org.jgroups.util.PropertiesToAsciidoc" classpathref="jg.classpath" fork="true">
<arg value="@{protocols-file}"/>
<arg value="@{installation-file}"/>
<!--jvmarg value="-Dcom.sun.management.jmxremote"/-->
<!--permissions>
<grant class="javax.management.MBeanTrustPermission" name="*" actions=""/>
<grant class="java.io.FilePermission" name="${manual.dir}/-" actions="read,write"/>
<grant class="java.security.AllPermission"/>
</permissions-->
</java>
</sequential>
</macrodef>
<macrodef name="run-maven">
<attribute name="dir"/>
<sequential>
<echo message="Running maven on @{dir}/pom.xml"/>
<exec executable="${maven.executable}" dir="@{dir}">
<arg line="compile"/>
</exec>
</sequential>
</macrodef>
<macrodef name="run-asciidoc">
<attribute name="dir"/>
<attribute name="input"/>
<sequential>
<mkdir dir="@{dir}/build"/>
<echo message="Generating index.html in @{dir}/build"/>
<exec executable="${asciidoc.executable}" dir="@{dir}">
<arg line="-r asciidoctor-diagram -n -a source-highlighter=highlightjs -a stylesheet=${asciidoctor-style} -a icons -o @{dir}/build/index.html @{input}"/>
</exec>
</sequential>
</macrodef>
</project>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。