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