mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 04:58:00 +02:00
Merge branch '2.9' of github.com:essentials/Essentials into release
This commit is contained in:
commit
e5c70713b8
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="BuildAll" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename BuildAll -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -854,7 +1164,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -862,8 +1176,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -871,12 +1186,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -888,12 +1199,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -915,6 +1222,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -958,7 +1301,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -1001,14 +1344,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -1021,39 +1364,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1174,9 +1518,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.1.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=51b33957
|
nbproject/build-impl.xml.data.CRC32=51b33957
|
||||||
nbproject/build-impl.xml.script.CRC32=c5170bed
|
nbproject/build-impl.xml.script.CRC32=2a17f1e9
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Essentials" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename Essentials -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -805,7 +1115,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -813,8 +1127,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -822,12 +1137,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -839,12 +1150,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -866,6 +1173,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -909,7 +1252,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -952,14 +1295,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -972,39 +1315,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1076,9 +1420,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,8 +4,8 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=a830bc14
|
nbproject/build-impl.xml.data.CRC32=a830bc14
|
||||||
nbproject/build-impl.xml.script.CRC32=a9f8842a
|
nbproject/build-impl.xml.script.CRC32=7c507372
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
nbproject/profiler-build-impl.xml.data.CRC32=ab78ce15
|
nbproject/profiler-build-impl.xml.data.CRC32=ab78ce15
|
||||||
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
|
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
|
||||||
nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1
|
nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1
|
||||||
|
@ -77,6 +77,8 @@ public class Enchantments
|
|||||||
ENCHANTMENTS.put("flameprotection", Enchantment.PROTECTION_FIRE);
|
ENCHANTMENTS.put("flameprotection", Enchantment.PROTECTION_FIRE);
|
||||||
ENCHANTMENTS.put("fireprotect", Enchantment.PROTECTION_FIRE);
|
ENCHANTMENTS.put("fireprotect", Enchantment.PROTECTION_FIRE);
|
||||||
ENCHANTMENTS.put("flameprotect", Enchantment.PROTECTION_FIRE);
|
ENCHANTMENTS.put("flameprotect", Enchantment.PROTECTION_FIRE);
|
||||||
|
ENCHANTMENTS.put("fireprot", Enchantment.PROTECTION_FIRE);
|
||||||
|
ENCHANTMENTS.put("flameprot", Enchantment.PROTECTION_FIRE);
|
||||||
|
|
||||||
ENCHANTMENTS.put("projectileprotection", Enchantment.PROTECTION_PROJECTILE);
|
ENCHANTMENTS.put("projectileprotection", Enchantment.PROTECTION_PROJECTILE);
|
||||||
ENCHANTMENTS.put("projprot", Enchantment.PROTECTION_PROJECTILE);
|
ENCHANTMENTS.put("projprot", Enchantment.PROTECTION_PROJECTILE);
|
||||||
|
@ -67,7 +67,7 @@ import org.yaml.snakeyaml.error.YAMLException;
|
|||||||
|
|
||||||
public class Essentials extends JavaPlugin implements IEssentials
|
public class Essentials extends JavaPlugin implements IEssentials
|
||||||
{
|
{
|
||||||
public static final int BUKKIT_VERSION = 2149;
|
public static final int BUKKIT_VERSION = 2289;
|
||||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||||
private transient ISettings settings;
|
private transient ISettings settings;
|
||||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
||||||
@ -491,6 +491,12 @@ public class Essentials extends JavaPlugin implements IEssentials
|
|||||||
{
|
{
|
||||||
return (User)base;
|
return (User)base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (userMap == null) {
|
||||||
|
LOGGER.log(Level.WARNING, "Essentials userMap not initialized");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
User user = userMap.getUser(base.getName());
|
User user = userMap.getUser(base.getName());
|
||||||
|
|
||||||
if (user == null)
|
if (user == null)
|
||||||
|
@ -5,6 +5,7 @@ import com.google.common.io.Files;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.CharBuffer;
|
import java.nio.CharBuffer;
|
||||||
|
import java.nio.channels.ClosedByInterruptException;
|
||||||
import java.nio.channels.FileChannel;
|
import java.nio.channels.FileChannel;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.CharsetDecoder;
|
import java.nio.charset.CharsetDecoder;
|
||||||
@ -38,6 +39,7 @@ public class EssentialsConf extends YamlConfiguration
|
|||||||
super();
|
super();
|
||||||
this.configFile = configFile;
|
this.configFile = configFile;
|
||||||
}
|
}
|
||||||
|
private final byte[] bytebuffer = new byte[1024];
|
||||||
|
|
||||||
public synchronized void load()
|
public synchronized void load()
|
||||||
{
|
{
|
||||||
@ -115,9 +117,12 @@ public class EssentialsConf extends YamlConfiguration
|
|||||||
final FileInputStream inputStream = new FileInputStream(configFile);
|
final FileInputStream inputStream = new FileInputStream(configFile);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final FileChannel channel = inputStream.getChannel();
|
|
||||||
final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length());
|
final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length());
|
||||||
channel.read(buffer);
|
int length;
|
||||||
|
while ((length = inputStream.read(bytebuffer)) != -1)
|
||||||
|
{
|
||||||
|
buffer.put(bytebuffer, 0, length);
|
||||||
|
}
|
||||||
buffer.rewind();
|
buffer.rewind();
|
||||||
final CharBuffer data = CharBuffer.allocate((int)configFile.length());
|
final CharBuffer data = CharBuffer.allocate((int)configFile.length());
|
||||||
CharsetDecoder decoder = UTF8.newDecoder();
|
CharsetDecoder decoder = UTF8.newDecoder();
|
||||||
|
@ -119,6 +119,17 @@ public class EssentialsEntityListener implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
|
public void onPlayerDeathExpEvent(final PlayerDeathEvent event)
|
||||||
|
{
|
||||||
|
final User user = ess.getUser(event.getEntity());
|
||||||
|
if (user.isAuthorized("essentials.keepxp"))
|
||||||
|
{
|
||||||
|
event.setKeepLevel(true);
|
||||||
|
event.setDroppedExp(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
if (user.isMuted())
|
if (user.isMuted())
|
||||||
@ -309,7 +309,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private final static List<String> COMMANDS = Arrays.asList("msg", "r", "mail", "m", "t", "whisper", "emsg", "tell", "er", "reply", "ereply", "email");
|
private final static List<String> COMMANDS = Arrays.asList("msg", "r", "mail", "m", "t", "whisper", "emsg", "tell", "er", "reply", "ereply", "email", "action", "describe", "eme", "eaction", "edescribe", "etell", "ewhisper", "pm");
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
|
public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
|
||||||
|
@ -1051,4 +1051,22 @@ public class OfflinePlayer implements Player
|
|||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getExpToLevel()
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLineOfSight(Entity entity)
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid()
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,11 +77,17 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return config.getInt("sethome-multiple." + set, config.getInt("sethome-multiple.default", 3));
|
return config.getInt("sethome-multiple." + set, config.getInt("sethome-multiple.default", 3));
|
||||||
}
|
}
|
||||||
|
private int chatRadius = 0;
|
||||||
|
|
||||||
|
private int _getChatRadius()
|
||||||
|
{
|
||||||
|
return config.getInt("chat.radius", config.getInt("chat-radius", 0));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getChatRadius()
|
public int getChatRadius()
|
||||||
{
|
{
|
||||||
return config.getInt("chat.radius", config.getInt("chat-radius", 0));
|
return chatRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -113,19 +119,29 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return isCommandDisabled(cmd.getName());
|
return isCommandDisabled(cmd.getName());
|
||||||
}
|
}
|
||||||
|
private Set<String> disabledCommands = new HashSet<String>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCommandDisabled(String label)
|
public boolean isCommandDisabled(String label)
|
||||||
{
|
{
|
||||||
|
return disabledCommands.contains(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Set<String> getDisabledCommands()
|
||||||
|
{
|
||||||
|
Set<String> disCommands = new HashSet<String>();
|
||||||
for (String c : config.getStringList("disabled-commands"))
|
for (String c : config.getStringList("disabled-commands"))
|
||||||
{
|
{
|
||||||
if (!c.equalsIgnoreCase(label))
|
disCommands.add(c.toLowerCase(Locale.ENGLISH));
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return config.getBoolean("disable-" + label.toLowerCase(Locale.ENGLISH), false);
|
for (String c : config.getKeys(false))
|
||||||
|
{
|
||||||
|
if (c.startsWith("disable-"))
|
||||||
|
{
|
||||||
|
disCommands.add(c.substring(8).toLowerCase(Locale.ENGLISH));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return disCommands;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -192,11 +208,17 @@ public class Settings implements ISettings
|
|||||||
}
|
}
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
private String nicknamePrefix = "~";
|
||||||
|
|
||||||
|
private String _getNicknamePrefix()
|
||||||
|
{
|
||||||
|
return config.getString("nickname-prefix", "~");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNicknamePrefix()
|
public String getNicknamePrefix()
|
||||||
{
|
{
|
||||||
return config.getString("nickname-prefix", "~");
|
return nicknamePrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -250,9 +272,15 @@ public class Settings implements ISettings
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
private ChatColor operatorColor = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChatColor getOperatorColor() throws Exception
|
public ChatColor getOperatorColor()
|
||||||
|
{
|
||||||
|
return operatorColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ChatColor _getOperatorColor()
|
||||||
{
|
{
|
||||||
String colorName = config.getString("ops-name-color", null);
|
String colorName = config.getString("ops-name-color", null);
|
||||||
|
|
||||||
@ -262,7 +290,7 @@ public class Settings implements ISettings
|
|||||||
}
|
}
|
||||||
if ("none".equalsIgnoreCase(colorName) || colorName.isEmpty())
|
if ("none".equalsIgnoreCase(colorName) || colorName.isEmpty())
|
||||||
{
|
{
|
||||||
throw new Exception();
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -317,7 +345,7 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return config.getString("backup.command", null);
|
return config.getString("backup.command", null);
|
||||||
}
|
}
|
||||||
private Map<String, MessageFormat> chatFormats = new HashMap<String, MessageFormat>();
|
private Map<String, MessageFormat> chatFormats = Collections.synchronizedMap(new HashMap<String, MessageFormat>());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MessageFormat getChatFormat(String group)
|
public MessageFormat getChatFormat(String group)
|
||||||
@ -392,6 +420,17 @@ public class Settings implements ISettings
|
|||||||
signUsePerSecond = _getSignUsePerSecond();
|
signUsePerSecond = _getSignUsePerSecond();
|
||||||
kits = _getKits();
|
kits = _getKits();
|
||||||
chatFormats.clear();
|
chatFormats.clear();
|
||||||
|
changeDisplayName = _changeDisplayName();
|
||||||
|
disabledCommands = getDisabledCommands();
|
||||||
|
nicknamePrefix = _getNicknamePrefix();
|
||||||
|
operatorColor = _getOperatorColor();
|
||||||
|
changePlayerListName = _changePlayerListName();
|
||||||
|
configDebug = _isDebug();
|
||||||
|
prefixsuffixconfigured = _isPrefixSuffixConfigured();
|
||||||
|
addprefixsuffix = _addPrefixSuffix();
|
||||||
|
disablePrefix = _disablePrefix();
|
||||||
|
disableSuffix = _disableSuffix();
|
||||||
|
chatRadius = _getChatRadius();
|
||||||
}
|
}
|
||||||
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
|
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
|
||||||
|
|
||||||
@ -479,11 +518,17 @@ public class Settings implements ISettings
|
|||||||
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
|
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
|
||||||
}
|
}
|
||||||
private boolean debug = false;
|
private boolean debug = false;
|
||||||
|
private boolean configDebug = false;
|
||||||
|
|
||||||
|
private boolean _isDebug()
|
||||||
|
{
|
||||||
|
return config.getBoolean("debug", false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isDebug()
|
public boolean isDebug()
|
||||||
{
|
{
|
||||||
return debug || config.getBoolean("debug", false);
|
return debug || configDebug;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -610,43 +655,79 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return config.getBoolean("remove-god-on-disconnect", false);
|
return config.getBoolean("remove-god-on-disconnect", false);
|
||||||
}
|
}
|
||||||
|
private boolean changeDisplayName = true;
|
||||||
|
|
||||||
@Override
|
private boolean _changeDisplayName()
|
||||||
public boolean changeDisplayName()
|
|
||||||
{
|
{
|
||||||
return config.getBoolean("change-displayname", true);
|
return config.getBoolean("change-displayname", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean changePlayerListName()
|
public boolean changeDisplayName()
|
||||||
|
{
|
||||||
|
return changeDisplayName;
|
||||||
|
}
|
||||||
|
private boolean changePlayerListName = false;
|
||||||
|
|
||||||
|
private boolean _changePlayerListName()
|
||||||
{
|
{
|
||||||
return config.getBoolean("change-playerlist", false);
|
return config.getBoolean("change-playerlist", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean changePlayerListName()
|
||||||
|
{
|
||||||
|
return changePlayerListName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean useBukkitPermissions()
|
public boolean useBukkitPermissions()
|
||||||
{
|
{
|
||||||
return config.getBoolean("use-bukkit-permissions", false);
|
return config.getBoolean("use-bukkit-permissions", false);
|
||||||
}
|
}
|
||||||
|
private boolean prefixsuffixconfigured = false;
|
||||||
|
private boolean addprefixsuffix = false;
|
||||||
|
|
||||||
|
private boolean _addPrefixSuffix()
|
||||||
|
{
|
||||||
|
return config.getBoolean("add-prefix-suffix", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean _isPrefixSuffixConfigured()
|
||||||
|
{
|
||||||
|
return config.hasProperty("add-prefix-suffix");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addPrefixSuffix()
|
public boolean addPrefixSuffix()
|
||||||
{
|
{
|
||||||
return config.getBoolean("add-prefix-suffix", ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat"));
|
return prefixsuffixconfigured ? addprefixsuffix : ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat");
|
||||||
}
|
}
|
||||||
|
private boolean disablePrefix = false;
|
||||||
|
|
||||||
@Override
|
private boolean _disablePrefix()
|
||||||
public boolean disablePrefix()
|
|
||||||
{
|
{
|
||||||
return config.getBoolean("disablePrefix", false);
|
return config.getBoolean("disablePrefix", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean disableSuffix()
|
public boolean disablePrefix()
|
||||||
|
{
|
||||||
|
return disablePrefix;
|
||||||
|
}
|
||||||
|
private boolean disableSuffix = false;
|
||||||
|
|
||||||
|
private boolean _disableSuffix()
|
||||||
{
|
{
|
||||||
return config.getBoolean("disableSuffix", false);
|
return config.getBoolean("disableSuffix", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean disableSuffix()
|
||||||
|
{
|
||||||
|
return disableSuffix;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getAutoAfk()
|
public long getAutoAfk()
|
||||||
{
|
{
|
||||||
@ -713,7 +794,7 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return config.getBoolean("world-teleport-permissions", false);
|
return config.getBoolean("world-teleport-permissions", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isWorldHomePermissions()
|
public boolean isWorldHomePermissions()
|
||||||
{
|
{
|
||||||
@ -800,38 +881,35 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return (config.getLong("teleport-invulnerability", 0) > 0);
|
return (config.getLong("teleport-invulnerability", 0) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTeleportInvulnerability()
|
public boolean isTeleportInvulnerability()
|
||||||
{
|
{
|
||||||
return teleportInvulnerability;
|
return teleportInvulnerability;
|
||||||
}
|
}
|
||||||
|
|
||||||
private long loginAttackDelay;
|
private long loginAttackDelay;
|
||||||
|
|
||||||
private long _getLoginAttackDelay()
|
private long _getLoginAttackDelay()
|
||||||
{
|
{
|
||||||
return config.getLong("login-attack-delay", 0) * 1000;
|
return config.getLong("login-attack-delay", 0) * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getLoginAttackDelay()
|
public long getLoginAttackDelay()
|
||||||
{
|
{
|
||||||
return loginAttackDelay;
|
return loginAttackDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int signUsePerSecond;
|
private int signUsePerSecond;
|
||||||
|
|
||||||
private int _getSignUsePerSecond()
|
private int _getSignUsePerSecond()
|
||||||
{
|
{
|
||||||
final int perSec = config.getInt("sign-use-per-second", 4);
|
final int perSec = config.getInt("sign-use-per-second", 4);
|
||||||
return perSec > 0 ? perSec : 1;
|
return perSec > 0 ? perSec : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSignUsePerSecond()
|
public int getSignUsePerSecond()
|
||||||
{
|
{
|
||||||
return signUsePerSecond;
|
return signUsePerSecond;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import java.util.Calendar;
|
|||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -284,10 +285,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final String opPrefix = ess.getSettings().getOperatorColor().toString();
|
final ChatColor opPrefix = ess.getSettings().getOperatorColor();
|
||||||
if (opPrefix.length() > 0)
|
if (opPrefix != null && opPrefix.toString().length() > 0)
|
||||||
{
|
{
|
||||||
prefix.insert(0, opPrefix);
|
prefix.insert(0, opPrefix.toString());
|
||||||
suffix = "§f";
|
suffix = "§f";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -325,7 +326,8 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
{
|
{
|
||||||
output = Util.lastCode(strPrefix) + nickname.substring(0, 14);
|
output = Util.lastCode(strPrefix) + nickname.substring(0, 14);
|
||||||
}
|
}
|
||||||
if (output.charAt(output.length() - 1) == '§') {
|
if (output.charAt(output.length() - 1) == '§')
|
||||||
|
{
|
||||||
output = output.substring(0, output.length() - 1);
|
output = output.substring(0, output.length() - 1);
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
@ -639,7 +641,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
{
|
{
|
||||||
return vanished;
|
return vanished;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVanished(final boolean set)
|
public void setVanished(final boolean set)
|
||||||
{
|
{
|
||||||
vanished = set;
|
vanished = set;
|
||||||
@ -671,21 +673,23 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
final boolean set = !vanished;
|
final boolean set = !vanished;
|
||||||
this.setVanished(set);
|
this.setVanished(set);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkSignThrottle() {
|
public boolean checkSignThrottle()
|
||||||
if (isSignThrottled()) {
|
{
|
||||||
|
if (isSignThrottled())
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
updateThrottle();
|
updateThrottle();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSignThrottled()
|
public boolean isSignThrottled()
|
||||||
{
|
{
|
||||||
final long minTime = lastThrottledAction + (1000 / ess.getSettings().getSignUsePerSecond());
|
final long minTime = lastThrottledAction + (1000 / ess.getSettings().getSignUsePerSecond());
|
||||||
return (System.currentTimeMillis() < minTime);
|
return (System.currentTimeMillis() < minTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateThrottle()
|
public void updateThrottle()
|
||||||
{
|
{
|
||||||
lastThrottledAction = System.currentTimeMillis();;
|
lastThrottledAction = System.currentTimeMillis();;
|
||||||
|
@ -440,14 +440,14 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||||||
|
|
||||||
public List<String> getIgnoredPlayers()
|
public List<String> getIgnoredPlayers()
|
||||||
{
|
{
|
||||||
return config.getStringList("ignore");
|
return Collections.synchronizedList(config.getStringList("ignore"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIgnoredPlayers(List<String> players)
|
public void setIgnoredPlayers(List<String> players)
|
||||||
{
|
{
|
||||||
if (players == null || players.isEmpty())
|
if (players == null || players.isEmpty())
|
||||||
{
|
{
|
||||||
ignoredPlayers = new ArrayList<String>();
|
ignoredPlayers = Collections.synchronizedList(new ArrayList<String>());
|
||||||
config.removeProperty("ignore");
|
config.removeProperty("ignore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -466,7 +466,7 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return isIgnoredPlayer(user);
|
return isIgnoredPlayer(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isIgnoredPlayer(IUser user)
|
public boolean isIgnoredPlayer(IUser user)
|
||||||
|
@ -215,10 +215,11 @@ public class Util
|
|||||||
{
|
{
|
||||||
c.add(Calendar.SECOND, seconds * (future ? 1 : -1));
|
c.add(Calendar.SECOND, seconds * (future ? 1 : -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
Calendar max = new GregorianCalendar();
|
Calendar max = new GregorianCalendar();
|
||||||
max.add(Calendar.YEAR, 10);
|
max.add(Calendar.YEAR, 10);
|
||||||
if (c.after(max)) {
|
if (c.after(max))
|
||||||
|
{
|
||||||
return max.getTimeInMillis();
|
return max.getTimeInMillis();
|
||||||
}
|
}
|
||||||
return c.getTimeInMillis();
|
return c.getTimeInMillis();
|
||||||
@ -295,12 +296,14 @@ public class Util
|
|||||||
int x = loc.getBlockX();
|
int x = loc.getBlockX();
|
||||||
int y = (int)Math.round(loc.getY());
|
int y = (int)Math.round(loc.getY());
|
||||||
int z = loc.getBlockZ();
|
int z = loc.getBlockZ();
|
||||||
|
final int origY = y;
|
||||||
|
|
||||||
while (isBlockAboveAir(world, x, y, z))
|
while (isBlockAboveAir(world, x, y, z))
|
||||||
{
|
{
|
||||||
y -= 1;
|
y -= 1;
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
{
|
{
|
||||||
|
y = origY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,10 +313,36 @@ public class Util
|
|||||||
y += 1;
|
y += 1;
|
||||||
if (y >= world.getHighestBlockYAt(x, z))
|
if (y >= world.getHighestBlockYAt(x, z))
|
||||||
{
|
{
|
||||||
x += 1;
|
x -= 3;
|
||||||
|
z -= 3;
|
||||||
|
y = origY + 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (isBlockUnsafe(world, x, y, z))
|
||||||
|
{
|
||||||
|
y -= 1;
|
||||||
|
if (y + 4 < origY)
|
||||||
|
{
|
||||||
|
x += 1;
|
||||||
|
if (x - 3 > loc.getBlockX())
|
||||||
|
{
|
||||||
|
x = loc.getBlockX() - 3;
|
||||||
|
z += 1;
|
||||||
|
if (z - 3 > loc.getBlockZ())
|
||||||
|
{
|
||||||
|
x = loc.getBlockX() + 4;
|
||||||
|
z = loc.getBlockZ();
|
||||||
|
y = world.getHighestBlockYAt(x, z);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
y = origY + 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (isBlockUnsafe(world, x, y, z))
|
while (isBlockUnsafe(world, x, y, z))
|
||||||
{
|
{
|
||||||
y -= 1;
|
y -= 1;
|
||||||
@ -321,7 +350,7 @@ public class Util
|
|||||||
{
|
{
|
||||||
x += 1;
|
x += 1;
|
||||||
y = world.getHighestBlockYAt(x, z);
|
y = world.getHighestBlockYAt(x, z);
|
||||||
if (x - 32 > loc.getBlockX())
|
if (x - 48 > loc.getBlockX())
|
||||||
{
|
{
|
||||||
throw new Exception(_("holeInFloor"));
|
throw new Exception(_("holeInFloor"));
|
||||||
}
|
}
|
||||||
@ -510,15 +539,16 @@ public class Util
|
|||||||
}
|
}
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String lastCode(final String input) {
|
public static String lastCode(final String input)
|
||||||
|
{
|
||||||
int pos = input.lastIndexOf("§");
|
int pos = input.lastIndexOf("§");
|
||||||
if (pos == -1 || (pos + 1) == input.length()) {
|
if (pos == -1 || (pos + 1) == input.length())
|
||||||
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return input.substring(pos, pos + 2);
|
return input.substring(pos, pos + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static transient final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)");
|
private static transient final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)");
|
||||||
private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]");
|
private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]");
|
||||||
private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])");
|
private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])");
|
||||||
|
@ -2,7 +2,6 @@ package com.earth2me.essentials.commands;
|
|||||||
|
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
|
||||||
import com.earth2me.essentials.craftbukkit.SetExpFix;
|
import com.earth2me.essentials.craftbukkit.SetExpFix;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -122,8 +121,7 @@ public class Commandexp extends EssentialsCommand
|
|||||||
private void showExp(final CommandSender sender, final User target)
|
private void showExp(final CommandSender sender, final User target)
|
||||||
{
|
{
|
||||||
final int totalExp = SetExpFix.getTotalExperience(target);
|
final int totalExp = SetExpFix.getTotalExperience(target);
|
||||||
final int expLeft = (int)Util.roundDouble(((((3.5 * target.getLevel()) + 6.7) - (totalExp - ((1.75 * (target.getLevel() * target.getLevel())) + (5.00 * target.getLevel())))) + 1));
|
sender.sendMessage(_("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target), target.getLevel(), SetExpFix.getExpUntilNextLevel(target)));
|
||||||
sender.sendMessage(_("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target), target.getLevel(), expLeft));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setExp(final CommandSender sender, final User target, final String strAmount, final boolean give)
|
private void setExp(final CommandSender sender, final User target, final String strAmount, final boolean give)
|
||||||
|
@ -19,53 +19,57 @@ public class Commandgamemode extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
if (args.length < 1)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
gamemodeOtherPlayers(server, sender, args);
|
gamemodeOtherPlayers(server, sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.gamemode.others"))
|
if (args.length < 1)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.length > 1 && args[1].trim().length() > 2 && user.isAuthorized("essentials.gamemode.others"))
|
||||||
{
|
{
|
||||||
gamemodeOtherPlayers(server, user, args);
|
gamemodeOtherPlayers(server, user, args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
performSetMode(args[0].toLowerCase(Locale.ENGLISH), user);
|
||||||
user.setGameMode(user.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
|
|
||||||
user.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName()));
|
user.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final String[] args)
|
private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final String[] args)
|
||||||
{
|
{
|
||||||
for (Player matchPlayer : server.matchPlayer(args[0]))
|
for (Player matchPlayer : server.matchPlayer(args[1]))
|
||||||
{
|
{
|
||||||
final User player = ess.getUser(matchPlayer);
|
final User player = ess.getUser(matchPlayer);
|
||||||
if (player.isHidden())
|
if (player.isHidden())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
performSetMode(args[0].toLowerCase(Locale.ENGLISH), player);
|
||||||
if (args.length > 1)
|
|
||||||
{
|
|
||||||
if (args[1].contains("creat") || args[1].equalsIgnoreCase("1"))
|
|
||||||
{
|
|
||||||
player.setGameMode(GameMode.CREATIVE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
|
|
||||||
}
|
|
||||||
sender.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
|
sender.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private void performSetMode(String mode, Player player)
|
||||||
|
{
|
||||||
|
if (mode.contains("survi") || mode.equalsIgnoreCase("0") || mode.equalsIgnoreCase("s"))
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
|
}
|
||||||
|
else if (mode.contains("creat") || mode.equalsIgnoreCase("1") || mode.equalsIgnoreCase("c"))
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.CREATIVE);
|
||||||
|
}
|
||||||
|
else if (mode.contains("advent") || mode.equalsIgnoreCase("2") || mode.equalsIgnoreCase("a"))
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -38,8 +38,19 @@ public class Commandgc extends EssentialsCommand
|
|||||||
|
|
||||||
for (World w : server.getWorlds())
|
for (World w : server.getWorlds())
|
||||||
{
|
{
|
||||||
|
String worldType = "World";
|
||||||
|
switch (w.getEnvironment())
|
||||||
|
{
|
||||||
|
case NETHER:
|
||||||
|
worldType = "Nether";
|
||||||
|
break;
|
||||||
|
case THE_END:
|
||||||
|
worldType = "The End";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
sender.sendMessage(
|
sender.sendMessage(
|
||||||
(w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": "
|
worldType + " \"" + w.getName() + "\": "
|
||||||
+ w.getLoadedChunks().length + _("gcchunks")
|
+ w.getLoadedChunks().length + _("gcchunks")
|
||||||
+ w.getEntities().size() + _("gcentities"));
|
+ w.getEntities().size() + _("gcentities"));
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ public class Commanditemdb extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
itemStack = ess.getItemDb().get(args[0]);
|
itemStack = ess.getItemDb().get(args[0]);
|
||||||
}
|
}
|
||||||
sender.sendMessage(itemStack.getType().toString() + "- " + itemStack.getTypeId() + ":" + Integer.toString(itemStack.getData().getData()));
|
sender.sendMessage(itemStack.getType().toString() + "- " + itemStack.getTypeId() + ":" + Integer.toString(itemStack.getDurability()));
|
||||||
|
|
||||||
if (itemStack.getType() != Material.AIR)
|
if (itemStack.getType() != Material.AIR)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@ public class Commandtp extends EssentialsCommand
|
|||||||
throw new Exception(_("teleportDisabled", toPlayer.getDisplayName()));
|
throw new Exception(_("teleportDisabled", toPlayer.getDisplayName()));
|
||||||
}
|
}
|
||||||
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||||
&& !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
|
&& !target.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
|
||||||
{
|
{
|
||||||
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
|
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public class Commandtpahere extends EssentialsCommand
|
|||||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||||
{
|
{
|
||||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public class Commandtpall extends EssentialsCommand
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public class Commandtphere extends EssentialsCommand
|
|||||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||||
{
|
{
|
||||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class Commandtpohere extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||||
{
|
{
|
||||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.earth2me.essentials.commands;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
import org.bukkit.Server;
|
||||||
|
|
||||||
|
|
||||||
|
public class Commandworkbench extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandworkbench()
|
||||||
|
{
|
||||||
|
super("workbench");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||||
|
{
|
||||||
|
user.openWorkbench(null, true);
|
||||||
|
}
|
||||||
|
}
|
@ -669,4 +669,10 @@ public class FakeWorld implements World
|
|||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Entity spawnEntity(Location lctn, EntityType et)
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ public class SetExpFix
|
|||||||
player.setExp(0);
|
player.setExp(0);
|
||||||
player.setLevel(0);
|
player.setLevel(0);
|
||||||
player.setTotalExperience(0);
|
player.setTotalExperience(0);
|
||||||
|
|
||||||
//This following code is technically redundant now, as bukkit now calulcates levels more or less correctly
|
//This following code is technically redundant now, as bukkit now calulcates levels more or less correctly
|
||||||
//At larger numbers however... player.getExp(3000), only seems to give 2999, putting the below calculations off.
|
//At larger numbers however... player.getExp(3000), only seems to give 2999, putting the below calculations off.
|
||||||
int amount = exp;
|
int amount = exp;
|
||||||
@ -40,26 +40,42 @@ public class SetExpFix
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int getExpToLevel(final Player player)
|
private static int getExpToLevel(final Player player)
|
||||||
{
|
{
|
||||||
return getExpToLevel(player.getLevel());
|
return getExpToLevel(player.getLevel());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getExpToLevel(final int level)
|
private static int getExpToLevel(final int level)
|
||||||
{
|
{
|
||||||
return 7 + (level * 7 >> 1);
|
if (level >= 30)
|
||||||
|
{
|
||||||
|
return 62 + (level - 30) * 7;
|
||||||
|
}
|
||||||
|
if (level >= 15)
|
||||||
|
{
|
||||||
|
return 17 + (level - 15) * 3;
|
||||||
|
}
|
||||||
|
return 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
//This method is required because the bukkit player.getTotalExperience() method, shows exp that has been 'spent'.
|
//This method is required because the bukkit player.getTotalExperience() method, shows exp that has been 'spent'.
|
||||||
//Without this people would be able to use exp and then still sell it.
|
//Without this people would be able to use exp and then still sell it.
|
||||||
public static int getTotalExperience(final Player player)
|
public static int getTotalExperience(final Player player)
|
||||||
{
|
{
|
||||||
int exp = (int)Math.round(getExpToLevel(player) * player.getExp());
|
int exp = (int)Math.round(getExpToLevel(player) * player.getExp());
|
||||||
int currentLevel = player.getLevel();
|
int currentLevel = player.getLevel();
|
||||||
|
|
||||||
while (currentLevel > 0) {
|
while (currentLevel > 0)
|
||||||
|
{
|
||||||
currentLevel--;
|
currentLevel--;
|
||||||
exp += getExpToLevel(currentLevel);
|
exp += getExpToLevel(currentLevel);
|
||||||
}
|
}
|
||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getExpUntilNextLevel(final Player player)
|
||||||
|
{
|
||||||
|
int exp = (int)Math.round(getExpToLevel(player) * player.getExp());
|
||||||
|
int nextLevel = player.getLevel() + 1;
|
||||||
|
return getExpToLevel(nextLevel) - exp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,6 +412,7 @@ public class EssentialsSign
|
|||||||
if (item.equalsIgnoreCase("times"))
|
if (item.equalsIgnoreCase("times"))
|
||||||
{
|
{
|
||||||
sign.setLine(index, (quantity - decrement) + " times");
|
sign.setLine(index, (quantity - decrement) + " times");
|
||||||
|
sign.updateSign();
|
||||||
return new Trade(signName.toLowerCase(Locale.ENGLISH) + "sign", ess);
|
return new Trade(signName.toLowerCase(Locale.ENGLISH) + "sign", ess);
|
||||||
}
|
}
|
||||||
else if (item.equalsIgnoreCase("exp") || item.equalsIgnoreCase("xp"))
|
else if (item.equalsIgnoreCase("exp") || item.equalsIgnoreCase("xp"))
|
||||||
|
@ -75,8 +75,8 @@ public class SignBlockListener implements Listener
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onSignChange(final SignChangeEvent event)
|
public void onSignChange2(final SignChangeEvent event)
|
||||||
{
|
{
|
||||||
if (ess.getSettings().areSignsDisabled())
|
if (ess.getSettings().areSignsDisabled())
|
||||||
{
|
{
|
||||||
@ -88,6 +88,15 @@ public class SignBlockListener implements Listener
|
|||||||
{
|
{
|
||||||
event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i)));
|
event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
public void onSignChange(final SignChangeEvent event)
|
||||||
|
{
|
||||||
|
if (ess.getSettings().areSignsDisabled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (Signs signs : Signs.values())
|
for (Signs signs : Signs.values())
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ import com.earth2me.essentials.Trade;
|
|||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
|
||||||
public class SignGameMode extends EssentialsSign
|
public class SignGameMode extends EssentialsSign
|
||||||
@ -19,19 +20,53 @@ public class SignGameMode extends EssentialsSign
|
|||||||
@Override
|
@Override
|
||||||
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
||||||
{
|
{
|
||||||
validateTrade(sign, 1, ess);
|
final String gamemode = sign.getLine(1);
|
||||||
|
if (gamemode.isEmpty())
|
||||||
|
{
|
||||||
|
sign.setLine(1, "Survival");
|
||||||
|
}
|
||||||
|
|
||||||
|
validateTrade(sign, 2, ess);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
|
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
|
||||||
{
|
{
|
||||||
final Trade charge = getTrade(sign, 1, ess);
|
final Trade charge = getTrade(sign, 2, ess);
|
||||||
|
final String mode = sign.getLine(1).trim();
|
||||||
|
|
||||||
|
if (mode.isEmpty())
|
||||||
|
{
|
||||||
|
throw new SignException(_("invalidSignLine", 2));
|
||||||
|
}
|
||||||
|
|
||||||
charge.isAffordableFor(player);
|
charge.isAffordableFor(player);
|
||||||
|
|
||||||
player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
|
performSetMode(mode.toLowerCase(Locale.ENGLISH), player);
|
||||||
player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
|
player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
|
||||||
charge.charge(player);
|
charge.charge(player);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void performSetMode(String mode, Player player) throws SignException
|
||||||
|
{
|
||||||
|
if (mode.contains("survi") || mode.equalsIgnoreCase("0"))
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
|
}
|
||||||
|
else if (mode.contains("creat") || mode.equalsIgnoreCase("1"))
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.CREATIVE);
|
||||||
|
}
|
||||||
|
else if (mode.contains("advent") || mode.equalsIgnoreCase("2"))
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SignException(_("invalidSignLine", 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
54
Essentials/src/com/earth2me/essentials/signs/SignInfo.java
Normal file
54
Essentials/src/com/earth2me/essentials/signs/SignInfo.java
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package com.earth2me.essentials.signs;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.ChargeException;
|
||||||
|
import com.earth2me.essentials.IEssentials;
|
||||||
|
import com.earth2me.essentials.Trade;
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
import com.earth2me.essentials.textreader.IText;
|
||||||
|
import com.earth2me.essentials.textreader.KeywordReplacer;
|
||||||
|
import com.earth2me.essentials.textreader.TextInput;
|
||||||
|
import com.earth2me.essentials.textreader.TextPager;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
||||||
|
public class SignInfo extends EssentialsSign
|
||||||
|
{
|
||||||
|
public SignInfo()
|
||||||
|
{
|
||||||
|
super("Info");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
||||||
|
{
|
||||||
|
validateTrade(sign, 3, ess);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
|
||||||
|
{
|
||||||
|
final Trade charge = getTrade(sign, 3, ess);
|
||||||
|
charge.isAffordableFor(player);
|
||||||
|
|
||||||
|
String chapter = sign.getLine(1);
|
||||||
|
String page = sign.getLine(2);
|
||||||
|
|
||||||
|
final IText input;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
input = new TextInput(player, "info", true, ess);
|
||||||
|
final IText output = new KeywordReplacer(input, player, ess);
|
||||||
|
final TextPager pager = new TextPager(output);
|
||||||
|
pager.showPage(chapter, page, null, player);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (IOException ex)
|
||||||
|
{
|
||||||
|
throw new SignException(ex.getMessage(), ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
charge.charge(player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
57
Essentials/src/com/earth2me/essentials/signs/SignRepair.java
Normal file
57
Essentials/src/com/earth2me/essentials/signs/SignRepair.java
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package com.earth2me.essentials.signs;
|
||||||
|
|
||||||
|
import static com.earth2me.essentials.I18n._;
|
||||||
|
import com.earth2me.essentials.ChargeException;
|
||||||
|
import com.earth2me.essentials.IEssentials;
|
||||||
|
import com.earth2me.essentials.Trade;
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
import com.earth2me.essentials.commands.Commandrepair;
|
||||||
|
|
||||||
|
|
||||||
|
public class SignRepair extends EssentialsSign
|
||||||
|
{
|
||||||
|
public SignRepair()
|
||||||
|
{
|
||||||
|
super("Repair");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
||||||
|
{
|
||||||
|
final String repairTarget = sign.getLine(1);
|
||||||
|
if (repairTarget.isEmpty())
|
||||||
|
{
|
||||||
|
sign.setLine(1, "Hand");
|
||||||
|
}
|
||||||
|
else if (!repairTarget.equalsIgnoreCase("all") && !repairTarget.equalsIgnoreCase("hand") )
|
||||||
|
{
|
||||||
|
throw new SignException(_("invalidSignLine", 2));
|
||||||
|
}
|
||||||
|
validateTrade(sign, 2, ess);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
|
||||||
|
{
|
||||||
|
final Trade charge = getTrade(sign, 2, ess);
|
||||||
|
charge.isAffordableFor(player);
|
||||||
|
|
||||||
|
Commandrepair command = new Commandrepair();
|
||||||
|
command.setEssentials(ess);
|
||||||
|
String[] args = new String[]
|
||||||
|
{
|
||||||
|
sign.getLine(1)
|
||||||
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
command.run(ess.getServer(), player, "repair", args);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new SignException(ex.getMessage(), ex);
|
||||||
|
}
|
||||||
|
charge.charge(player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -10,9 +10,11 @@ public enum Signs
|
|||||||
FREE(new SignFree()),
|
FREE(new SignFree()),
|
||||||
GAMEMODE(new SignGameMode()),
|
GAMEMODE(new SignGameMode()),
|
||||||
HEAL(new SignHeal()),
|
HEAL(new SignHeal()),
|
||||||
|
INFO(new SignInfo()),
|
||||||
KIT(new SignKit()),
|
KIT(new SignKit()),
|
||||||
MAIL(new SignMail()),
|
MAIL(new SignMail()),
|
||||||
PROTECTION(new SignProtection()),
|
PROTECTION(new SignProtection()),
|
||||||
|
REPAIR(new SignRepair()),
|
||||||
SELL(new SignSell()),
|
SELL(new SignSell()),
|
||||||
SPAWNMOB(new SignSpawnmob()),
|
SPAWNMOB(new SignSpawnmob()),
|
||||||
TIME(new SignTime()),
|
TIME(new SignTime()),
|
||||||
|
@ -40,8 +40,8 @@ public class KeywordReplacer implements IText
|
|||||||
user.setDisplayNick();
|
user.setDisplayNick();
|
||||||
displayName = user.getDisplayName();
|
displayName = user.getDisplayName();
|
||||||
userName = user.getName();
|
userName = user.getName();
|
||||||
ipAddress = user.getAddress().getAddress().toString();
|
ipAddress = user.getAddress() == null || user.getAddress().getAddress() == null ? "" : user.getAddress().getAddress().toString();
|
||||||
address = user.getAddress().toString();
|
address = user.getAddress() == null ? "" : user.getAddress().toString();
|
||||||
balance = Double.toString(user.getMoney());
|
balance = Double.toString(user.getMoney());
|
||||||
mails = Integer.toString(user.getMails().size());
|
mails = Integer.toString(user.getMails().size());
|
||||||
world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName();
|
world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName();
|
||||||
|
@ -48,7 +48,7 @@ public class TextPager
|
|||||||
|
|
||||||
final int start = onePage ? 0 : (page - 1) * 9;
|
final int start = onePage ? 0 : (page - 1) * 9;
|
||||||
final int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
|
final int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
|
||||||
if (!onePage)
|
if (!onePage && commandName != null)
|
||||||
{
|
{
|
||||||
StringBuilder content = new StringBuilder();
|
StringBuilder content = new StringBuilder();
|
||||||
final String[] title = commandName.split(" ", 2);
|
final String[] title = commandName.split(" ", 2);
|
||||||
@ -72,7 +72,7 @@ public class TextPager
|
|||||||
{
|
{
|
||||||
sender.sendMessage(lines.get(i));
|
sender.sendMessage(lines.get(i));
|
||||||
}
|
}
|
||||||
if (!onePage && page < pages)
|
if (!onePage && page < pages && commandName != null)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("readNextPage", commandName, page + 1));
|
sender.sendMessage(_("readNextPage", commandName, page + 1));
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ public class TextPager
|
|||||||
}
|
}
|
||||||
|
|
||||||
int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
|
int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
|
||||||
if (!onePage)
|
if (!onePage && commandName != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
sender.sendMessage(_("infoPages", page, pages, I18n.capitalCase(commandName)));
|
sender.sendMessage(_("infoPages", page, pages, I18n.capitalCase(commandName)));
|
||||||
@ -139,7 +139,7 @@ public class TextPager
|
|||||||
{
|
{
|
||||||
sender.sendMessage(lines.get(i));
|
sender.sendMessage(lines.get(i));
|
||||||
}
|
}
|
||||||
if (!onePage && page < pages)
|
if (!onePage && page < pages && commandName != null)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("readNextPage", commandName, page + 1));
|
sender.sendMessage(_("readNextPage", commandName, page + 1));
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ public class TextPager
|
|||||||
|
|
||||||
final int page = chapterpage + 1;
|
final int page = chapterpage + 1;
|
||||||
final int pages = (chapterend - chapterstart) / 9 + ((chapterend - chapterstart) % 9 > 0 ? 1 : 0);
|
final int pages = (chapterend - chapterstart) / 9 + ((chapterend - chapterstart) % 9 > 0 ? 1 : 0);
|
||||||
if (!onePage)
|
if (!onePage && commandName != null)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("infoChapterPages", pageStr, page, pages));
|
sender.sendMessage(_("infoChapterPages", pageStr, page, pages));
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ public class TextPager
|
|||||||
{
|
{
|
||||||
sender.sendMessage(lines.get(i));
|
sender.sendMessage(lines.get(i));
|
||||||
}
|
}
|
||||||
if (!onePage && page < pages)
|
if (!onePage && page < pages && commandName != null)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("readNextPage", commandName, pageStr + " " + (page + 1)));
|
sender.sendMessage(_("readNextPage", commandName, pageStr + " " + (page + 1)));
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
# If you want to use special characters in this document, such as accented letters, you MUST save the file as UTF-8, not ANSI.
|
# If you want to use special characters in this document, such as accented letters, you MUST save the file as UTF-8, not ANSI.
|
||||||
# If you receive an error when Essentials loads, ensure that:
|
# If you receive an error when Essentials loads, ensure that:
|
||||||
# - No tabs are present: YAML only allows spaces
|
# - No tabs are present: YAML only allows spaces
|
||||||
# - Indents are correct: YAML heirarchy is based entirely on indentation
|
# - Indents are correct: YAML hierarchy is based entirely on indentation
|
||||||
# - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrphe)
|
# - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrphe)
|
||||||
# - List items are prefixed with a hyphen and indented:
|
# - List items are prefixed with a hyphen and indented:
|
||||||
# lists:
|
# lists:
|
||||||
@ -41,7 +41,7 @@ change-displayname: true
|
|||||||
# The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx.
|
# The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx.
|
||||||
# The value of change-displayname (above) has to be true.
|
# The value of change-displayname (above) has to be true.
|
||||||
# If you don't set this, it will default to true if essentials chat is installed.
|
# If you don't set this, it will default to true if essentials chat is installed.
|
||||||
# Don't forget to remove the # infront of the line
|
# Don't forget to remove the # in front of the line
|
||||||
#add-prefix-suffix: false
|
#add-prefix-suffix: false
|
||||||
|
|
||||||
# The delay, in seconds, required between /home, /tp, etc.
|
# The delay, in seconds, required between /home, /tp, etc.
|
||||||
@ -218,7 +218,9 @@ enabledSigns:
|
|||||||
#- enchant
|
#- enchant
|
||||||
#- gamemode
|
#- gamemode
|
||||||
#- heal
|
#- heal
|
||||||
|
#- info
|
||||||
#- spawnmob
|
#- spawnmob
|
||||||
|
#- repair
|
||||||
#- time
|
#- time
|
||||||
#- weather
|
#- weather
|
||||||
#- protection
|
#- protection
|
||||||
@ -226,7 +228,7 @@ enabledSigns:
|
|||||||
|
|
||||||
# How many times per second can Essentials signs be interacted with.
|
# How many times per second can Essentials signs be interacted with.
|
||||||
# Values should be between 1-20, 20 being virtually no lag protection.s
|
# Values should be between 1-20, 20 being virtually no lag protection.s
|
||||||
# Lower numbers will reduce the possiblity of lag, but may annoy players.
|
# Lower numbers will reduce the possibility of lag, but may annoy players.
|
||||||
sign-use-per-second: 4
|
sign-use-per-second: 4
|
||||||
|
|
||||||
# Backup runs a command while saving is disabled
|
# Backup runs a command while saving is disabled
|
||||||
@ -302,7 +304,7 @@ default-stack-size: -1
|
|||||||
|
|
||||||
# Oversized stacks are stacks that ignore the normal max stacksize.
|
# Oversized stacks are stacks that ignore the normal max stacksize.
|
||||||
# They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission.
|
# They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission.
|
||||||
# How many items should be in a oversized stack?
|
# How many items should be in an oversized stack?
|
||||||
oversized-stacksize: 64
|
oversized-stacksize: 64
|
||||||
|
|
||||||
# Do you allow to repair enchanted weapons and armor?
|
# Do you allow to repair enchanted weapons and armor?
|
||||||
@ -375,7 +377,7 @@ currency-symbol: '$'
|
|||||||
# The amount is always limited to 10 trillions because of the limitations of a java double
|
# The amount is always limited to 10 trillions because of the limitations of a java double
|
||||||
max-money: 10000000000000
|
max-money: 10000000000000
|
||||||
|
|
||||||
# Set the minimum amount of money a player can have (must be above the negitive of max-money).
|
# Set the minimum amount of money a player can have (must be above the negative of max-money).
|
||||||
# Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0.
|
# Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0.
|
||||||
min-money: -10000
|
min-money: -10000
|
||||||
|
|
||||||
@ -391,7 +393,7 @@ economy-log-enabled: false
|
|||||||
# Show other plugins commands in help
|
# Show other plugins commands in help
|
||||||
non-ess-in-help: true
|
non-ess-in-help: true
|
||||||
|
|
||||||
# Hide plugins which dont give a permission
|
# Hide plugins which do not give a permission
|
||||||
# You can override a true value here for a single plugin by adding a permission to a user/group.
|
# You can override a true value here for a single plugin by adding a permission to a user/group.
|
||||||
# The individual permission is: essentials.help.<plugin>, anyone with essentials.* or '*' will see all help this setting reguardless.
|
# The individual permission is: essentials.help.<plugin>, anyone with essentials.* or '*' will see all help this setting reguardless.
|
||||||
# You can use negitive permissions to remove access to just a single plugins help if the following is enabled.
|
# You can use negitive permissions to remove access to just a single plugins help if the following is enabled.
|
||||||
@ -424,7 +426,7 @@ chat:
|
|||||||
# Default: '{WORLDNAME} {DISPLAYNAME}&7:&f {MESSAGE}'
|
# Default: '{WORLDNAME} {DISPLAYNAME}&7:&f {MESSAGE}'
|
||||||
# Admins: '{WORLDNAME} &c[{GROUP}]&f {DISPLAYNAME}&7:&c {MESSAGE}'
|
# Admins: '{WORLDNAME} &c[{GROUP}]&f {DISPLAYNAME}&7:&c {MESSAGE}'
|
||||||
|
|
||||||
# If your using group formats make sure to remove the '#' to allow the setting to be read.
|
# If you are using group formats make sure to remove the '#' to allow the setting to be read.
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# +------------------------------------------------------+ #
|
# +------------------------------------------------------+ #
|
||||||
@ -608,7 +610,7 @@ newbies:
|
|||||||
spawnpoint: newbies
|
spawnpoint: newbies
|
||||||
|
|
||||||
# Do we want to give users anything on first join? Set to '' to disable
|
# Do we want to give users anything on first join? Set to '' to disable
|
||||||
# This kit will be given reguardless of cost, and permissions.
|
# This kit will be given regardless of cost, and permissions.
|
||||||
#kit: ''
|
#kit: ''
|
||||||
kit: tools
|
kit: tools
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} has been added to your account.
|
addedToAccount=\u00a7a{0} has been added to your account.
|
||||||
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=broke:
|
alertBroke=broke:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
||||||
alertPlaced=placed:
|
alertPlaced=placed:
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} bylo pripsano na tvuj ucet.
|
addedToAccount=\u00a7a{0} bylo pripsano na tvuj ucet.
|
||||||
addedToOthersAccount=\u00a7a{0} bylo pripsano na {1}\u00a7a ucet. Nova hodnota: {2}
|
addedToOthersAccount=\u00a7a{0} bylo pripsano na {1}\u00a7a ucet. Nova hodnota: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=zniceno:
|
alertBroke=zniceno:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} v: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} v: {3}
|
||||||
alertPlaced=polozeno:
|
alertPlaced=polozeno:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} er blevet tilf\u00f8jet til din konto.
|
addedToAccount=\u00a7a{0} er blevet tilf\u00f8jet til din konto.
|
||||||
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=\u00f8delagde:
|
alertBroke=\u00f8delagde:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3}
|
||||||
alertPlaced=placerede:
|
alertPlaced=placerede:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
|
addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
|
||||||
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=zerst\u00f6rt:
|
alertBroke=zerst\u00f6rt:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
|
||||||
alertPlaced=platziert:
|
alertPlaced=platziert:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} has been added to your account.
|
addedToAccount=\u00a7a{0} has been added to your account.
|
||||||
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=broke:
|
alertBroke=broke:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
||||||
alertPlaced=placed:
|
alertPlaced=placed:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta.
|
addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta.
|
||||||
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=roto:
|
alertBroke=roto:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3}
|
||||||
alertPlaced=situado:
|
alertPlaced=situado:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} on lis\u00e4tty sinun tilillesi.
|
addedToAccount=\u00a7a{0} on lis\u00e4tty sinun tilillesi.
|
||||||
addedToOthersAccount=\u00a7a{0} lis\u00e4tty {1}\u00a7a tilille. Uusi rahatilanne: {2}
|
addedToOthersAccount=\u00a7a{0} lis\u00e4tty {1}\u00a7a tilille. Uusi rahatilanne: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=rikkoi:
|
alertBroke=rikkoi:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} sijainnissa: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} sijainnissa: {3}
|
||||||
alertPlaced=laittoi:
|
alertPlaced=laittoi:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 \u00e0 votre compte.
|
addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 \u00e0 votre compte.
|
||||||
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=a cass\u00e9 :
|
alertBroke=a cass\u00e9 :
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3}
|
||||||
alertPlaced=a plac\u00e9 :
|
alertPlaced=a plac\u00e9 :
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} e'' stato aggiunto al tuo account.
|
addedToAccount=\u00a7a{0} e'' stato aggiunto al tuo account.
|
||||||
addedToOthersAccount=\u00a7a{0} e'' stato aggiunto all''account {1}\u00a7a. Nuovo bilancio: {2}
|
addedToOthersAccount=\u00a7a{0} e'' stato aggiunto all''account {1}\u00a7a. Nuovo bilancio: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=fallito:
|
alertBroke=fallito:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} a: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} a: {3}
|
||||||
alertPlaced=collocato:
|
alertPlaced=collocato:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} is gestort op je rekening.
|
addedToAccount=\u00a7a{0} is gestort op je rekening.
|
||||||
addedToOthersAccount=\u00a7a{0} toegevoegd aan {1}\u00a7a zijn rekening. Nieuw balans: {2}
|
addedToOthersAccount=\u00a7a{0} toegevoegd aan {1}\u00a7a zijn rekening. Nieuw balans: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=gebroken:
|
alertBroke=gebroken:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3}
|
||||||
alertPlaced=geplaatst:
|
alertPlaced=geplaatst:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} zostalo dodane do twojego konta.
|
addedToAccount=\u00a7a{0} zostalo dodane do twojego konta.
|
||||||
addedToOthersAccount=\u00a7a{0} dodane do konta {1}\u00a7. Nowy stan konta: {2}.
|
addedToOthersAccount=\u00a7a{0} dodane do konta {1}\u00a7. Nowy stan konta: {2}.
|
||||||
|
adventure = adventure
|
||||||
alertBroke=broke:
|
alertBroke=broke:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
||||||
alertPlaced=postawil:
|
alertPlaced=postawil:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
action=* {0} {1}
|
action=* {0} {1}
|
||||||
addedToAccount=\u00a7a{0} foi adicionado a sua conta.
|
addedToAccount=\u00a7a{0} foi adicionado a sua conta.
|
||||||
addedToOthersAccount=\u00a7a{0} adicionado a {1}\u00a7a saldo. Novo saldo: {2}
|
addedToOthersAccount=\u00a7a{0} adicionado a {1}\u00a7a saldo. Novo saldo: {2}
|
||||||
|
adventure = adventure
|
||||||
alertBroke=Quebrou:
|
alertBroke=Quebrou:
|
||||||
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} em: {3}
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} em: {3}
|
||||||
alertPlaced=Colocou:
|
alertPlaced=Colocou:
|
||||||
|
437
Essentials/src/messages_se.properties
Normal file
437
Essentials/src/messages_se.properties
Normal file
@ -0,0 +1,437 @@
|
|||||||
|
#version: TeamCity
|
||||||
|
# Single quotes have to be doubled: ''
|
||||||
|
# Translations start here
|
||||||
|
# by: oggehej, corrected by NeonMaster.
|
||||||
|
action=* {0} {1}
|
||||||
|
addedToAccount=\u00a7a{0} har blivit tillagt p\u00c3\u00a5 ditt konto.
|
||||||
|
addedToOthersAccount=\u00a7a{0} har blivit tillagt p\u00c3\u00a5 {1}\u00a7a konto. Ny balans: {2}
|
||||||
|
adventure = adventure
|
||||||
|
alertBroke=gjorde s\u00c3\u00b6nder:
|
||||||
|
alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
|
||||||
|
alertPlaced=placerade:
|
||||||
|
alertUsed=anv\u00c3\u00a4nde:
|
||||||
|
autoAfkKickReason=Du har blivit utsparkad f\u00c3\u00b6r att ha varit inaktiv i mer \u00c3\u00a4n {0} minuter.
|
||||||
|
backAfterDeath=\u00a77Anv\u00c3\u00a4nd /back kommandot f\u00c3\u00b6r att komma tillbaka till din d\u00c3\u00b6dsplats.
|
||||||
|
backUsageMsg=\u00a77Tar dig tillbaka till din f\u00c3\u00b6reg\u00c3\u00a5ende position.
|
||||||
|
backupDisabled=Ett externt backup-skript har inte blivit konfigurerat.
|
||||||
|
backupFinished=Backup klar
|
||||||
|
backupStarted=Backup startad
|
||||||
|
balance=\u00a77Balans: {0}
|
||||||
|
balanceTop=\u00a77Topp balans ({0})
|
||||||
|
banExempt=\u00a7cDu kan inte banna den spelaren.
|
||||||
|
banIpAddress=\u00a77Bannade IP-adress
|
||||||
|
bannedIpsFileError=Kunde inte l\u00c3\u00a4sa banned-ips.txt
|
||||||
|
bannedIpsFileNotFound=banned-ips.txt hittades inte
|
||||||
|
bannedPlayersFileError=Kunde inte l\u00c3\u00a4sa banned-players.txt
|
||||||
|
bannedPlayersFileNotFound=banned-players.txt hittades inte
|
||||||
|
bigTreeFailure=\u00a7cEtt stort tr\u00c3\u00a4d kunde inte genereras misslyckades. F\u00c3\u00b6s\u00c3\u00b6k igen p\u00c3\u00a5 gr\u00c3\u00a4s eller jord.
|
||||||
|
bigTreeSuccess= \u00a77Stort tr\u00c3\u00a4d genererat.
|
||||||
|
blockList=Essentials vidarebefordrade f\u00c3\u00b6ljande kommandon till ett annat insticksprogram:
|
||||||
|
broadcast=[\u00a7cUts\u00c3\u00a4ndning\u00a7f]\u00a7a {0}
|
||||||
|
buildAlert=\u00a7cDu har inte till\u00c3\u00a5telse att bygga
|
||||||
|
bukkitFormatChanged=Bukkit versionsformat bytt. Version \u00c3\u00a4r inte kollad.
|
||||||
|
burnMsg=\u00a77Du satte eld p\u00c3\u00a5 {0} i {1} sekunder.
|
||||||
|
canTalkAgain=\u00a77Du kan nu prata igen!
|
||||||
|
cantFindGeoIpDB=Kunde inte hitta GeoIP-databasen!
|
||||||
|
cantReadGeoIpDB=Kunde inte l\u00c3\u00a4sa inneh\u00c3\u00a5ll fr\u00c3\u00a5n GeoIP-databasen!
|
||||||
|
cantSpawnItem=\u00a7cDu har inte beh\u00c3\u00b6righet att spawna {0}
|
||||||
|
chatTypeLocal=[L]
|
||||||
|
chatTypeSpy=[Spy]
|
||||||
|
commandFailed=Kommando {0} misslyckades:
|
||||||
|
commandHelpFailedForPlugin=Kunde inte hitta hj\u00c3\u00a4lp f\u00c3\u00b6r: {0}
|
||||||
|
commandNotLoaded=\u00a7cKommando {0} \u00c3\u00a4r felaktigt laddat.
|
||||||
|
compassBearing=\u00a77B\u00c3\u00a4ring: {0} ({1} grader).
|
||||||
|
configFileMoveError=Kunde inte flytta config.yml till backup-platsen.
|
||||||
|
configFileRenameError=Kunde inte byta namn p\u00c3\u00a5 temp-filen till config.yml
|
||||||
|
connectedPlayers=Anslutna spelare:
|
||||||
|
connectionFailed=Kunde inte \u00c3\u00b6ppna anslutning.
|
||||||
|
cooldownWithMessage=\u00a7cNedkylning: {0}
|
||||||
|
corruptNodeInConfig=\u00a74Notice: Din konfigurationsfil har en korrupt {0} nod.
|
||||||
|
couldNotFindTemplate=Kunde inte hitta mallen {0}
|
||||||
|
creatingConfigFromTemplate=Skapar konfiguration fr\u00c3\u00a5n mallen: {0}
|
||||||
|
creatingEmptyConfig=Skapar tom konfiguration: {0}
|
||||||
|
creative=kreativ
|
||||||
|
currency={0}{1}
|
||||||
|
currentWorld=Nuvarande v\u00c3\u00a4rld: {0}
|
||||||
|
day=dag
|
||||||
|
days=dagar
|
||||||
|
defaultBanReason=Banhammaren har talat!
|
||||||
|
deleteFileError=Kunde inte radera filen: {0}
|
||||||
|
deleteHome=\u00a77Hemmet {0} har tagits bort.
|
||||||
|
deleteJail=\u00a77F\u00c3\u00a4ngelset {0} har tagits bort.
|
||||||
|
deleteWarp=\u00a77Warpen {0} har tagits bort.
|
||||||
|
deniedAccessCommand={0} nekades \u00c3\u00a5tkomst till kommandot.
|
||||||
|
dependancyDownloaded=[Essentials] Beroende {0} laddades ner framg\u00c3\u00a5ngsrikt.
|
||||||
|
dependancyException=[Essentials] Ett fel uppstod n\u00c3\u00a4r ett beroende laddades ner.
|
||||||
|
dependancyNotFound=[Essentials] Ett n\u00c3\u00b6dv\u00c3\u00a4ndigt beroende hittades inte, laddar ner nu.
|
||||||
|
depth=\u00a77Du \u00c3\u00a4r p\u00c3\u00a5 havsniv\u00c3\u00a5n.
|
||||||
|
depthAboveSea=\u00a77Du \u00c3\u00a4r {0} block ovanf\u00c3\u00b6r havsni\u00c3\u00a5n.
|
||||||
|
depthBelowSea=\u00a77Du \u00c3\u00a4r {0} block under havsniv\u00c3\u00a5n.
|
||||||
|
destinationNotSet=Ingen destination \u00c3\u00a4r inst\u00c3\u00a4lld.
|
||||||
|
disableUnlimited=\u00a77Inaktiverade o\u00c3\u00a4ndligt placerande av {0} f\u00c3\u00b6r {1}.
|
||||||
|
disabled=inaktiverad
|
||||||
|
disabledToSpawnMob=Att spawna fram den h\u00c3\u00a4r moben \u00c3\u00a4r inaktiverat i configurationsfilen.
|
||||||
|
dontMoveMessage=\u00a77Teleporteringen p\u00c3\u00a5b\u00c3\u00b6rjas om {0}. R\u00c3\u00b6r dig inte.
|
||||||
|
downloadingGeoIp=Laddar ner GeoIP-databasen... det h\u00c3\u00a4r kan ta en stund (land: 0.6 MB, stad: 20MB)
|
||||||
|
duplicatedUserdata=Dublicerad anv\u00c3\u00a4ndardata: {0} och {1}
|
||||||
|
durability=\u00a77Det h\u00c3\u00a4r verktyget har \u00a7c{0}\u00a77 anv\u00c3\u00a4ndningar kvar
|
||||||
|
enableUnlimited=\u00a77Ger o\u00c3\u00a4ndligt av {0} till {1}.
|
||||||
|
enabled=aktiverad
|
||||||
|
enchantmentApplied = \u00a77F\u00c3\u00b6rtrollningen {0} har blivit till\u00c3\u00a4mpad p\u00c3\u00a5 saken du har i handen.
|
||||||
|
enchantmentNotFound = \u00a7cF\u00c3\u00b6rtrollningen hittades inte
|
||||||
|
enchantmentPerm = \u00a7cDu har inte beh\u00c3\u00b6righet att {0}
|
||||||
|
enchantmentRemoved = \u00a77F\u00c3\u00b6rtrollningen {0} har tagits bort fr\u00c3\u00a5n saken i din hand.
|
||||||
|
enchantments = \u00a77F\u00c3\u00b6rtrollningar: {0}
|
||||||
|
errorCallingCommand=Kunde inte kontakta kommandot /{0}
|
||||||
|
errorWithMessage=\u00a7cFel: {0}
|
||||||
|
essentialsHelp1=Filen \u00c3\u00a4r trasig och Essentials kan inte \u00c3\u00b6ppna den. Essentials \u00c3\u00a4r nu inaktiverat. Om du inte kan fixa problemet sj\u00c3\u00a4lv, g\u00c3\u00a5 till http://tiny.cc/EssentialsChat
|
||||||
|
essentialsHelp2=Filen \u00c3\u00a4r trasig och Essentials kan inte \u00c3\u00b6ppna den. Essentials \u00c3\u00a4r nu inaktiverat. Om du inte kan fixa problemet sj\u00c3\u00a4lv, skriv /essentialshelp i spelet eller g\u00c3\u00a5 till http://tiny.cc/EssentialsChat
|
||||||
|
essentialsReload=\u00a77Essentials Omladdat {0}
|
||||||
|
exp=\u00a7c{0} \u00a77har\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) och beh\u00c3\u00b6ver\u00a7c {3} \u00a77mer erfarenhet f\u00c3\u00b6r att g\u00c3\u00a5 upp en niv\u00c3\u00a5.
|
||||||
|
expSet=\u00a7c{0} \u00a77har nu\u00a7c {1} \u00a77erfarenhet.
|
||||||
|
extinguish=\u00a77Du sl\u00c3\u00a4ckte dig sj\u00c3\u00a4lv.
|
||||||
|
extinguishOthers=\u00a77Du sl\u00c3\u00a4ckte {0}.
|
||||||
|
failedToCloseConfig=Kunde inte st\u00c3\u00a4nga konfiguration {0}
|
||||||
|
failedToCreateConfig=Kunde inte skapa konfiguration {0}
|
||||||
|
failedToWriteConfig=Kunde inte skriva konfiguration {0}
|
||||||
|
false=falskt
|
||||||
|
feed=\u00a77Din hunger \u00c3\u00a4r m\u00c3\u00a4ttad.
|
||||||
|
feedOther=\u00a77Matade {0}.
|
||||||
|
fileRenameError=Namnbytet av filen {0} misslyckades
|
||||||
|
flyMode=\u00a77Aktiverade flygl\u00c3\u00a4ge {0} f\u00c3\u00b6r {1}.
|
||||||
|
foreverAlone=\u00a7cDu har ingen att svara.
|
||||||
|
freedMemory=Befriade {0} MB.
|
||||||
|
gameMode=\u00a77Satte {0}s spell\u00c3\u00a4ge till {1}.
|
||||||
|
gcchunks= bitar,
|
||||||
|
gcentities= enheter
|
||||||
|
gcfree=Ledigt minne: {0} MB
|
||||||
|
gcmax=Maximalt minne: {0} MB
|
||||||
|
gctotal=Tilldelat minne: {0} MB
|
||||||
|
geoIpUrlEmpty=Nerladdningsadressen f\u00c3\u00b6r GeoIP \u00c3\u00a4r tom.
|
||||||
|
geoIpUrlInvalid=Nerladdningsadressen f\u00c3\u00b6r GeoIP \u00c3\u00a4r ogiltig.
|
||||||
|
geoipJoinFormat=Spelaren {0} kommer fr\u00c3\u00a5n {1}
|
||||||
|
godDisabledFor=inaktiverat f\u00c3\u00b6r {0}
|
||||||
|
godEnabledFor=aktiverat f\u00c3\u00b6r {0}
|
||||||
|
godMode=\u00a77Od\u00c3\u00b6dlighet {0}.
|
||||||
|
hatArmor=\u00a7cFel, du kan inte anv\u00c3\u00a4nda den h\u00c3\u00a4r saken som en hatt!
|
||||||
|
hatFail=\u00a7cDu m\u00c3\u00a5ste ha n\u00c3\u00a5gonting att b\u00c3\u00a4ra i din hand.
|
||||||
|
hatPlaced=\u00a7eNjut av din nya hatt!
|
||||||
|
haveBeenReleased=\u00a77Du har blivit friad
|
||||||
|
heal=\u00a77Du har blivit l\u00c3\u00a4kt.
|
||||||
|
healOther=\u00a77L\u00c3\u00a4kte {0}.
|
||||||
|
helpConsole=F\u00c3\u00b6r att visa hj\u00c3\u00a4lp fr\u00c3\u00a5n konsolen, skriv ?.
|
||||||
|
helpFrom=\u00a77Kommandon fr\u00c3\u00a5n {0}:
|
||||||
|
helpLine=\u00a76/{0}\u00a7f: {1}
|
||||||
|
helpMatching=\u00a77Kommandon matchar "{0}":
|
||||||
|
helpOp=\u00a7c[OpHj\u00c3\u00a4lp]\u00a7f \u00a77{0}:\u00a7f {1}
|
||||||
|
helpPages=Sida \u00a7c{0}\u00a7f av \u00a7c{1}\u00a7f:
|
||||||
|
helpPlugin=\u00a74{0}\u00a7f: Hj\u00c3\u00a4lp f\u00c3\u00b6r insticksprogram: /help {1}
|
||||||
|
holeInFloor=H\u00c3\u00a5l i golvet
|
||||||
|
homeSet=\u00a77Hem inst\u00c3\u00a4llt.
|
||||||
|
homeSetToBed=\u00a77Ditt hem \u00c3\u00a4r nu inst\u00c3\u00a4llt till den h\u00c3\u00a4r s\u00c3\u00a4ngen.
|
||||||
|
homes=Hem: {0}
|
||||||
|
hour=timme
|
||||||
|
hours=timmar
|
||||||
|
ignorePlayer=Du ignorerar spelaren {0} fr\u00c3\u00a5n och med nu.
|
||||||
|
illegalDate=Felaktigt datumformat.
|
||||||
|
infoChapter=V\u00c3\u00a4lj kapitel:
|
||||||
|
infoChapterPages=Kapitel {0}, sida \u00a7c{1}\u00a7f av \u00a7c{2}\u00a7f:
|
||||||
|
infoFileDoesNotExist=Filen info.txt finns inte. Skapar en f\u00c3\u00b6r dig.
|
||||||
|
infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Sida \u00a74{0}\u00a76/\u00a74{1} \u00a7e----
|
||||||
|
infoUnknownChapter=Ok\u00c3\u00a4nt kapitel.
|
||||||
|
invBigger=De andra anv\u00c3\u00a4ndarnas f\u00c3\u00b6rr\u00c3\u00a5d \u00c3\u00a4r st\u00c3\u00b6rre \u00c3\u00a4n ditt.
|
||||||
|
invRestored=Ditt f\u00c3\u00b6rr\u00c3\u00a5d har blivit \u00c3\u00a5terst\u00c3\u00a4llt.
|
||||||
|
invSee=Du ser nu {0}s f\u00c3\u00b6rr\u00c3\u00a5d.
|
||||||
|
invSeeHelp=Anv\u00c3\u00a4nd /invsee f\u00c3\u00b6r att \u00c3\u00a5terst\u00c3\u00a4lla ditt f\u00c3\u00b6rr\u00c3\u00a5d.
|
||||||
|
invalidCharge=\u00a7cOgiltig laddning.
|
||||||
|
invalidHome=Hemmet {0} finns inte
|
||||||
|
invalidMob=Ogiltig monster-typ.
|
||||||
|
invalidServer=Ogiltig server!
|
||||||
|
invalidSignLine=Rad {0} p\u00c3\u00a5 skylten \u00c3\u00a4r ogiltig.
|
||||||
|
invalidWorld=\u00a7cOgiltig v\u00c3\u00a4rld.
|
||||||
|
inventoryCleared=\u00a77F\u00c3\u00b6rr\u00c3\u00a5d rensat.
|
||||||
|
inventoryClearedOthers=\u00a77F\u00c3\u00b6rr\u00c3\u00a5det av \u00a7c{0}\u00a77 \u00c3\u00a4r rensat.
|
||||||
|
is=\u00c3\u00a4r
|
||||||
|
itemCannotBeSold=Det objektet kan inte s\u00c3\u00a4ljas till servern.
|
||||||
|
itemMustBeStacked=Objektet m\u00c3\u00a5ste k\u00c3\u00b6pas i staplar. En m\u00c3\u00a4ngd av 2s kommer bli 2 staplar, etc.
|
||||||
|
itemNotEnough1=\u00a7cDu har inte tillr\u00c3\u00a4ckligt av den saken f\u00c3\u00b6r att s\u00c3\u00a4lja.
|
||||||
|
itemNotEnough2=\u00a77Om du ville s\u00c3\u00a4lja alla block av den typen, anv\u00c3\u00a4nd /sell blocknamn
|
||||||
|
itemNotEnough3=\u00a77/sell blocknamn -1 kommer att s\u00c3\u00a4lja allt av den blocktypen f\u00c3\u00b6rutom 1 o.s.v.
|
||||||
|
itemSellAir=F\u00c3\u00b6rs\u00c3\u00b6kte du att s\u00c3\u00a4lja luft? S\u00c3\u00a4tt en sak i din hand.
|
||||||
|
itemSold=\u00a77S\u00c3\u00a5lde f\u00c3\u00b6r \u00a7c{0} \u00a77({1} {2} f\u00c3\u00b6r {3} styck)
|
||||||
|
itemSoldConsole={0} s\u00c3\u00a5lde {1} f\u00c3\u00b6r \u00a77{2} \u00a77({3} saker f\u00c3\u00b6r {4} styck)
|
||||||
|
itemSpawn=\u00a77Ger {0} stycken {1}
|
||||||
|
itemsCsvNotLoaded=Kunde inte ladda items.csv.
|
||||||
|
jailAlreadyIncarcerated=\u00a7cPersonen \u00c3\u00a4r redan i f\u00c3\u00a4ngelse: {0}
|
||||||
|
jailMessage=\u00a7cBryter du mot reglerna, f\u00c3\u00a5r du st\u00c3\u00a5 ditt kast.
|
||||||
|
jailNotExist=Det f\u00c3\u00a4ngelset finns inte.
|
||||||
|
jailReleased=\u00a77Spelaren \u00a7e{0}\u00a77 \u00c3\u00a4r frisl\u00c3\u00a4ppt.
|
||||||
|
jailReleasedPlayerNotify=\u00a77Du har blivit frisl\u00c3\u00a4ppt!
|
||||||
|
jailSentenceExtended=F\u00c3\u00a4ngelsestraffet f\u00c3\u00b6rl\u00c3\u00a4ngt till: {0)
|
||||||
|
jailSet=\u00a77F\u00c3\u00a4ngelset {0} har skapats
|
||||||
|
jumpError=Det skulle skadat din dators hj\u00c3\u00a4rna.
|
||||||
|
kickDefault=Utsparkad fr\u00c3\u00a5n server
|
||||||
|
kickExempt=\u00a7cDu kan inte sparka ut den spelaren.
|
||||||
|
kickedAll=\u00a7cSparkade ut alla spelare fr\u00c3\u00a5n servern
|
||||||
|
kill=\u00a77D\u00c3\u00b6dade {0}.
|
||||||
|
kitError2=\u00a7cDet kit:et finns inte eller har blivit felaktigt definierat.
|
||||||
|
kitError=\u00a7cDet finns inga giltiga kit.
|
||||||
|
kitErrorHelp=\u00a7cKanske en sak fattar m\u00c3\u00a4ngd i konfigurationen?
|
||||||
|
kitGive=\u00a77Ger kit {0}.
|
||||||
|
kitInvFull=\u00a7cDitt F\u00c3\u00b6rr\u00c3\u00a5d var fullt, placerar kit p\u00c3\u00a5 golvet
|
||||||
|
kitTimed=\u00a7cDu kan inte anv\u00c3\u00a4nda det kit:et igen p\u00c3\u00a5 {0}.
|
||||||
|
kits=\u00a77Kit: {0}
|
||||||
|
lightningSmited=\u00a77Blixten har slagit ner p\u00c3\u00a5 dig
|
||||||
|
lightningUse=\u00a77En blixt kommer sl\u00c3\u00a5 ner p\u00c3\u00a5 {0}
|
||||||
|
listAfkTag = \u00a77[AFK]\u00a7f
|
||||||
|
listAmount = \u00a79Det \u00c3\u00a4r \u00a7c{0}\u00a79 av maximalt \u00a7c{1}\u00a79 spelare online.
|
||||||
|
listAmountHidden = \u00a79Det \u00c3\u00a4r \u00a7c{0}\u00a77/{1}\u00a79 Av maximalt \u00a7c{2}\u00a79 spelare online.
|
||||||
|
listGroupTag={0}\u00a7f:
|
||||||
|
listHiddenTag = \u00a77[G\u00c3\u0096MD]\u00a7f
|
||||||
|
loadWarpError=Kunde inte ladda warp {0}
|
||||||
|
localFormat=Lokal: <{0}> {1}
|
||||||
|
mailClear=\u00a7cF\u00c3\u00b6r att markera dina meddelanden som l\u00c3\u00a4sta, skriv /mail clear
|
||||||
|
mailCleared=\u00a77Meddelanden rensade!
|
||||||
|
mailSent=\u00a77Meddelandet skickad!
|
||||||
|
markMailAsRead=\u00a7cF\u00c3\u00b6r att markera dina meddelanden som l\u00c3\u00a4sta, skriv /mail clear
|
||||||
|
markedAsAway=\u00a77Du \u00c3\u00a4r nu markerad som borta.
|
||||||
|
markedAsNotAway=\u00a77Du \u00c3\u00a4r inte l\u00c3\u00a4ngre markerad som borta.
|
||||||
|
maxHomes=Du kan inte ha fler \u00c3\u00a4n {0} hem.
|
||||||
|
mayNotJail=\u00a7cDu f\u00c3\u00a5r inte s\u00c3\u00a4tta den personen i f\u00c3\u00a4ngelse
|
||||||
|
me=jag
|
||||||
|
minute=minut
|
||||||
|
minutes=minuter
|
||||||
|
missingItems=Du har inte {0}x {1}.
|
||||||
|
missingPrefixSuffix=Saknar ett prefix eller suffix f\u00c3\u00b6r {0}
|
||||||
|
mobSpawnError=Fel n\u00c3\u00a4r mob-spawnaren f\u00c3\u00b6rs\u00c3\u00b6kte att \u00c3\u00a4ndras.
|
||||||
|
mobSpawnLimit=M\u00c3\u00a4ngden mobs begr\u00c3\u00a4nsad till serverns maxgr\u00c3\u00a4ns
|
||||||
|
mobSpawnTarget=M\u00c3\u00a5lblocket m\u00c3\u00a5ste vara en mob-spawnare.
|
||||||
|
mobsAvailable=\u00a77Mobs: {0}
|
||||||
|
moneyRecievedFrom=\u00a7a{0} har tagits emot fr\u00c3\u00a5n {1}
|
||||||
|
moneySentTo=\u00a7a{0} har skickats till {1}
|
||||||
|
moneyTaken={0} \u00c3\u00a4r taget fr\u00c3\u00a5n ditt bankkonto.
|
||||||
|
month=m\u00c3\u00a5nad
|
||||||
|
months=m\u00c3\u00a5nader
|
||||||
|
moreThanZero=M\u00c3\u00a5ngden m\u00c3\u00a5ste vara st\u00c3\u00b6rre \u00c3\u00a4n 0.
|
||||||
|
msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt=\u00a7cDu kan inte tysta den spelaren.
|
||||||
|
mutedPlayer=Spelaren {0} \u00c3\u00a4r tystad.
|
||||||
|
mutedPlayerFor=Spelaren {0} \u00c3\u00a4r tystad i {1}.
|
||||||
|
mutedUserSpeaks={0} f\u00c3\u00b6rs\u00c3\u00b6kte att prata, men blev tystad.
|
||||||
|
nearbyPlayers=Spelare i n\u00c3\u00a4rheten: {0}
|
||||||
|
negativeBalanceError=Anv\u00c3\u00a4ndaren \u00c3\u00a4r inte till\u00c3\u00a5ten att ha en negativ balans.
|
||||||
|
nickChanged=Smeknamn \u00c3\u00a4ndrat.
|
||||||
|
nickDisplayName=\u00a77Du m\u00c3\u00a5ste aktivera change-displayname i Essentials-konfigurationen.
|
||||||
|
nickInUse=\u00a7cDet namnet anv\u00c3\u00a4nds redan.
|
||||||
|
nickNamesAlpha=\u00a7cSmeknamn m\u00c3\u00a5ste vara alfanumeriska.
|
||||||
|
nickNoMore=\u00a77Du har inte ett smeknamn l\u00c3\u00a4ngre
|
||||||
|
nickOthersPermission=\u00a7cDu har inte tillst\u00c3\u00a5nd att \u00c3\u00a4ndra andras smeknamn
|
||||||
|
nickSet=\u00a77Ditt smeknamn \u00c3\u00a4r nu \u00a7c{0}
|
||||||
|
noAccessCommand=\u00a7cDu har inte tillg\u00c3\u00a5ng till det kommandot.
|
||||||
|
noAccessPermission=\u00a7cDu har inte tillst\u00c3\u00a5nd till att komma \u00c3\u00a5t det {0}.
|
||||||
|
noBreakBedrock=Du har inte till\u00c3\u00a5telse att f\u00c3\u00b6rst\u00c3\u00b6ra berggrund.
|
||||||
|
noDestroyPermission=\u00a7Du har inte till\u00c3\u00a5telse att f\u00c3\u00b6rst\u00c3\u00b6ra det {0}.
|
||||||
|
noDurability=\u00a7cDen saken har inte en h\u00c3\u00a5llbarhet.
|
||||||
|
noGodWorldWarning=\u00a7cVarning! Od\u00c3\u00b6dlighet i den h\u00c3\u00a4r v\u00c3\u00a4rlden \u00c3\u00a4r inaktiverat.
|
||||||
|
noHelpFound=\u00a7cInga matchande kommandon.
|
||||||
|
noHomeSet=Du har inte angett ett hem.
|
||||||
|
noHomeSetPlayer=Den h\u00c3\u00a4r spelaren har inte ett hem.
|
||||||
|
noKitPermission=\u00a7cDu beh\u00c3\u00b6ver \u00a7c{0}\u00a7c tillst\u00c3\u00a5nd f\u00c3\u00b6r att anv\u00c3\u00a4nda det kitet.
|
||||||
|
noKits=\u00a77Det finns inga kits tillg\u00c3\u00a4ngliga \u00c3\u00a4n
|
||||||
|
noMail=Du har inget meddelande
|
||||||
|
noMotd=\u00a7cDet finns inget meddelande f\u00c3\u00b6r dagen.
|
||||||
|
noNewMail=\u00a77Du har inget nytt meddelande.
|
||||||
|
noPendingRequest=Du har inga v\u00c3\u00a4ntande f\u00c3\u00b6rfr\u00c3\u00a5gan.
|
||||||
|
noPerm=\u00a7cDu har inte \u00a7f{0}\u00a7c till\u00c3\u00a5telse.
|
||||||
|
noPermToSpawnMob=\u00a7cDu har inte till\u00c3\u00a5telse att spawna den h\u00c3\u00a4r moben.
|
||||||
|
noPlacePermission=\u00a7cDu har inte till\u00c3\u00a5telse att placera ett block n\u00c3\u00a4ra den skylten.
|
||||||
|
noPowerTools=Du har inga power-tools tilldelade.
|
||||||
|
noRules=\u00a7cDet finns inga specifierade regler \u00c3\u00a4n.
|
||||||
|
noWarpsDefined=Inga warpar \u00c3\u00a4r definerade
|
||||||
|
none=inga
|
||||||
|
notAllowedToQuestion=\u00a7cDu har inte tillst\u00c3\u00a5nd att anv\u00c3\u00a4nda den fr\u00c3\u00a5gan.
|
||||||
|
notAllowedToShout=\u00a7cDu har inte tillst\u00c3\u00a5nd att ropa.
|
||||||
|
notEnoughExperience=Du har inte nog med erfarenhet.
|
||||||
|
notEnoughMoney=Du har inte tillr\u00c3\u00a4ckligt med pengar.
|
||||||
|
notRecommendedBukkit= * ! * Bukkit-versionen \u00c3\u00a4r inte rekommenderad f\u00c3\u00b6r den h\u00c3\u00a4r versionen av Essentials.
|
||||||
|
notSupportedYet=St\u00c3\u00b6ds inte \u00c3\u00a4n.
|
||||||
|
nothingInHand = \u00a7cDu har inget i din hand.
|
||||||
|
now=nu
|
||||||
|
nuke=L\u00c3\u00a5t d\u00c3\u00b6d regna \u00c3\u00b6ver dem
|
||||||
|
numberRequired=Det ska vara ett nummer d\u00c3\u00a4r, dumbom.
|
||||||
|
onlyDayNight=/time st\u00c3\u00b6der bara day(dag) eller night(natt).
|
||||||
|
onlyPlayers=Bara spelare som \u00c3\u00a4r online kan anv\u00c3\u00a4nda {0}.
|
||||||
|
onlySunStorm=/weather st\u00c3\u00b6der bara sun(sol) eller storm(storm).
|
||||||
|
orderBalances=Best\u00c3\u00a4ller balanser av {0} anv\u00c3\u00a4ndare, v\u00c3\u00a4nligen v\u00c3\u00a4nta...
|
||||||
|
pTimeCurrent=\u00a7e{0}'*s\u00a7f klockan \u00c3\u00a4r {1}.
|
||||||
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f tiden \u00c3\u00a4r fixerad till {1}.
|
||||||
|
pTimeNormal=\u00a7e{0}''s\u00a7f tiden \u00c3\u00a4r normal och matchar servern.
|
||||||
|
pTimeOthersPermission=\u00a7cDu har inte beh\u00c3\u00b6righet att st\u00c3\u00a4lla in andra spelares tid.
|
||||||
|
pTimePlayers=Dessa spelare har sin egen tid:
|
||||||
|
pTimeReset=Spelarens tid har blivit \u00c3\u00a5terst\u00c3\u00a4lld till: \u00a7e{0}
|
||||||
|
pTimeSet=Spelarens tid \u00c3\u00a4r inst\u00c3\u00a4lld till \u00a73{0}\u00a7f till: \u00a7e{1}
|
||||||
|
pTimeSetFixed=Spelarens tid \u00c3\u00a4r fixerad till \u00a73{0}\u00a7f f\u00c3\u00b6r: \u00a7e{1}
|
||||||
|
parseError=Fel vid tolkning av {0} p\u00c3\u00a5 rad {1}
|
||||||
|
pendingTeleportCancelled=\u00a7cAvvaktande teleporteringsbeg\u00c3\u00a4ran \u00c3\u00a4r avbruten.
|
||||||
|
permissionsError=Saknar Permissions/GroupManager; chattens prefixer/suffixer kommer vara inaktiverade.
|
||||||
|
playerBanned=\u00a7cSpelaren {0} bannad {1} f\u00c3\u00b6r {2}
|
||||||
|
playerInJail=\u00a7cSpelaren \u00c3\u00a4r redan i f\u00c3\u00a4ngelse {0}.
|
||||||
|
playerJailed=\u00a77Spelaren {0} f\u00c3\u00a4ngslad.
|
||||||
|
playerJailedFor= \u00a77Spelaren {0} f\u00c3\u00a4ngslad f\u00c3\u00b6r {1}.
|
||||||
|
playerKicked=\u00a7cSpelaren {0} har sparkat ut {1} f\u00c3\u00b6r {2}
|
||||||
|
playerMuted=\u00a77Du har blivit tystad
|
||||||
|
playerMutedFor=\u00a77Du har blivit tystad f\u00c3\u00b6r {0}
|
||||||
|
playerNeverOnServer=\u00a7cSpelaren {0} har aldrig varit p\u00c3\u00a5 den h\u00c3\u00a4r servern.
|
||||||
|
playerNotFound=\u00a7cSpelaren hittades inte.
|
||||||
|
playerUnmuted=\u00a77Du kan nu prata
|
||||||
|
pong=Pong!
|
||||||
|
possibleWorlds=\u00a77M\u00c3\u00b6jliga v\u00c3\u00a4rdar \u00c3\u00a4r nummer mellan 0 och {0}.
|
||||||
|
powerToolAir=Kommandot kan inte tilldelas luft.
|
||||||
|
powerToolAlreadySet=Kommandot \u00a7c{0}\u00a7f \u00c3\u00a4r redan tilldelat {1}.
|
||||||
|
powerToolAttach=\u00a7c{0}\u00a7f kommandot tilldelat {1}.
|
||||||
|
powerToolClearAll=Alla powertool-kommandon har blivit rensade.
|
||||||
|
powerToolList={1} har f\u00c3\u00b6ljane kommandon: \u00a7c{0}\u00a7f.
|
||||||
|
powerToolListEmpty={0} har inga kommandon tilldelade.
|
||||||
|
powerToolNoSuchCommandAssigned=Kommandot \u00a7c{0}\u00a7f har inte blivit tilldelat {1}.
|
||||||
|
powerToolRemove=Kommandot \u00a7c{0}\u00a7f \u00c3\u00a4r borttaget fr\u00c3\u00a5n {1}.
|
||||||
|
powerToolRemoveAll=Alla kommandon \u00c3\u00a4r borttagna fr\u00c3\u00a5n {0}.
|
||||||
|
powerToolsDisabled=Alla dina powertools har blivit inaktiverade.
|
||||||
|
powerToolsEnabled=Alla dina powertools har blivit aktiverade.
|
||||||
|
protectionOwner=\u00a76[EssentialsProtect] Skydds\u00c3\u00a4gare: {0}
|
||||||
|
questionFormat=\u00a77[Fr\u00c3\u00a5ga]\u00a7f {0}
|
||||||
|
readNextPage=Skriv /{0} {1} f\u00c3\u00b6r att l\u00c3\u00a4sa n\u00c3\u00a4sta sida
|
||||||
|
reloadAllPlugins=\u00a77Laddade om alla insticksprogram.
|
||||||
|
removed=\u00a77Tog bort {0} enheter.
|
||||||
|
repair=Du har reparerat din: \u00a7e{0}.
|
||||||
|
repairAlreadyFixed=\u00a77Den h\u00c3\u00a4r saken beh\u00c3\u00b6ver inte repareras.
|
||||||
|
repairEnchanted=\u00a77Du har inte beh\u00c3\u00b6righet att reparera f\u00c3\u00b6rtrollade saker.
|
||||||
|
repairInvalidType=\u00a7cDen h\u00c3\u00a4r saken kan inte bli reparerad.
|
||||||
|
repairNone=Det var inga saker som beh\u00c3\u00b6ver repareras.
|
||||||
|
requestAccepted=\u00a77Teleporterings-f\u00c3\u00b6rfr\u00c3\u00a5gan accepterad.
|
||||||
|
requestAcceptedFrom=\u00a77{0} accepterade din teleportations-f\u00c3\u00b6rfr\u00c3\u00a5gan.
|
||||||
|
requestDenied=\u00a77Teleportations-f\u00c3\u00b6rfr\u00c3\u00a5gan nekad.
|
||||||
|
requestDeniedFrom=\u00a77{0} nekade din teleportations-f\u00c3\u00b6rfr\u00c3\u00a5gan.
|
||||||
|
requestSent=\u00a77F\u00c3\u00b6rfr\u00c3\u00a5gan skickad till {0}\u00a77.
|
||||||
|
requestTimedOut=\u00a7cTeleportations-f\u00c3\u00b6rfr\u00c3\u00a5gan har g\u00c3\u00a5tt ut
|
||||||
|
requiredBukkit= * ! * Du beh\u00c3\u00b6ver minst bygge {0} av CraftBukkit, ladda ner den fr\u00c3\u00a5n http://dl.bukkit.org/downloads/craftbukkit/
|
||||||
|
returnPlayerToJailError=Ett fel uppstod n\u00c3\u00a4r spelaren {0} skulle \u00c3\u00a5terv\u00c3\u00a4nda till f\u00c3\u00a4ngelset: {1}
|
||||||
|
second=sekund
|
||||||
|
seconds=sekunder
|
||||||
|
seenOffline=Spelaren {0} \u00c3\u00a4r offline sedan {1}
|
||||||
|
seenOnline=Spelaren {0} \u00c3\u00a4r online sedan {1}
|
||||||
|
serverFull=Servern \u00c3\u00a4r full
|
||||||
|
serverTotal=Totalt p\u00c3\u00a5 servern: {0}
|
||||||
|
setSpawner=Bytte typen av spawnare till {0}
|
||||||
|
sheepMalformedColor=Felformulerad f\u00c3\u00a4rg.
|
||||||
|
shoutFormat=\u00a77[Hojtning]\u00a7f {0}
|
||||||
|
signFormatFail=\u00a74[{0}]
|
||||||
|
signFormatSuccess=\u00a71[{0}]
|
||||||
|
signFormatTemplate=[{0}]
|
||||||
|
signProtectInvalidLocation=\u00a74Du har inte till\u00c3\u00a5telse att g\u00c3\u00b6ra skyltar h\u00c3\u00a4r.
|
||||||
|
similarWarpExist=En warp med ett liknande namn finns redan.
|
||||||
|
slimeMalformedSize=Felformulerad storlek.
|
||||||
|
soloMob=Det h\u00c3\u00a4r monstret gillar att vara ensam
|
||||||
|
spawnSet=\u00a77Spawnpunkten inst\u00c3\u00a4lld f\u00c3\u00b6r gruppen {0}.
|
||||||
|
spawned=spawnade
|
||||||
|
sudoExempt=Du kan inte g\u00c3\u00b6ra en sudo p\u00c3\u00a5 den h\u00c3\u00a4r anv\u00c3\u00a4ndaren
|
||||||
|
sudoRun=Tvingar {0} att springa: /{1} {2}
|
||||||
|
suicideMessage=\u00a77Adj\u00c3\u00b6 grymma v\u00c3\u00a4rld...
|
||||||
|
suicideSuccess= \u00a77{0} tog sitt eget liv
|
||||||
|
survival=\u00c3\u00b6verlevnad
|
||||||
|
takenFromAccount=\u00a7c{0} har tagits fr\u00c3\u00a5n ditt konto.
|
||||||
|
takenFromOthersAccount=\u00a7c{0} taget fr\u00c3\u00a5n {1}\u00a7c konto. Ny balans: {2}
|
||||||
|
teleportAAll=\u00a77Teleportations-f\u00c3\u00b6rfr\u00c3\u00a5gan skickad till alla spelare...
|
||||||
|
teleportAll=\u00a77Teleporterar alla spelare...
|
||||||
|
teleportAtoB=\u00a77{0}\u00a77 teleporterade dig till {1}\u00a77.
|
||||||
|
teleportDisabled={0} har teleportering inaktiverat.
|
||||||
|
teleportHereRequest=\u00a7c{0}\u00a7c har fr\u00c3\u00a5gat dig om du vill teleportera till dem.
|
||||||
|
teleportNewPlayerError=Messlyckades med att teleportera ny spelare
|
||||||
|
teleportRequest=\u00a7c{0}\u00a7c har beg\u00c3\u00a4rt att f\u00c3\u00a5 teleportera sig till dig.
|
||||||
|
teleportRequestTimeoutInfo=\u00a77Den h\u00c3\u00a4r beg\u00c3\u00a4ran kommer att g\u00c3\u00a5 ut efter {0} sekunder.
|
||||||
|
teleportTop=\u00a77Teleporterar till toppen.
|
||||||
|
teleportationCommencing=\u00a77Teleporteringen p\u00c3\u00a5b\u00c3\u00b6rjas...
|
||||||
|
teleportationDisabled=\u00a77Teleportering inaktiverat.
|
||||||
|
teleportationEnabled=\u00a77Teleportering aktiverat.
|
||||||
|
teleporting=\u00a77Teleporterar...
|
||||||
|
teleportingPortal=\u00a77Teleporterar via portal.
|
||||||
|
tempBanned=Tempor\u00c3\u00a4rt bannad fr\u00c3\u00a5n servern f\u00c3\u00b6r {0}
|
||||||
|
tempbanExempt=\u00a77Du kan inte tempor\u00c3\u00a4rt banna den spelaren
|
||||||
|
thunder= Du {0} \u00c3\u00a5ska i din v\u00c3\u00a4rld
|
||||||
|
thunderDuration=Du {0} i din v\u00c3\u00a4rld i {1} sekunder.
|
||||||
|
timeBeforeHeal=Tid f\u00c3\u00b6re n\u00c3\u00a4ste l\u00c3\u00a4kning: {0}
|
||||||
|
timeBeforeTeleport=Tid f\u00c3\u00b6re n\u00c3\u00a4sta teleportering: {0}
|
||||||
|
timeFormat=\u00a73{0}\u00a7f eller \u00a73{1}\u00a7f eller \u00a73{2}\u00a7f
|
||||||
|
timePattern=(?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
|
||||||
|
timeSet=Tid inst\u00c3\u00a4lld i alla v\u00c3\u00a4rldar.
|
||||||
|
timeSetPermission=\u00a7cDu har inte tillst\u00c3\u00a5nd att st\u00c3\u00a4lla in tiden.
|
||||||
|
timeWorldCurrent=Den nuvarande tiden i {0} \u00c3\u00a4r \u00a73{1}
|
||||||
|
timeWorldSet=Tiden \u00c3\u00a4r nu {0} i: \u00a7c{1}
|
||||||
|
tps=Nuvarande TPS = {0}
|
||||||
|
tradeCompleted=\u00a77K\u00c3\u00b6p avslutat.
|
||||||
|
tradeSignEmpty=K\u00c3\u00b6pskylten har inget tillg\u00c3\u00a4ngligt f\u00c3\u00b6r dig.
|
||||||
|
tradeSignEmptyOwner=Det finns inget att fr\u00c3\u00a5n den h\u00c3\u00a4r k\u00c3\u00b6pskylten.
|
||||||
|
treeFailure=\u00a7cTr\u00c3\u00a4dgenereringn misslyckades. Prova igen p\u00c3\u00a5 gr\u00c3\u00a4s eller jord.
|
||||||
|
treeSpawned=\u00a77Tr\u00c3\u00a4d genererat.
|
||||||
|
true=sant
|
||||||
|
typeTpaccept=\u00a77F\u00c3\u00b6r att teleportera, skriv \u00a7c/tpaccept\u00a77.
|
||||||
|
typeTpdeny=\u00a77F\u00c3\u00b6r att neka denna f\u00c3\u00b6rfr\u00c3\u00a5gan, skriv \u00a7c/tpdeny\u00a77.
|
||||||
|
typeWorldName=\u00a77Du kan ocks\u00c3\u00a5 skriva namnet av en specifik v\u00c3\u00a4rld.
|
||||||
|
unableToSpawnMob=Kunde inte spawna moben.
|
||||||
|
unbannedIP=Tog bort bannlysningen fr\u00c3\u00a5n IP-adress.
|
||||||
|
unbannedPlayer=Tog bort bannlysningen fr\u00c3\u00a5n spelaren.
|
||||||
|
unignorePlayer=Du ignorerar inte spelaren {0} l\u00c3\u00a4ngre.
|
||||||
|
unknownItemId=Ok\u00c3\u00a4nt objekt-ID: {0}
|
||||||
|
unknownItemInList=Ok\u00c3\u00a4nt objekt {0} i listan {1}.
|
||||||
|
unknownItemName=Ok\u00c3\u00a4nt objektnamn: {0}
|
||||||
|
unlimitedItemPermission=\u00a7cInget tillst\u00c3\u00a5nd f\u00c3\u00b6r obegr\u00c3\u00a4nsad tillg\u00c3\u00a5ng av {0}.
|
||||||
|
unlimitedItems=Obegr\u00c3\u00a4nsade objekt:
|
||||||
|
unmutedPlayer=Spelaren {0} \u00c3\u00a4r inte bannlyst l\u00c3\u00a4ngre.
|
||||||
|
unvanished=\u00a7aDu \u00c3\u00a4r synlig igen.
|
||||||
|
unvanishedReload=\u00a7cEn omladdning har tvingat dig att bli synlig.
|
||||||
|
upgradingFilesError=Fel vid uppgradering av filerna
|
||||||
|
userDoesNotExist=Anv\u00c3\u00a4ndaren {0} existerar inte.
|
||||||
|
userIsAway={0} \u00c3\u00a4r nu AFK
|
||||||
|
userIsNotAway={0} \u00c3\u00a4r inte l\u00c3\u00a4ngre AFK
|
||||||
|
userJailed=\u00a77Du har blivit f\u00c3\u00a4ngslad
|
||||||
|
userUsedPortal={0} anv\u00c3\u00a4nde en existerande utg\u00c3\u00a5ngsportal.
|
||||||
|
userdataMoveBackError=Kunde inte flytta userdata/{0}.tmp till userdata/{1}
|
||||||
|
userdataMoveError=Kunde inte flytta userdata/{0} till userdata/{1}.tmp
|
||||||
|
usingTempFolderForTesting=Anv\u00c3\u00a4nder tempor\u00c3\u00a4r mapp mapp f\u00c3\u00b6r testning:
|
||||||
|
vanished=\u00a7aDu \u00c3\u00a4r nu osynlig.
|
||||||
|
versionMismatch=Versionerna matchar inte! V\u00c3\u00a4nligen uppgradera {0} till samma version.
|
||||||
|
versionMismatchAll=Versionerna matchar inte! V\u00c3\u00a4nligen uppgradera alla Essentials jars till samma version.
|
||||||
|
voiceSilenced=\u00a77Din r\u00c3\u00b6st har tystats
|
||||||
|
warpDeleteError=Problem med att ta bort warp-filen.
|
||||||
|
warpListPermission=\u00a7cDu har inte tillst\u00c3\u00a5nd att lista warparna.
|
||||||
|
warpNotExist=Den warpen finns inte.
|
||||||
|
warpOverwrite=\u00a7cDu kan inte skriva \u00c3\u00b6ver den warpen.
|
||||||
|
warpSet=\u00a77Warpen {0} inst\u00c3\u00a4lld.
|
||||||
|
warpUsePermission=\u00a7cDU har inte tillst\u00c3\u00a5nd att anv\u00c3\u00a4nda den warpen.
|
||||||
|
warpingTo=\u00a77Warpar till {0}.
|
||||||
|
warps=Warpar: {0}
|
||||||
|
warpsCount=\u00a77Det finns {0} warpar. Visar sida {1} av {2}.
|
||||||
|
weatherStorm=\u00a77Du har st\u00c3\u00a4llt in v\u00c3\u00a4dret till storm i {0}
|
||||||
|
weatherStormFor=\u00a77Du har st\u00c3\u00a4llt in v\u00c3\u00a4dret till storm i {0} f\u00c3\u00b6r {1} sekunder
|
||||||
|
weatherSun=\u00a77Du har st\u00c3\u00a4llt in v\u00c3\u00a4dret till sol i {0}
|
||||||
|
weatherSunFor=\u00a77Du har st\u00c3\u00a4llt in v\u00c3\u00a4dret till sol i {0} f\u00c3\u00b6r {1} sekunder
|
||||||
|
whoisBanned=\u00a79 - Bannade spelare: {0}
|
||||||
|
whoisExp=\u00a79 - Erfarenhet: {0} (Niv\u00c3\u00a5 {1})
|
||||||
|
whoisGamemode=\u00a79 - Spell\u00c3\u00a4ge: {0}
|
||||||
|
whoisGeoLocation=\u00a79 - Plats: {0}
|
||||||
|
whoisGod=\u00a79 - Od\u00c3\u00b6dlighet: {0}
|
||||||
|
whoisHealth=\u00a79 - H\u00c3\u00a4lsa: {0}/20
|
||||||
|
whoisIPAddress=\u00a79 - IP-Adress: {0}
|
||||||
|
whoisIs={0} \u00c3\u00a4r {1}
|
||||||
|
whoisJail=\u00a79 - F\u00c3\u00a4ngelse: {0}
|
||||||
|
whoisLocation=\u00a79 - Plats: ({0}, {1}, {2}, {3})
|
||||||
|
whoisMoney=\u00a79 - Pengar: {0}
|
||||||
|
whoisOP=\u00a79 - Operat\u00c3\u00b6rer: {0}
|
||||||
|
whoisStatusAvailable=\u00a79 - Status: Tillg\u00c3\u00a4nglig
|
||||||
|
whoisStatusAway=\u00a79 - Status: \u00a7cBorta\u00a7f
|
||||||
|
worth=\u00a77Stapeln med {0} ({2} objekt) \u00c3\u00a4r v\u00c3\u00a4rd \u00a7c{1}\u00a77 ({3} styck)
|
||||||
|
worthMeta=\u00a77Stapeln med {0} av typ {1} ({3} objekt) \u00c3\u00a4r v\u00c3\u00a4rd \u00a7c{2}\u00a77 ({4} styck)
|
||||||
|
worthSet=V\u00c3\u00a4rdet inst\u00c3\u00a4llt
|
||||||
|
year=\u00c3\u00a5r
|
||||||
|
years=\u00c3\u00a5r
|
||||||
|
youAreHealed=\u00a77Du har blivit l\u00c3\u00a4kt.
|
||||||
|
youHaveNewMail=\u00a7cDu har {0} meddelanden!\u00a7f Skriv \u00a77/mail read\u00a7f f\u00c3\u00b6r att l\u00c3\u00a4sa dina meddelanden.
|
@ -117,7 +117,7 @@ commands:
|
|||||||
aliases: [efireball]
|
aliases: [efireball]
|
||||||
gamemode:
|
gamemode:
|
||||||
description: Change player gamemode.
|
description: Change player gamemode.
|
||||||
usage: /<command> [player]
|
usage: /<command> <survival|creative|adventure> [player]
|
||||||
aliases: [gm,creative,creativemode,egamemode,ecreative,ecreativemode,egm]
|
aliases: [gm,creative,creativemode,egamemode,ecreative,ecreativemode,egm]
|
||||||
getpos:
|
getpos:
|
||||||
description: Get your current coordinates or those of a player.
|
description: Get your current coordinates or those of a player.
|
||||||
@ -430,6 +430,10 @@ commands:
|
|||||||
description: Determine the username behind a nickname.
|
description: Determine the username behind a nickname.
|
||||||
usage: /<command> <nickname>
|
usage: /<command> <nickname>
|
||||||
aliases: [ewhois]
|
aliases: [ewhois]
|
||||||
|
workbench:
|
||||||
|
description: Opens up a workbench
|
||||||
|
usage: /<command>
|
||||||
|
aliases: [eworkbench,wb,ewb,wbench,ewbench]
|
||||||
world:
|
world:
|
||||||
description: Switch between worlds.
|
description: Switch between worlds.
|
||||||
usage: /<command> [world]
|
usage: /<command> [world]
|
||||||
|
@ -741,4 +741,16 @@ public class FakeServer implements Server
|
|||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPrimaryThread()
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMotd()
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsChat" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsChat -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -805,7 +1115,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -813,8 +1127,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -822,12 +1137,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -839,12 +1150,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -866,6 +1173,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -909,7 +1252,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -952,14 +1295,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -972,39 +1315,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1076,9 +1420,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=7c7f517b
|
nbproject/build-impl.xml.data.CRC32=7c7f517b
|
||||||
nbproject/build-impl.xml.script.CRC32=52184b61
|
nbproject/build-impl.xml.script.CRC32=9ec3d353
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -2,12 +2,13 @@ package com.earth2me.essentials.chat;
|
|||||||
|
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentSkipListMap;
|
import java.util.concurrent.ConcurrentSkipListMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ public class EssentialsChat extends JavaPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
chatListener = new ConcurrentSkipListMap<String, IEssentialsChatListener>();
|
chatListener = new ConcurrentSkipListMap<String, IEssentialsChatListener>();
|
||||||
final Map<PlayerChatEvent, ChatStore> chatStore = new HashMap<PlayerChatEvent, ChatStore>();
|
final Map<AsyncPlayerChatEvent, ChatStore> chatStore = Collections.synchronizedMap(new HashMap<AsyncPlayerChatEvent, ChatStore>());
|
||||||
|
|
||||||
|
|
||||||
final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener, chatStore);
|
final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener, chatStore);
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.Server;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
//TODO: Translate the local/spy tags
|
//TODO: Translate the local/spy tags
|
||||||
public abstract class EssentialsChatPlayer implements Listener
|
public abstract class EssentialsChatPlayer implements Listener
|
||||||
@ -21,12 +21,12 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
protected final static Logger logger = Logger.getLogger("Minecraft");
|
protected final static Logger logger = Logger.getLogger("Minecraft");
|
||||||
protected final transient Map<String, IEssentialsChatListener> listeners;
|
protected final transient Map<String, IEssentialsChatListener> listeners;
|
||||||
protected final transient Server server;
|
protected final transient Server server;
|
||||||
protected final transient Map<PlayerChatEvent, ChatStore> chatStorage;
|
protected final transient Map<AsyncPlayerChatEvent, ChatStore> chatStorage;
|
||||||
|
|
||||||
public EssentialsChatPlayer(final Server server,
|
public EssentialsChatPlayer(final Server server,
|
||||||
final IEssentials ess,
|
final IEssentials ess,
|
||||||
final Map<String, IEssentialsChatListener> listeners,
|
final Map<String, IEssentialsChatListener> listeners,
|
||||||
final Map<PlayerChatEvent, ChatStore> chatStorage)
|
final Map<AsyncPlayerChatEvent, ChatStore> chatStorage)
|
||||||
{
|
{
|
||||||
this.ess = ess;
|
this.ess = ess;
|
||||||
this.listeners = listeners;
|
this.listeners = listeners;
|
||||||
@ -34,21 +34,24 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
this.chatStorage = chatStorage;
|
this.chatStorage = chatStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAborted(final PlayerChatEvent event)
|
public boolean isAborted(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (IEssentialsChatListener listener : listeners.values())
|
synchronized (listeners)
|
||||||
{
|
{
|
||||||
if (listener.shouldHandleThisChat(event))
|
for (IEssentialsChatListener listener : listeners.values())
|
||||||
{
|
{
|
||||||
return true;
|
if (listener.shouldHandleThisChat(event))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -69,17 +72,17 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatStore getChatStore(final PlayerChatEvent event)
|
public ChatStore getChatStore(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
return chatStorage.get(event);
|
return chatStorage.get(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChatStore(final PlayerChatEvent event, final ChatStore chatStore)
|
public void setChatStore(final AsyncPlayerChatEvent event, final ChatStore chatStore)
|
||||||
{
|
{
|
||||||
chatStorage.put(event, chatStore);
|
chatStorage.put(event, chatStore);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatStore delChatStore(final PlayerChatEvent event)
|
public ChatStore delChatStore(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
return chatStorage.remove(event);
|
return chatStorage.remove(event);
|
||||||
}
|
}
|
||||||
@ -89,7 +92,7 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
charge.charge(user);
|
charge.charge(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean charge(final PlayerChatEvent event, final ChatStore chatStore)
|
protected boolean charge(final AsyncPlayerChatEvent event, final ChatStore chatStore)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -104,7 +107,7 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sendLocalChat(final PlayerChatEvent event, final ChatStore chatStore)
|
protected void sendLocalChat(final AsyncPlayerChatEvent event, final ChatStore chatStore)
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
final User sender = chatStore.getUser();
|
final User sender = chatStore.getUser();
|
||||||
@ -133,10 +136,13 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
{
|
{
|
||||||
abort = true;
|
abort = true;
|
||||||
}
|
}
|
||||||
final double delta = playerLoc.distanceSquared(loc);
|
else
|
||||||
if (delta > chatStore.getRadius())
|
|
||||||
{
|
{
|
||||||
abort = true;
|
final double delta = playerLoc.distanceSquared(loc);
|
||||||
|
if (delta > chatStore.getRadius())
|
||||||
|
{
|
||||||
|
abort = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (abort)
|
if (abort)
|
||||||
{
|
{
|
||||||
@ -152,9 +158,12 @@ public abstract class EssentialsChatPlayer implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage());
|
String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage());
|
||||||
for (IEssentialsChatListener listener : listeners.values())
|
synchronized (listeners)
|
||||||
{
|
{
|
||||||
message = listener.modifyMessage(event, onlinePlayer, message);
|
for (IEssentialsChatListener listener : listeners.values())
|
||||||
|
{
|
||||||
|
message = listener.modifyMessage(event, onlinePlayer, message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onlineUser.sendMessage(message);
|
onlineUser.sendMessage(message);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import java.util.Map;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
|
|
||||||
public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
|
public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
|
||||||
@ -13,14 +13,14 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
|
|||||||
public EssentialsChatPlayerListenerHighest(final Server server,
|
public EssentialsChatPlayerListenerHighest(final Server server,
|
||||||
final IEssentials ess,
|
final IEssentials ess,
|
||||||
final Map<String, IEssentialsChatListener> listeners,
|
final Map<String, IEssentialsChatListener> listeners,
|
||||||
final Map<PlayerChatEvent, ChatStore> chatStorage)
|
final Map<AsyncPlayerChatEvent, ChatStore> chatStorage)
|
||||||
{
|
{
|
||||||
super(server, ess, listeners, chatStorage);
|
super(server, ess, listeners, chatStorage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
final ChatStore chatStore = delChatStore(event);
|
final ChatStore chatStore = delChatStore(event);
|
||||||
if (isAborted(event))
|
if (isAborted(event))
|
||||||
|
@ -3,12 +3,13 @@ package com.earth2me.essentials.chat;
|
|||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
|
import java.text.MessageFormat;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
|
|
||||||
public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
|
public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
|
||||||
@ -16,14 +17,14 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
|
|||||||
public EssentialsChatPlayerListenerLowest(final Server server,
|
public EssentialsChatPlayerListenerLowest(final Server server,
|
||||||
final IEssentials ess,
|
final IEssentials ess,
|
||||||
final Map<String, IEssentialsChatListener> listeners,
|
final Map<String, IEssentialsChatListener> listeners,
|
||||||
final Map<PlayerChatEvent, ChatStore> chatStorage)
|
final Map<AsyncPlayerChatEvent, ChatStore> chatStorage)
|
||||||
{
|
{
|
||||||
super(server, ess, listeners, chatStorage);
|
super(server, ess, listeners, chatStorage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
if (isAborted(event))
|
if (isAborted(event))
|
||||||
{
|
{
|
||||||
@ -40,9 +41,13 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
|
|||||||
event.setMessage(Util.formatMessage(user, "essentials.chat", event.getMessage()));
|
event.setMessage(Util.formatMessage(user, "essentials.chat", event.getMessage()));
|
||||||
String group = user.getGroup();
|
String group = user.getGroup();
|
||||||
String world = user.getWorld().getName();
|
String world = user.getWorld().getName();
|
||||||
event.setFormat(ess.getSettings().getChatFormat(group).format(new Object[]
|
MessageFormat format = ess.getSettings().getChatFormat(group);
|
||||||
{
|
synchronized (format)
|
||||||
group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)
|
{
|
||||||
}));
|
event.setFormat(format.format(new Object[]
|
||||||
|
{
|
||||||
|
group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import java.util.Map;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
|
|
||||||
public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
|
public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
|
||||||
@ -16,14 +16,14 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
|
|||||||
public EssentialsChatPlayerListenerNormal(final Server server,
|
public EssentialsChatPlayerListenerNormal(final Server server,
|
||||||
final IEssentials ess,
|
final IEssentials ess,
|
||||||
final Map<String, IEssentialsChatListener> listeners,
|
final Map<String, IEssentialsChatListener> listeners,
|
||||||
final Map<PlayerChatEvent, ChatStore> chatStorage)
|
final Map<AsyncPlayerChatEvent, ChatStore> chatStorage)
|
||||||
{
|
{
|
||||||
super(server, ess, listeners, chatStorage);
|
super(server, ess, listeners, chatStorage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
if (isAborted(event))
|
if (isAborted(event))
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.earth2me.essentials.chat;
|
package com.earth2me.essentials.chat;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
|
|
||||||
public interface IEssentialsChatListener
|
public interface IEssentialsChatListener
|
||||||
{
|
{
|
||||||
boolean shouldHandleThisChat(PlayerChatEvent event);
|
boolean shouldHandleThisChat(AsyncPlayerChatEvent event);
|
||||||
|
|
||||||
String modifyMessage(PlayerChatEvent event, Player target, String message);
|
String modifyMessage(AsyncPlayerChatEvent event, Player target, String message);
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsGeoIP" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsGeoIP -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -805,7 +1115,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -813,8 +1127,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -822,12 +1137,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -839,12 +1150,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -866,6 +1173,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -909,7 +1252,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -952,14 +1295,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -972,39 +1315,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1076,9 +1420,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.1.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=cbf94f59
|
nbproject/build-impl.xml.data.CRC32=cbf94f59
|
||||||
nbproject/build-impl.xml.script.CRC32=db2bb7a7
|
nbproject/build-impl.xml.script.CRC32=af872325
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -45,7 +45,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IConf
|
|||||||
public void onPlayerJoin(PlayerJoinEvent event)
|
public void onPlayerJoin(PlayerJoinEvent event)
|
||||||
{
|
{
|
||||||
User u = ess.getUser(event.getPlayer());
|
User u = ess.getUser(event.getPlayer());
|
||||||
if (u.isAuthorized("essentials.geoip.hide"))
|
if (u.isAuthorized("essentials.geoip.hide") || event.getPlayer().getAddress() == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -156,6 +156,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -200,6 +201,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -332,11 +354,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -345,32 +408,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsGroupBridge" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsGroupBridge -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -402,10 +703,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -463,6 +767,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -479,6 +784,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -486,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -512,6 +819,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -557,7 +867,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -780,7 +1090,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -788,8 +1102,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -797,12 +1112,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -814,12 +1125,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -841,6 +1148,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -884,7 +1227,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -927,14 +1270,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -947,39 +1290,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1051,9 +1395,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=475c8f4d
|
nbproject/build-impl.xml.data.CRC32=475c8f4d
|
||||||
nbproject/build-impl.xml.script.CRC32=c7581402
|
nbproject/build-impl.xml.script.CRC32=09eb9643
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -156,6 +156,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -200,6 +201,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -332,11 +354,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -345,32 +408,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsGroupManager" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsGroupManager -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -402,10 +703,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -463,6 +767,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -479,6 +784,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -486,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -512,6 +819,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -557,7 +867,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -773,7 +1083,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -781,8 +1095,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -790,12 +1105,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -807,12 +1118,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -834,6 +1141,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -877,7 +1220,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -920,14 +1263,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -940,39 +1283,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1037,9 +1381,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=a6709b83
|
nbproject/build-impl.xml.data.CRC32=a6709b83
|
||||||
nbproject/build-impl.xml.script.CRC32=fe0fea25
|
nbproject/build-impl.xml.script.CRC32=3be9db7e
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -183,4 +183,13 @@ v 2.0:
|
|||||||
- Re-initialize the WorldsHolder on a reload, as un-registering and re-registering a new holder means all plugins have to check for the new service on every quiery.
|
- Re-initialize the WorldsHolder on a reload, as un-registering and re-registering a new holder means all plugins have to check for the new service on every quiery.
|
||||||
- Prevent null perms getting past the GlobalGroups loader.
|
- Prevent null perms getting past the GlobalGroups loader.
|
||||||
- Fix forgetting sub groups on a manload.
|
- Fix forgetting sub groups on a manload.
|
||||||
- Allow 'manucheckp' to notify when superperms reports false but it is really negated.
|
- Allow 'manucheckp' to notify when superperms reports false but it is really negated.
|
||||||
|
- Only output a Data update message if something has changed.
|
||||||
|
- Fix loading users with only numerals in their names to be seen as strings.
|
||||||
|
- Ignore any sub folders in the Worlds folder which start with a period (fix for storing data in svn respoitories).
|
||||||
|
- Throw a better error than 'null' when someone removes all groups from a yml.
|
||||||
|
- Stop force removing attachments and let Bukkit handle it's own mess.
|
||||||
|
- Change to our own Yaml parsing for globalgroups instead of using the YAMLConfiguration class in bukkit.
|
||||||
|
- Fix a cases sensitivity bug in world loading.
|
||||||
|
- Stop using the YamlConfiguration in bukkit for our config handling. We can now support periods in world names.
|
||||||
|
- Fix GlobalGroups not loading permission nodes.
|
@ -6,7 +6,7 @@
|
|||||||
# They can also be added as one of a users subgroups, but NOT as a primary group.
|
# They can also be added as one of a users subgroups, but NOT as a primary group.
|
||||||
# These collections are available to ALL group and user yml's.
|
# These collections are available to ALL group and user yml's.
|
||||||
#
|
#
|
||||||
# Add to and customize these groups to fit yoru needs.
|
# Add to and customize these groups to fit your needs.
|
||||||
|
|
||||||
groups:
|
groups:
|
||||||
|
|
||||||
@ -120,7 +120,9 @@ groups:
|
|||||||
- essentials.compass
|
- essentials.compass
|
||||||
- essentials.delhome
|
- essentials.delhome
|
||||||
- essentials.depth
|
- essentials.depth
|
||||||
|
- essentials.exp
|
||||||
- essentials.getpos
|
- essentials.getpos
|
||||||
|
- essentials.hat
|
||||||
- essentials.home
|
- essentials.home
|
||||||
- essentials.ignore
|
- essentials.ignore
|
||||||
- essentials.itemdb
|
- essentials.itemdb
|
||||||
@ -173,6 +175,7 @@ groups:
|
|||||||
- essentials.clearinventory
|
- essentials.clearinventory
|
||||||
- essentials.delwarp
|
- essentials.delwarp
|
||||||
- essentials.eco.loan
|
- essentials.eco.loan
|
||||||
|
- essentials.exp.others
|
||||||
- essentials.ext
|
- essentials.ext
|
||||||
- essentials.fly
|
- essentials.fly
|
||||||
- essentials.getpos
|
- essentials.getpos
|
||||||
@ -215,6 +218,8 @@ groups:
|
|||||||
- essentials.tptoggle
|
- essentials.tptoggle
|
||||||
- essentials.unban
|
- essentials.unban
|
||||||
- essentials.unbanip
|
- essentials.unbanip
|
||||||
|
- essentials.vanish
|
||||||
|
- essentials.warp.*
|
||||||
- essentials.weather
|
- essentials.weather
|
||||||
- essentials.whois
|
- essentials.whois
|
||||||
- essentials.world
|
- essentials.world
|
||||||
|
@ -5,22 +5,32 @@
|
|||||||
package org.anjocaido.groupmanager;
|
package org.anjocaido.groupmanager;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.anjocaido.groupmanager.utils.Tasks;
|
import org.anjocaido.groupmanager.utils.Tasks;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
|
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||||
|
import org.yaml.snakeyaml.reader.UnicodeReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author gabrielcouto
|
* @author gabrielcouto
|
||||||
*/
|
*/
|
||||||
public class GMConfiguration {
|
public class GMConfiguration {
|
||||||
|
|
||||||
|
private boolean opOverride;
|
||||||
|
private boolean toggleValidate;
|
||||||
|
private Integer saveInterval;
|
||||||
|
private Integer backupDuration;
|
||||||
|
private String loggerLevel;
|
||||||
|
private Map<String, Object> mirrorsMap;
|
||||||
|
|
||||||
|
|
||||||
private GroupManager plugin;
|
private GroupManager plugin;
|
||||||
private File configFile;
|
private Map<String, Object> GMconfig;
|
||||||
private YamlConfiguration GMconfig;
|
|
||||||
|
|
||||||
public GMConfiguration(GroupManager plugin) {
|
public GMConfiguration(GroupManager plugin) {
|
||||||
|
|
||||||
@ -28,12 +38,14 @@ public class GMConfiguration {
|
|||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void load() {
|
public void load() {
|
||||||
|
|
||||||
if (!plugin.getDataFolder().exists()) {
|
if (!plugin.getDataFolder().exists()) {
|
||||||
plugin.getDataFolder().mkdirs();
|
plugin.getDataFolder().mkdirs();
|
||||||
}
|
}
|
||||||
configFile = new File(plugin.getDataFolder(), "config.yml");
|
|
||||||
|
File configFile = new File(plugin.getDataFolder(), "config.yml");
|
||||||
|
|
||||||
if (!configFile.exists()) {
|
if (!configFile.exists()) {
|
||||||
try {
|
try {
|
||||||
@ -43,59 +55,94 @@ public class GMConfiguration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GMconfig = new YamlConfiguration();
|
Yaml configYAML = new Yaml(new SafeConstructor());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
GMconfig.load(configFile);
|
FileInputStream configInputStream = new FileInputStream(configFile);
|
||||||
|
GMconfig = (Map<String, Object>) configYAML.load(new UnicodeReader(configInputStream));
|
||||||
|
configInputStream.close();
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + configFile.getPath(), ex);
|
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + configFile.getPath(), ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read our config settings ands store them for reading later.
|
||||||
|
*/
|
||||||
|
Map<String, Object> config = getElement("config", getElement("settings", GMconfig));
|
||||||
|
|
||||||
|
opOverride = (Boolean) config.get("opOverrides");
|
||||||
|
toggleValidate = (Boolean) config.get("validate_toggle");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* data node for save/backup timers.
|
||||||
|
*/
|
||||||
|
Map<String, Object> save = getElement("save", getElement("data", getElement("settings", GMconfig)));
|
||||||
|
|
||||||
|
saveInterval = (Integer) save.get("minutes");
|
||||||
|
backupDuration = (Integer) save.get("hours");
|
||||||
|
|
||||||
|
loggerLevel = ((Map<String, String>) getElement("settings", GMconfig).get("logging")).get("level");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Store our mirrors map for parsing later.
|
||||||
|
*/
|
||||||
|
mirrorsMap = (Map<String, Object>) ((Map<String, Object>) GMconfig.get("settings")).get("mirrors");
|
||||||
|
|
||||||
// Setup defaults
|
// Setup defaults
|
||||||
adjustLoggerLevel();
|
adjustLoggerLevel();
|
||||||
plugin.setValidateOnlinePlayer(isToggleValidate());
|
plugin.setValidateOnlinePlayer(isToggleValidate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private Map<String, Object> getElement(String element, Map<String, Object> map) {
|
||||||
|
|
||||||
|
if (!map.containsKey(element)) {
|
||||||
|
throw new IllegalArgumentException("The config.yml has no '" + element + ".\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Map<String, Object>) map.get(element);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isOpOverride() {
|
public boolean isOpOverride() {
|
||||||
|
|
||||||
return GMconfig.getBoolean("settings.config.opOverrides", true);
|
return opOverride;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isToggleValidate() {
|
public boolean isToggleValidate() {
|
||||||
|
|
||||||
return GMconfig.getBoolean("settings.config.validate_toggle", true);
|
return toggleValidate;
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Object> getMirrorsMap() {
|
|
||||||
|
|
||||||
// Try to fetch the old mirror path first
|
|
||||||
if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) {
|
|
||||||
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
|
|
||||||
} else if (GMconfig.isConfigurationSection("settings.mirrors")) {
|
|
||||||
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getSaveInterval() {
|
public Integer getSaveInterval() {
|
||||||
|
|
||||||
return GMconfig.getInt("settings.data.save.minutes", 10);
|
return saveInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getBackupDuration() {
|
public Integer getBackupDuration() {
|
||||||
|
|
||||||
return GMconfig.getInt("settings.data.save.hours", 24);
|
return backupDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void adjustLoggerLevel() {
|
public void adjustLoggerLevel() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
GroupManager.logger.setLevel(Level.parse(GMconfig.getString("settings.logging.level", "INFO")));
|
GroupManager.logger.setLevel(Level.parse(loggerLevel));
|
||||||
return;
|
return;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupManager.logger.setLevel(Level.INFO);
|
GroupManager.logger.setLevel(Level.INFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getMirrorsMap() {
|
||||||
|
|
||||||
|
if (!mirrorsMap.isEmpty()) {
|
||||||
|
return mirrorsMap;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package org.anjocaido.groupmanager;
|
package org.anjocaido.groupmanager;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -20,9 +21,10 @@ import org.anjocaido.groupmanager.events.GroupManagerEventHandler;
|
|||||||
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
|
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
|
||||||
import org.anjocaido.groupmanager.utils.Tasks;
|
import org.anjocaido.groupmanager.utils.Tasks;
|
||||||
import org.bukkit.configuration.MemorySection;
|
import org.bukkit.configuration.MemorySection;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.yaml.snakeyaml.DumperOptions;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
|
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||||
|
import org.yaml.snakeyaml.reader.UnicodeReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ElgarL
|
* @author ElgarL
|
||||||
@ -31,7 +33,7 @@ import org.yaml.snakeyaml.Yaml;
|
|||||||
public class GlobalGroups {
|
public class GlobalGroups {
|
||||||
|
|
||||||
private GroupManager plugin;
|
private GroupManager plugin;
|
||||||
private YamlConfiguration GGroups;
|
//private Yaml GGroups;
|
||||||
|
|
||||||
private Map<String, Group> groups;
|
private Map<String, Group> groups;
|
||||||
|
|
||||||
@ -89,8 +91,9 @@ public class GlobalGroups {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void load() {
|
public void load() {
|
||||||
|
|
||||||
GGroups = new YamlConfiguration();
|
Yaml GGroupYAML = new Yaml(new SafeConstructor());
|
||||||
|
Map<String, Object> GGroups;
|
||||||
|
|
||||||
GroupManager.setLoaded(false);
|
GroupManager.setLoaded(false);
|
||||||
|
|
||||||
// READ globalGroups FILE
|
// READ globalGroups FILE
|
||||||
@ -106,8 +109,13 @@ public class GlobalGroups {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load the YAML file.
|
||||||
|
*/
|
||||||
try {
|
try {
|
||||||
GGroups.load(GlobalGroupsFile);
|
FileInputStream groupsInputStream = new FileInputStream(GlobalGroupsFile);
|
||||||
|
GGroups = (Map<String, Object>) GGroupYAML.load(new UnicodeReader(groupsInputStream));
|
||||||
|
groupsInputStream.close();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + GlobalGroupsFile.getPath(), ex);
|
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + GlobalGroupsFile.getPath(), ex);
|
||||||
}
|
}
|
||||||
@ -115,12 +123,12 @@ public class GlobalGroups {
|
|||||||
// Clear out old groups
|
// Clear out old groups
|
||||||
resetGlobalGroups();
|
resetGlobalGroups();
|
||||||
|
|
||||||
if (!GGroups.getKeys(false).isEmpty()) {
|
if (!GGroups.keySet().isEmpty()) {
|
||||||
// Read all global groups
|
// Read all global groups
|
||||||
Map<String, Object> allGroups = new HashMap<String, Object>();
|
Map<String, Object> allGroups = new HashMap<String, Object>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
allGroups = (Map<String, Object>) GGroups.getConfigurationSection("groups").getValues(false);
|
allGroups = (Map<String, Object>) GGroups.get("groups");
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// ex.printStackTrace();
|
// ex.printStackTrace();
|
||||||
throw new IllegalArgumentException("Your " + GlobalGroupsFile.getPath() + " file is invalid. See console for details.", ex);
|
throw new IllegalArgumentException("Your " + GlobalGroupsFile.getPath() + " file is invalid. See console for details.", ex);
|
||||||
@ -153,7 +161,7 @@ public class GlobalGroups {
|
|||||||
Object element;
|
Object element;
|
||||||
|
|
||||||
// Permission nodes
|
// Permission nodes
|
||||||
element = GGroups.get("groups." + groupName + ".permissions");
|
element = ((Map<String, Object>)allGroups.get(groupName)).get("permissions");
|
||||||
|
|
||||||
if (element != null)
|
if (element != null)
|
||||||
if (element instanceof List) {
|
if (element instanceof List) {
|
||||||
@ -172,7 +180,7 @@ public class GlobalGroups {
|
|||||||
throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);
|
throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);
|
||||||
|
|
||||||
// Info nodes
|
// Info nodes
|
||||||
element = GGroups.get("groups." + groupName + ".info");
|
element = ((Map<String, Object>)allGroups.get(groupName)).get("info");
|
||||||
|
|
||||||
if (element != null)
|
if (element != null)
|
||||||
if (element instanceof MemorySection) {
|
if (element instanceof MemorySection) {
|
||||||
|
@ -324,8 +324,8 @@ public class GroupManager extends JavaPlugin {
|
|||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
worldsHolder.saveChanges(false);
|
if (worldsHolder.saveChanges(false))
|
||||||
GroupManager.logger.log(Level.INFO, " Data files refreshed.");
|
GroupManager.logger.log(Level.INFO, " Data files refreshed.");
|
||||||
} catch (IllegalStateException ex) {
|
} catch (IllegalStateException ex) {
|
||||||
GroupManager.logger.log(Level.WARNING, ex.getMessage());
|
GroupManager.logger.log(Level.WARNING, ex.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -508,6 +508,10 @@ public class WorldDataHolder {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IllegalArgumentException("Your " + groupsFile.getPath() + " file is invalid. See console for details.", ex);
|
throw new IllegalArgumentException("Your " + groupsFile.getPath() + " file is invalid. See console for details.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (allGroupsNode == null) {
|
||||||
|
throw new IllegalArgumentException("You have no groups in " + groupsFile.getPath() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
Iterator<String> groupItr = allGroupsNode.keySet().iterator();
|
Iterator<String> groupItr = allGroupsNode.keySet().iterator();
|
||||||
String groupKey;
|
String groupKey;
|
||||||
@ -775,20 +779,26 @@ public class WorldDataHolder {
|
|||||||
|
|
||||||
Iterator<String> usersItr = allUsersNode.keySet().iterator();
|
Iterator<String> usersItr = allUsersNode.keySet().iterator();
|
||||||
String usersKey;
|
String usersKey;
|
||||||
|
Object node;
|
||||||
Integer userCount = 0;
|
Integer userCount = 0;
|
||||||
|
|
||||||
while (usersItr.hasNext()) {
|
while (usersItr.hasNext()) {
|
||||||
try {
|
try {
|
||||||
userCount++;
|
userCount++;
|
||||||
// Attempt to fetch the next user name.
|
// Attempt to fetch the next user name.
|
||||||
usersKey = usersItr.next();
|
node = usersItr.next();
|
||||||
|
if (node instanceof Integer)
|
||||||
|
usersKey = Integer.toString((Integer)node);
|
||||||
|
else
|
||||||
|
usersKey = node.toString();
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IllegalArgumentException("Invalid node type for user entry (" + userCount + ") in file: " + usersFile.getPath(), ex);
|
throw new IllegalArgumentException("Invalid node type for user entry (" + userCount + ") in file: " + usersFile.getPath(), ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> thisUserNode = null;
|
Map<String, Object> thisUserNode = null;
|
||||||
try {
|
try {
|
||||||
thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
thisUserNode = (Map<String, Object>) allUsersNode.get(node);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IllegalArgumentException("Bad format found for user: " + usersKey + " in file: " + usersFile.getPath());
|
throw new IllegalArgumentException("Bad format found for user: " + usersKey + " in file: " + usersFile.getPath());
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ import org.anjocaido.groupmanager.dataholder.OverloadedWorldHolder;
|
|||||||
import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler;
|
import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler;
|
||||||
import org.anjocaido.groupmanager.utils.Tasks;
|
import org.anjocaido.groupmanager.utils.Tasks;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.configuration.MemorySection;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,15 +96,19 @@ public class WorldsHolder {
|
|||||||
* Create the data files if they don't already exist,
|
* Create the data files if they don't already exist,
|
||||||
* and they are not mirrored.
|
* and they are not mirrored.
|
||||||
*/
|
*/
|
||||||
for (World world : plugin.getServer().getWorlds())
|
for (World world : plugin.getServer().getWorlds()){
|
||||||
if ((!worldsData.containsKey(world.getName().toLowerCase())) && ((!mirrorsGroup.containsKey(world.getName().toLowerCase())) || (!mirrorsUser.containsKey(world.getName().toLowerCase()))))
|
GroupManager.logger.log(Level.FINE, "Checking data for " + world.getName() + ".");
|
||||||
|
if ((!worldsData.containsKey(world.getName().toLowerCase())) && ((!mirrorsGroup.containsKey(world.getName().toLowerCase())) || (!mirrorsUser.containsKey(world.getName().toLowerCase())))) {
|
||||||
|
GroupManager.logger.log(Level.FINE, "Creating folders for " + world.getName() + ".");
|
||||||
setupWorldFolder(world.getName());
|
setupWorldFolder(world.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Loop over all folders within the worlds folder
|
* Loop over all folders within the worlds folder
|
||||||
* and attempt to load the world data
|
* and attempt to load the world data
|
||||||
*/
|
*/
|
||||||
for (File folder : worldsFolder.listFiles()) {
|
for (File folder : worldsFolder.listFiles()) {
|
||||||
if (folder.isDirectory()) {
|
if (folder.isDirectory() && !folder.getName().startsWith(".")) {
|
||||||
GroupManager.logger.info("World Found: " + folder.getName());
|
GroupManager.logger.info("World Found: " + folder.getName());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -164,12 +167,12 @@ public class WorldsHolder {
|
|||||||
} else
|
} else
|
||||||
GroupManager.logger.log(Level.WARNING, "Mirroring error with " + o.toString() + ". Recursive loop detected!");
|
GroupManager.logger.log(Level.WARNING, "Mirroring error with " + o.toString() + ". Recursive loop detected!");
|
||||||
}
|
}
|
||||||
} else if (mirrorsMap.get(source) instanceof MemorySection) {
|
} else if (mirrorsMap.get(source) instanceof Map) {
|
||||||
MemorySection subSection = (MemorySection) mirrorsMap.get(source);
|
Map subSection = (Map) mirrorsMap.get(source);
|
||||||
|
|
||||||
for (String key : subSection.getKeys(true)) {
|
for (Object key : subSection.keySet()) {
|
||||||
|
|
||||||
if (key.toLowerCase() != serverDefaultWorldName) {
|
if (((String)key).toLowerCase() != serverDefaultWorldName) {
|
||||||
|
|
||||||
if (subSection.get(key) instanceof ArrayList) {
|
if (subSection.get(key) instanceof ArrayList) {
|
||||||
ArrayList mirrorList = (ArrayList) subSection.get(key);
|
ArrayList mirrorList = (ArrayList) subSection.get(key);
|
||||||
@ -179,28 +182,32 @@ public class WorldsHolder {
|
|||||||
String type = o.toString().toLowerCase();
|
String type = o.toString().toLowerCase();
|
||||||
try {
|
try {
|
||||||
if (type.equals("groups"))
|
if (type.equals("groups"))
|
||||||
mirrorsGroup.remove(key.toLowerCase());
|
mirrorsGroup.remove(((String)key).toLowerCase());
|
||||||
|
|
||||||
if (type.equals("users"))
|
if (type.equals("users"))
|
||||||
mirrorsUser.remove(key.toLowerCase());
|
mirrorsUser.remove(((String)key).toLowerCase());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
if (type.equals("groups"))
|
if (type.equals("groups")) {
|
||||||
mirrorsGroup.put(key.toLowerCase(), getWorldData(source).getName());
|
mirrorsGroup.put(((String)key).toLowerCase(), getWorldData(source).getName());
|
||||||
|
GroupManager.logger.log(Level.FINE, "Adding groups mirror for " + key + ".");
|
||||||
|
}
|
||||||
|
|
||||||
if (type.equals("users"))
|
if (type.equals("users")) {
|
||||||
mirrorsUser.put(key.toLowerCase(), getWorldData(source).getName());
|
mirrorsUser.put(((String)key).toLowerCase(), getWorldData(source).getName());
|
||||||
|
GroupManager.logger.log(Level.FINE, "Adding users mirror for " + key + ".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track this world so we can create a datasource for it later
|
// Track this world so we can create a datasource for it later
|
||||||
mirroredWorlds.add(key);
|
mirroredWorlds.add((String)key);
|
||||||
|
|
||||||
} else
|
} else
|
||||||
GroupManager.logger.log(Level.WARNING, "Mirroring error with " + key + ". Recursive loop detected!");
|
GroupManager.logger.log(Level.WARNING, "Mirroring error with " + (String)key + ". Recursive loop detected!");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Unknown mirroring format for " + key);
|
throw new IllegalStateException("Unknown mirroring format for " + (String)key);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -210,6 +217,7 @@ public class WorldsHolder {
|
|||||||
// Create a datasource for any worlds not already loaded
|
// Create a datasource for any worlds not already loaded
|
||||||
for (String world : mirroredWorlds) {
|
for (String world : mirroredWorlds) {
|
||||||
if (!worldsData.containsKey(world.toLowerCase())) {
|
if (!worldsData.containsKey(world.toLowerCase())) {
|
||||||
|
GroupManager.logger.log(Level.FINE, "No data for " + world + ".");
|
||||||
setupWorldFolder(world);
|
setupWorldFolder(world);
|
||||||
loadWorld(world, true);
|
loadWorld(world, true);
|
||||||
}
|
}
|
||||||
@ -264,8 +272,9 @@ public class WorldsHolder {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void saveChanges(boolean overwrite) {
|
public boolean saveChanges(boolean overwrite) {
|
||||||
|
|
||||||
|
boolean changed = false;
|
||||||
ArrayList<WorldDataHolder> alreadyDone = new ArrayList<WorldDataHolder>();
|
ArrayList<WorldDataHolder> alreadyDone = new ArrayList<WorldDataHolder>();
|
||||||
Tasks.removeOldFiles(plugin, plugin.getBackupFolder());
|
Tasks.removeOldFiles(plugin, plugin.getBackupFolder());
|
||||||
|
|
||||||
@ -294,6 +303,7 @@ public class WorldsHolder {
|
|||||||
backupFile(w, true);
|
backupFile(w, true);
|
||||||
|
|
||||||
WorldDataHolder.writeGroups(w, w.getGroupsFile());
|
WorldDataHolder.writeGroups(w, w.getGroupsFile());
|
||||||
|
changed = true;
|
||||||
//w.removeGroupsChangedFlag();
|
//w.removeGroupsChangedFlag();
|
||||||
} else {
|
} else {
|
||||||
// Newer file found.
|
// Newer file found.
|
||||||
@ -307,6 +317,7 @@ public class WorldsHolder {
|
|||||||
// Backup Groups file
|
// Backup Groups file
|
||||||
backupFile(w, true);
|
backupFile(w, true);
|
||||||
w.reloadGroups();
|
w.reloadGroups();
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!mirrorsUser.containsKey(w.getName().toLowerCase()))
|
if (!mirrorsUser.containsKey(w.getName().toLowerCase()))
|
||||||
@ -316,6 +327,7 @@ public class WorldsHolder {
|
|||||||
backupFile(w, false);
|
backupFile(w, false);
|
||||||
|
|
||||||
WorldDataHolder.writeUsers(w, w.getUsersFile());
|
WorldDataHolder.writeUsers(w, w.getUsersFile());
|
||||||
|
changed = true;
|
||||||
//w.removeUsersChangedFlag();
|
//w.removeUsersChangedFlag();
|
||||||
} else {
|
} else {
|
||||||
// Newer file found.
|
// Newer file found.
|
||||||
@ -329,10 +341,12 @@ public class WorldsHolder {
|
|||||||
// Backup Users file
|
// Backup Users file
|
||||||
backupFile(w, false);
|
backupFile(w, false);
|
||||||
w.reloadUsers();
|
w.reloadUsers();
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
alreadyDone.add(w);
|
alreadyDone.add(w);
|
||||||
}
|
}
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -606,7 +620,7 @@ public class WorldsHolder {
|
|||||||
throw new IllegalArgumentException("Users file for world '" + worldName + "' doesnt exist: " + usersFile.getPath());
|
throw new IllegalArgumentException("Users file for world '" + worldName + "' doesnt exist: " + usersFile.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldDataHolder tempHolder = new WorldDataHolder(worldName);
|
WorldDataHolder tempHolder = new WorldDataHolder(worldNameLowered);
|
||||||
|
|
||||||
// Map the group object for any mirror
|
// Map the group object for any mirror
|
||||||
if (mirrorsGroup.containsKey(worldNameLowered))
|
if (mirrorsGroup.containsKey(worldNameLowered))
|
||||||
|
@ -920,6 +920,7 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
|
|||||||
Group now = stack.pop();
|
Group now = stack.pop();
|
||||||
PermissionCheckResult resultNow = checkGroupOnlyPermission(now, targetPermission);
|
PermissionCheckResult resultNow = checkGroupOnlyPermission(now, targetPermission);
|
||||||
if (!resultNow.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {
|
if (!resultNow.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {
|
||||||
|
resultNow.accessLevel = targetPermission;
|
||||||
return resultNow;
|
return resultNow;
|
||||||
}
|
}
|
||||||
for (String sonName : now.getInherits()) {
|
for (String sonName : now.getInherits()) {
|
||||||
|
@ -21,7 +21,6 @@ import java.lang.reflect.Field;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -40,7 +39,6 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerKickEvent;
|
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.server.PluginDisableEvent;
|
import org.bukkit.event.server.PluginDisableEvent;
|
||||||
import org.bukkit.event.server.PluginEnableEvent;
|
import org.bukkit.event.server.PluginEnableEvent;
|
||||||
@ -57,7 +55,7 @@ import org.bukkit.plugin.PluginManager;
|
|||||||
*/
|
*/
|
||||||
public class BukkitPermissions {
|
public class BukkitPermissions {
|
||||||
|
|
||||||
protected WeakHashMap<Player, PermissionAttachment> attachments = new WeakHashMap<Player, PermissionAttachment>();
|
protected WeakHashMap<String, PermissionAttachment> attachments = new WeakHashMap<String, PermissionAttachment>();
|
||||||
protected LinkedHashMap<String, Permission> registeredPermissions = new LinkedHashMap<String, Permission>();
|
protected LinkedHashMap<String, Permission> registeredPermissions = new LinkedHashMap<String, Permission>();
|
||||||
protected GroupManager plugin;
|
protected GroupManager plugin;
|
||||||
protected boolean dumpAllPermissions = true;
|
protected boolean dumpAllPermissions = true;
|
||||||
@ -146,19 +144,21 @@ public class BukkitPermissions {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String name = player.getName();
|
||||||
|
|
||||||
// Reset the User objects player reference.
|
// Reset the User objects player reference.
|
||||||
User user = plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getName());
|
User user = plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(name);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
user.updatePlayer(player);
|
user.updatePlayer(player);
|
||||||
|
|
||||||
PermissionAttachment attachment;
|
PermissionAttachment attachment;
|
||||||
|
|
||||||
// Find the players current attachment, or add a new one.
|
// Find the players current attachment, or add a new one.
|
||||||
if (this.attachments.containsKey(player)) {
|
if (this.attachments.containsKey(name)) {
|
||||||
attachment = this.attachments.get(player);
|
attachment = this.attachments.get(name);
|
||||||
} else {
|
} else {
|
||||||
attachment = player.addAttachment(plugin);
|
attachment = player.addAttachment(plugin);
|
||||||
this.attachments.put(player, attachment);
|
this.attachments.put(name, attachment);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world == null) {
|
if (world == null) {
|
||||||
@ -167,7 +167,7 @@ public class BukkitPermissions {
|
|||||||
|
|
||||||
// Add all permissions for this player (GM only)
|
// Add all permissions for this player (GM only)
|
||||||
// child nodes will be calculated by Bukkit.
|
// child nodes will be calculated by Bukkit.
|
||||||
List<String> playerPermArray = new ArrayList<String>(plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getAllPlayersPermissions(player.getName(), false));
|
List<String> playerPermArray = new ArrayList<String>(plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getAllPlayersPermissions(name, false));
|
||||||
LinkedHashMap<String, Boolean> newPerms = new LinkedHashMap<String, Boolean>();
|
LinkedHashMap<String, Boolean> newPerms = new LinkedHashMap<String, Boolean>();
|
||||||
|
|
||||||
// Sort the perm list by parent/child, so it will push to superperms correctly.
|
// Sort the perm list by parent/child, so it will push to superperms correctly.
|
||||||
@ -192,13 +192,15 @@ public class BukkitPermissions {
|
|||||||
// Then whack our map into there
|
// Then whack our map into there
|
||||||
orig.putAll(newPerms);
|
orig.putAll(newPerms);
|
||||||
// That's all folks!
|
// That's all folks!
|
||||||
//attachment.getPermissible().recalculatePermissions();
|
attachment.getPermissible().recalculatePermissions();
|
||||||
player.recalculatePermissions();
|
//player.recalculatePermissions();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GroupManager.logger.finest("Attachment updated for: " + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -212,26 +214,31 @@ public class BukkitPermissions {
|
|||||||
List<String> result = new ArrayList<String>();
|
List<String> result = new ArrayList<String>();
|
||||||
|
|
||||||
for (String key : permList) {
|
for (String key : permList) {
|
||||||
String a = key.charAt(0) == '-' ? key.substring(1) : key;
|
/*
|
||||||
Map<String, Boolean> allchildren = GroupManager.BukkitPermissions.getAllChildren(a, new HashSet<String>());
|
* Ignore stupid plugins which add empty permission nodes.
|
||||||
if (allchildren != null) {
|
*/
|
||||||
|
if (!key.isEmpty()) {
|
||||||
ListIterator<String> itr = result.listIterator();
|
String a = key.charAt(0) == '-' ? key.substring(1) : key;
|
||||||
|
Map<String, Boolean> allchildren = GroupManager.BukkitPermissions.getAllChildren(a, new HashSet<String>());
|
||||||
while (itr.hasNext()) {
|
if (allchildren != null) {
|
||||||
String node = (String) itr.next();
|
|
||||||
String b = node.charAt(0) == '-' ? node.substring(1) : node;
|
ListIterator<String> itr = result.listIterator();
|
||||||
|
|
||||||
// Insert the parent node before the child
|
while (itr.hasNext()) {
|
||||||
if (allchildren.containsKey(b)) {
|
String node = (String) itr.next();
|
||||||
itr.set(key);
|
String b = node.charAt(0) == '-' ? node.substring(1) : node;
|
||||||
itr.add(node);
|
|
||||||
break;
|
// Insert the parent node before the child
|
||||||
|
if (allchildren.containsKey(b)) {
|
||||||
|
itr.set(key);
|
||||||
|
itr.add(node);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!result.contains(key))
|
||||||
|
result.add(key);
|
||||||
}
|
}
|
||||||
if (!result.contains(key))
|
|
||||||
result.add(key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -373,19 +380,10 @@ public class BukkitPermissions {
|
|||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
*/
|
*/
|
||||||
private void removeAttachment(Player player) {
|
private void removeAttachment(String playerName) {
|
||||||
|
|
||||||
if (attachments.containsKey(player)) {
|
if (attachments.containsKey(playerName))
|
||||||
try {
|
attachments.remove(playerName);
|
||||||
player.removeAttachment(attachments.get(player));
|
|
||||||
} catch (IllegalArgumentException e) {
|
|
||||||
/*
|
|
||||||
* Failed to remove attachment
|
|
||||||
* This usually means Bukkit no longer knows of it.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
attachments.remove(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -393,19 +391,6 @@ public class BukkitPermissions {
|
|||||||
*/
|
*/
|
||||||
public void removeAllAttachments() {
|
public void removeAllAttachments() {
|
||||||
|
|
||||||
Iterator<Player> itr = attachments.keySet().iterator();
|
|
||||||
|
|
||||||
while (itr.hasNext()) {
|
|
||||||
Player player = itr.next();
|
|
||||||
try {
|
|
||||||
player.removeAttachment(attachments.get(player));
|
|
||||||
} catch (IllegalArgumentException e) {
|
|
||||||
/*
|
|
||||||
* Failed to remove attachment
|
|
||||||
* This usually means Bukkit no longer knows of it.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
attachments.clear();
|
attachments.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,13 +405,17 @@ public class BukkitPermissions {
|
|||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setPlayer_join(true);
|
setPlayer_join(true);
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
GroupManager.logger.finest("Player Join event: " + player.getName());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tidy up any lose ends
|
* Tidy up any lose ends
|
||||||
*/
|
*/
|
||||||
removeAttachment(player);
|
removeAttachment(player.getName());
|
||||||
|
|
||||||
// force GM to create the player if they are not already listed.
|
// force GM to create the player if they are not already listed.
|
||||||
if (plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getName()) != null) {
|
if (plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getName()) != null) {
|
||||||
@ -441,19 +430,11 @@ public class BukkitPermissions {
|
|||||||
|
|
||||||
updatePermissions(event.getPlayer(), event.getPlayer().getWorld().getName());
|
updatePermissions(event.getPlayer(), event.getPlayer().getWorld().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
/*
|
||||||
public void onPlayerKick(PlayerKickEvent event) {
|
* Trigger at highest so we tidy up last.
|
||||||
|
*/
|
||||||
Player player = event.getPlayer();
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
|
|
||||||
/*
|
|
||||||
* force remove any attachments as bukkit may not
|
|
||||||
*/
|
|
||||||
removeAttachment(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||||
|
|
||||||
if (!GroupManager.isLoaded())
|
if (!GroupManager.isLoaded())
|
||||||
@ -464,7 +445,7 @@ public class BukkitPermissions {
|
|||||||
/*
|
/*
|
||||||
* force remove any attachments as bukkit may not
|
* force remove any attachments as bukkit may not
|
||||||
*/
|
*/
|
||||||
removeAttachment(player);
|
removeAttachment(player.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,4 +469,4 @@ public class BukkitPermissions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsProtect" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsProtect -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -805,7 +1115,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -813,8 +1127,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -822,12 +1137,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -839,12 +1150,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -866,6 +1173,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -909,7 +1252,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -952,14 +1295,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -972,39 +1315,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1076,9 +1420,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.3.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=40644caa
|
nbproject/build-impl.xml.data.CRC32=40644caa
|
||||||
nbproject/build-impl.xml.script.CRC32=cdb3fc6f
|
nbproject/build-impl.xml.script.CRC32=eecff97a
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsSpawn" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsSpawn -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -805,7 +1115,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -813,8 +1127,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -822,12 +1137,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -839,12 +1150,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -866,6 +1173,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -909,7 +1252,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -952,14 +1295,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -972,39 +1315,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1076,9 +1420,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=e7b96939
|
nbproject/build-impl.xml.data.CRC32=e7b96939
|
||||||
nbproject/build-impl.xml.script.CRC32=f45f4172
|
nbproject/build-impl.xml.script.CRC32=731b5e85
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsUpdate" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsUpdate -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -798,7 +1108,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -806,8 +1120,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -815,12 +1130,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -832,12 +1143,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -859,6 +1166,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -902,7 +1245,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -945,14 +1288,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -965,39 +1308,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1062,9 +1406,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.1.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=fd4b98a9
|
nbproject/build-impl.xml.data.CRC32=fd4b98a9
|
||||||
nbproject/build-impl.xml.script.CRC32=94e69885
|
nbproject/build-impl.xml.script.CRC32=966cfa4e
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
@ -154,7 +154,7 @@ public class EssentialsHelp implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
if (event.getPlayer() == chatUser)
|
if (event.getPlayer() == chatUser)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ public class UpdateProcess implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
if (event.getPlayer() == currentPlayer)
|
if (event.getPlayer() == currentPlayer)
|
||||||
{
|
{
|
||||||
|
@ -12,9 +12,9 @@ is divided into following sections:
|
|||||||
- execution
|
- execution
|
||||||
- debugging
|
- debugging
|
||||||
- javadoc
|
- javadoc
|
||||||
- junit compilation
|
- test compilation
|
||||||
- junit execution
|
- test execution
|
||||||
- junit debugging
|
- test debugging
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="run.jvmargs" value=""/>
|
<property name="run.jvmargs" value=""/>
|
||||||
|
<property name="run.jvmargs.ide" value=""/>
|
||||||
<property name="javac.compilerargs" value=""/>
|
<property name="javac.compilerargs" value=""/>
|
||||||
<property name="work.dir" value="${basedir}"/>
|
<property name="work.dir" value="${basedir}"/>
|
||||||
<condition property="no.deps">
|
<condition property="no.deps">
|
||||||
@ -225,6 +226,27 @@ is divided into following sections:
|
|||||||
<property name="jar.index.metainf" value="${jar.index}"/>
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
||||||
<property name="copylibs.rebase" value="true"/>
|
<property name="copylibs.rebase" value="true"/>
|
||||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||||
|
<condition property="junit.available">
|
||||||
|
<or>
|
||||||
|
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
|
||||||
|
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
<condition property="testng.available">
|
||||||
|
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="junit+testng.available">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<istrue value="${testng.available}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="testng" property="testng.mode" value="mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="" property="testng.debug.mode" value="-mixed">
|
||||||
|
<istrue value="${junit+testng.available}"/>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-init">
|
<target name="-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
@ -357,11 +379,52 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target name="-init-macrodef-junit">
|
<target if="${junit.available}" name="-init-macrodef-junit-init">
|
||||||
|
<condition else="false" property="nb.junit.batch" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<not>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition else="false" property="nb.junit.single" value="true">
|
||||||
|
<and>
|
||||||
|
<istrue value="${junit.available}"/>
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
<attribute default="**" name="testincludes"/>
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
@ -370,32 +433,270 @@ is divided into following sections:
|
|||||||
<filename name="@{testincludes}"/>
|
<filename name="@{testincludes}"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<classpath>
|
|
||||||
<path path="${run.test.classpath}"/>
|
|
||||||
</classpath>
|
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
</syspropertyset>
|
</syspropertyset>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
||||||
<jvmarg value="-ea"/>
|
<jvmarg value="-ea"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<customize/>
|
||||||
</junit>
|
</junit>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
|
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
|
||||||
<target name="-profile-pre-init">
|
<target if="${testng.available}" name="-init-macrodef-testng">
|
||||||
|
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<union id="test.set">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</union>
|
||||||
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
||||||
|
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsXMPP" testname="TestNG tests" workingDir="${work.dir}">
|
||||||
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</propertyset>
|
||||||
|
<customize/>
|
||||||
|
</testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target name="-init-macrodef-test-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<echo>No tests executed.</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
|
||||||
|
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:testng>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
|
||||||
|
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||||
|
<filename name="@{testincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<jvmarg line="${debug-args-line}"/>
|
||||||
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||||
|
<customize/>
|
||||||
|
</junit>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
|
||||||
|
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<element implicit="true" name="customize" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize/>
|
||||||
|
</j2seproject3:junit-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target if="${testng.available}" name="-init-macrodef-testng-debug">
|
||||||
|
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
|
||||||
|
<isset property="test.method"/>
|
||||||
|
</condition>
|
||||||
|
<condition else="-suitename EssentialsXMPP -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
|
||||||
|
<matches pattern=".*\.xml" string="@{testClass}"/>
|
||||||
|
</condition>
|
||||||
|
<delete dir="${build.test.results.dir}" quiet="true"/>
|
||||||
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
|
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
|
||||||
|
<customize>
|
||||||
|
<customize2/>
|
||||||
|
<jvmarg value="-ea"/>
|
||||||
|
<arg line="${testng.debug.mode}"/>
|
||||||
|
<arg line="-d ${build.test.results.dir}"/>
|
||||||
|
<arg line="-listener org.testng.reporters.VerboseReporter"/>
|
||||||
|
<arg line="${testng.cmd.args}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
|
||||||
|
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<element implicit="true" name="customize2" optional="true"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2/>
|
||||||
|
</j2seproject3:testng-debug>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
|
||||||
|
<customize>
|
||||||
|
<classpath>
|
||||||
|
<path path="${run.test.classpath}"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||||
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
|
</customize>
|
||||||
|
</j2seproject3:test-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
|
||||||
|
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<attribute default="${includes}" name="includes"/>
|
||||||
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
|
<attribute default="**" name="testincludes"/>
|
||||||
|
<attribute default="" name="testmethods"/>
|
||||||
|
<attribute default="${main.class}" name="testClass"/>
|
||||||
|
<attribute default="" name="testMethod"/>
|
||||||
|
<sequential>
|
||||||
|
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
|
||||||
|
<customize2>
|
||||||
|
<syspropertyset>
|
||||||
|
<propertyref prefix="test-sys-prop."/>
|
||||||
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
|
</syspropertyset>
|
||||||
|
</customize2>
|
||||||
|
</j2seproject3:testng-debug-impl>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
|
<!--
|
||||||
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
|
-->
|
||||||
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-post-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
</target>
|
</target>
|
||||||
<target name="-profile-init-macrodef-profile">
|
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
|
||||||
<macrodef name="resolve">
|
<macrodef name="resolve">
|
||||||
<attribute name="name"/>
|
<attribute name="name"/>
|
||||||
<attribute name="value"/>
|
<attribute name="value"/>
|
||||||
@ -427,10 +728,13 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
|
||||||
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB7.2 profiling section
|
||||||
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
@ -488,6 +792,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -504,6 +809,7 @@ is divided into following sections:
|
|||||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="classname"/>
|
<attribute default="${main.class}" name="classname"/>
|
||||||
<attribute default="${run.classpath}" name="classpath"/>
|
<attribute default="${run.classpath}" name="classpath"/>
|
||||||
|
<attribute default="jvm" name="jvm"/>
|
||||||
<element name="customize" optional="true"/>
|
<element name="customize" optional="true"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||||
@ -511,6 +817,7 @@ is divided into following sections:
|
|||||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||||
<jvmarg line="${run.jvmargs}"/>
|
<jvmarg line="${run.jvmargs}"/>
|
||||||
|
<jvmarg line="${run.jvmargs.ide}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="@{classpath}"/>
|
<path path="@{classpath}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@ -537,6 +844,9 @@ is divided into following sections:
|
|||||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||||
<chainedmapper>
|
<chainedmapper>
|
||||||
<flattenmapper/>
|
<flattenmapper/>
|
||||||
|
<filtermapper>
|
||||||
|
<replacestring from=" " to="%20"/>
|
||||||
|
</filtermapper>
|
||||||
<globmapper from="*" to="lib/*"/>
|
<globmapper from="*" to="lib/*"/>
|
||||||
</chainedmapper>
|
</chainedmapper>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
@ -582,7 +892,7 @@ is divided into following sections:
|
|||||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||||
<property name="ap.cmd.line.internal" value=""/>
|
<property name="ap.cmd.line.internal" value=""/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
@ -805,7 +1115,11 @@ is divided into following sections:
|
|||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
|
<!--
|
||||||
|
pre NB7.2 profiler integration
|
||||||
|
-->
|
||||||
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -813,8 +1127,9 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile/>
|
<profile/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
|
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
|
||||||
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
|
||||||
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -822,12 +1137,8 @@ is divided into following sections:
|
|||||||
</nbprofiledirect>
|
</nbprofiledirect>
|
||||||
<profile classname="${profile.class}"/>
|
<profile classname="${profile.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
APPLET PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.classpath}"/>
|
<path path="${run.classpath}"/>
|
||||||
@ -839,12 +1150,8 @@ is divided into following sections:
|
|||||||
</customize>
|
</customize>
|
||||||
</profile>
|
</profile>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
|
||||||
=========================
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
TESTS PROFILING SECTION
|
|
||||||
=========================
|
|
||||||
-->
|
|
||||||
<target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
|
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path path="${run.test.classpath}"/>
|
<path path="${run.test.classpath}"/>
|
||||||
@ -866,6 +1173,42 @@ is divided into following sections:
|
|||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
<!--
|
||||||
|
end of pre NB72 profiling section
|
||||||
|
-->
|
||||||
|
<target if="netbeans.home" name="-profile-check">
|
||||||
|
<condition property="profiler.configured">
|
||||||
|
<or>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
||||||
|
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
|
||||||
|
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
|
||||||
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="test-single"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
|
||||||
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcal target="run-test-with-main"/>
|
||||||
|
</target>
|
||||||
|
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
|
||||||
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
|
<startprofiler/>
|
||||||
|
<antcall target="run-applet"/>
|
||||||
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
@ -909,7 +1252,7 @@ is divided into following sections:
|
|||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
JUNIT COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
@ -952,14 +1295,14 @@ is divided into following sections:
|
|||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
<j2seproject3:test testincludes="**/*Test.java"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
@ -972,39 +1315,40 @@ is divided into following sections:
|
|||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
|
||||||
|
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
|
||||||
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
|
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
|
||||||
|
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||||
|
</target>
|
||||||
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
JUNIT DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
<delete file="${test.report.file}"/>
|
</target>
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
|
||||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<customize>
|
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
|
||||||
<syspropertyset>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
||||||
</syspropertyset>
|
|
||||||
<arg value="${test.class}"/>
|
|
||||||
<arg value="showoutput=true"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
||||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
||||||
</customize>
|
|
||||||
</j2seproject3:debug>
|
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||||
|
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
|
||||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@ -1076,9 +1420,12 @@ is divided into following sections:
|
|||||||
<target name="-check-call-dep">
|
<target name="-check-call-dep">
|
||||||
<property file="${call.built.properties}" prefix="already.built."/>
|
<property file="${call.built.properties}" prefix="already.built."/>
|
||||||
<condition property="should.call.dep">
|
<condition property="should.call.dep">
|
||||||
<not>
|
<and>
|
||||||
<isset property="already.built.${call.subproject}"/>
|
<not>
|
||||||
</not>
|
<isset property="already.built.${call.subproject}"/>
|
||||||
|
</not>
|
||||||
|
<available file="${call.script}"/>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.42.1.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=1012a5dd
|
nbproject/build-impl.xml.data.CRC32=1012a5dd
|
||||||
nbproject/build-impl.xml.script.CRC32=8cccbe45
|
nbproject/build-impl.xml.script.CRC32=db083724
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
||||||
|
@ -2,10 +2,11 @@ package com.earth2me.essentials.xmpp;
|
|||||||
|
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
|
import java.util.List;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
@ -20,21 +21,21 @@ class EssentialsXMPPPlayerListener implements Listener
|
|||||||
this.ess = ess;
|
this.ess = ess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority= EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onPlayerJoin(final PlayerJoinEvent event)
|
public void onPlayerJoin(final PlayerJoinEvent event)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
sendMessageToSpyUsers("Player " + user.getDisplayName() + " joined the game");
|
sendMessageToSpyUsers("Player " + user.getDisplayName() + " joined the game");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority= EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onPlayerChat(final PlayerChatEvent event)
|
public void onPlayerChat(final AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
sendMessageToSpyUsers(String.format(event.getFormat(), user.getDisplayName(), event.getMessage()));
|
sendMessageToSpyUsers(String.format(event.getFormat(), user.getDisplayName(), event.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority= EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onPlayerQuit(final PlayerQuitEvent event)
|
public void onPlayerQuit(final PlayerQuitEvent event)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
@ -45,9 +46,13 @@ class EssentialsXMPPPlayerListener implements Listener
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for (String address : EssentialsXMPP.getInstance().getSpyUsers())
|
List<String> users = EssentialsXMPP.getInstance().getSpyUsers();
|
||||||
|
synchronized (users)
|
||||||
{
|
{
|
||||||
EssentialsXMPP.getInstance().sendMessage(address, message);
|
for (String address : users)
|
||||||
|
{
|
||||||
|
EssentialsXMPP.getInstance().sendMessage(address, message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -9,7 +9,7 @@ import java.util.*;
|
|||||||
public class UserManager implements IConf
|
public class UserManager implements IConf
|
||||||
{
|
{
|
||||||
private final transient EssentialsConf users;
|
private final transient EssentialsConf users;
|
||||||
private final transient List<String> spyusers = new ArrayList<String>();
|
private final transient List<String> spyusers = Collections.synchronizedList(new ArrayList<String>());
|
||||||
private final static String ADDRESS = "address";
|
private final static String ADDRESS = "address";
|
||||||
private final static String SPY = "spy";
|
private final static String SPY = "spy";
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
lib/bukkit.jar
BIN
lib/bukkit.jar
Binary file not shown.
Binary file not shown.
@ -1,5 +1,7 @@
|
|||||||
libs.CopyLibs.classpath=\
|
libs.CopyLibs.classpath=\
|
||||||
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
|
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
|
||||||
|
libs.CopyLibs.displayName=CopyLibs Task
|
||||||
|
libs.CopyLibs.prop-version=1.0
|
||||||
libs.junit_4.10.classpath=\
|
libs.junit_4.10.classpath=\
|
||||||
${base}/junit_4.10/junit-4.10.jar
|
${base}/junit_4.10/junit-4.10.jar
|
||||||
libs.junit_4.10.src=\
|
libs.junit_4.10.src=\
|
||||||
|
Loading…
Reference in New Issue
Block a user