annotate groovy-ant.xml @ 11:de6f3a495afd

Move groovy -do-test-run target into groovy script
author smith@nwoca.org
date Thu, 23 Dec 2010 15:51:35 -0500
parents 3c87d0aee1f9
children 3cb1ff0297a8
rev   line source
9
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
11
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
2 <project name="groovy-project-tasks" default="all" basedir="."
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
3 xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3">
9
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
4
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
5 <description>Ant tasks shared by Groovy based NetBeans projects.</description>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
6
11
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
7 <!-- Following targets need to be copied to the build.xml.
9
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
8 <target name="-javadoc-build" depends="groovydoc"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
9 <target name="-init-macrodef-junit" depends="-init-macrodef-junit-groovy"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
10 <target name="-pre-compile" depends="-groovy-init-macrodef-javac-groovyc"/>
11
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
11 end copy -->
9
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
12
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
13 <target depends="init" name="groovydoc">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
14 <taskdef name="groovydoc"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
15 classname="org.codehaus.groovy.ant.Groovydoc"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
16 classpath="${javac.classpath}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
17 <mkdir dir="${dist.javadoc.dir}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
18 <groovydoc
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
19 destdir="${dist.javadoc.dir}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
20 sourcepath="${src.dir}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
21 windowtitle="${javadoc.windowtitle}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
22 use="${javadoc.use}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
23 private="${javadoc.private}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
24 author="${javadoc.author}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
25 doctitle="${javadoc.windowtitle}">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
26 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/javase/6/docs/api/"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
27 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
28 <link packages="org.junit.,junit.framework." href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
29 <link packages="groovy.,org.codehaus.groovy." href="http://groovy.codehaus.org/api/"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
30 </groovydoc>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
31 </target>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
32
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
33 <target name="-init-macrodef-junit-groovy">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
34 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
35 <attribute default="${includes}" name="includes"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
36 <attribute default="${excludes}" name="excludes"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
37 <attribute default="**" name="testincludes"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
38 <sequential>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
39 <if>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
40 <isset property="java.agent.jar"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
41 <then>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
42 <property name="jvm.agent" value="-javaagent:${java.agent.jar}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
43 </then>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
44 <else>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
45 <property name="jvm.agent" value=""/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
46 </else>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
47 </if>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
48 <propertyregex input="@{includes}" property="testg.includes" regexp="\.groovy" replace=".class" defaultValue="@{includes}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
49 <junit dir="${work.dir}"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
50 errorproperty="tests.failed"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
51 failureproperty="tests.failed"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
52 fork="true"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
53 forkmode="once"
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
54 showoutput="true">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
55 <batchtest todir="${build.test.results.dir}">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
56 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes}" includes="${testg.includes}">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
57 <filename name="@{testincludes}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
58 </fileset>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
59 </batchtest>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
60 <classpath>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
61 <path path="${run.test.classpath}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
62 </classpath>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
63 <syspropertyset>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
64 <propertyref prefix="test-sys-prop."/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
65 <mapper from="test-sys-prop.*" to="*" type="glob"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
66 </syspropertyset>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
67 <formatter type="brief" usefile="false"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
68 <formatter type="xml"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
69 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
70 <jvmarg line="${run.jvmargs}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
71 <jvmarg line="${jvm.agent}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
72 </junit>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
73 </sequential>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
74 </macrodef>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
75 </target>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
76
11
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
77 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-groovy-do-test-run">
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
78 <property name="groovy.test.includes" value="**/*Test.*"/>
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
79 <j2seproject3:junit testincludes="${groovy.test.includes}"/>
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
80 </target>
de6f3a495afd Move groovy -do-test-run target into groovy script
smith@nwoca.org
parents: 10
diff changeset
81
9
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
82 <target name="-groovy-init-macrodef-javac-groovyc">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
83 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
84 <attribute name="srcdir" default="${src.dir}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
85 <attribute name="destdir" default="${build.classes.dir}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
86 <attribute name="classpath" default="${javac.classpath}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
87 <attribute name="includes" default="${includes}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
88 <attribute name="excludes" default="${excludes}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
89 <attribute name="debug" default="${javac.debug}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
90 <attribute name="sourcepath" default="${empty.dir}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
91 <attribute name="gensrcdir" default="${empty.dir}"/>
10
3c87d0aee1f9 TL-32: Modify for compatiblity with NB 6.9.1
smith@nwoca.org
parents: 9
diff changeset
92 <attribute default="" name="processorpath"/>
3c87d0aee1f9 TL-32: Modify for compatiblity with NB 6.9.1
smith@nwoca.org
parents: 9
diff changeset
93 <attribute default="" name="apgeneratedsrcdir"/>
9
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
94 <element name="customize" optional="true"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
95 <sequential>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
96 <taskdef name="groovyc" classpath="${javac.classpath}" classname="org.codehaus.groovy.ant.Groovyc"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
97 <property name="empty.dir" location="${build.dir}/empty"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
98 <mkdir dir="${empty.dir}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
99 <groovyc fork="true" srcdir="@{srcdir}" sourcepath="@{sourcepath}" destdir="@{destdir}" encoding="${source.encoding}" includes="@{includes}" excludes="@{excludes}" includeAntRuntime="false">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
100 <src>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
101 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
102 <include name="*"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
103 </dirset>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
104 </src>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
105 <classpath>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
106 <path path="@{classpath}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
107 </classpath>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
108 <javac debug="@{debug}" deprecation="${javac.deprecation}" encoding="${source.encoding}" source="${javac.source}" target="${javac.target}">
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
109 <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
110 <customize/>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
111 </javac>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
112 </groovyc>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
113 </sequential>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
114 </macrodef>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
115 </target>
ae7d512164d0 TL-32: Add groovy and and allow scripts to "required" a script to be imported separately.
smith@nwoca.org
parents:
diff changeset
116 </project>