Mercurial > public > develkit
comparison groovy-ant.xml @ 63:5d200e63ba1a
USASR-644: update to compile groovy source for web projects
author | smith@nwoca.org |
---|---|
date | Wed, 12 Oct 2011 13:06:17 -0400 |
parents | 714576165aba |
children | 9dcb429eea14 |
comparison
equal
deleted
inserted
replaced
62:880f230dd947 | 63:5d200e63ba1a |
---|---|
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
2 <project name="groovy-project-tasks" default="all" basedir="." | 2 <project name="groovy-project-tasks" default="all" basedir="." |
3 xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3"> | 3 xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" |
4 xmlns:ssdtant="antlib:org.ssdt_ohio.tools.ant"> | |
4 | 5 |
5 <description>Ant tasks shared by Groovy based NetBeans projects.</description> | 6 <description>Ant tasks shared by Groovy based NetBeans projects.</description> |
6 | 7 |
7 <!-- Following targets need to be copied to the build.xml. | 8 <!-- Following targets need to be copied to the build.xml. |
8 <target name="-javadoc-build" depends="groovydoc"/> | 9 <target name="-javadoc-build" depends="groovydoc"/> |
9 <target name="-init-macrodef-junit" depends="-init-macrodef-junit-groovy"/> | 10 <target name="-init-macrodef-junit" depends="-init-macrodef-junit-groovy"/> |
10 <target name="-pre-compile" depends="-groovy-init-macrodef-javac-groovyc"/> | 11 <target name="-pre-compile" depends="-groovy-init-macrodef-javac-groovyc"/> |
11 <target name="-do-test-run" depends="init,compile-test,-pre-test-run,-groovy-do-test-run" if="have.tests" /> | 12 <target name="-do-test-run" depends="init,compile-test,-pre-test-run,-groovy-do-test-run" if="have.tests" /> |
12 end copy --> | 13 end copy --> |
13 | 14 |
15 <!-- <ssdtant:replace-target target="javadoc-build" with="groovydoc"/>--> | |
16 <ssdtant:replace-target target="-javadoc-build" with="groovydoc"/> | |
17 <ssdtant:replace-target target="-init-macrodef-junit" with="-init-macrodef-junit-groovy"/> | |
18 <ssdtant:replace-target target="-do-test-run" with="-groovy-do-test-run"/> | |
19 <ssdtant:replace-target target="-init-macrodef-javac" with="-groovy-init-macrodef-javac-groovyc"/> | |
20 | |
14 <target depends="init" name="groovydoc"> | 21 <target depends="init" name="groovydoc"> |
22 <echoproperties prefix="ivy"/> | |
15 <taskdef name="groovydoc" | 23 <taskdef name="groovydoc" |
16 classname="org.codehaus.groovy.ant.Groovydoc" | 24 classname="org.codehaus.groovy.ant.Groovydoc" |
17 classpath="${javac.classpath}"/> | 25 classpath="${run.classpath}"/> |
18 <mkdir dir="${dist.javadoc.dir}"/> | 26 <mkdir dir="${dist.javadoc.dir}"/> |
19 <groovydoc | 27 <groovydoc |
20 destdir="${dist.javadoc.dir}" | 28 destdir="${dist.javadoc.dir}" |
21 sourcepath="${src.dir}" | 29 sourcepath="${src.dir}" |
22 windowtitle="${javadoc.windowtitle}" | 30 windowtitle="${javadoc.windowtitle}" |
23 use="${javadoc.use}" | 31 use="${javadoc.use}" |
24 private="${javadoc.private}" | 32 private="${javadoc.private}" |
25 author="${javadoc.author}" | 33 author="${javadoc.author}" |
26 doctitle="${javadoc.windowtitle}"> | 34 doctitle="${javadoc.windowtitle}" > |
27 <link packages="java.,org.xml.,javax.,org.xml." href="http://java.sun.com/javase/6/docs/api/"/> | 35 <link packages="java.,org.xml.,javax.,org.xml." href="http://download.oracle.com/javase/6/docs/api/"/> |
28 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/> | 36 <link packages="org.apache.ant.,org.apache.tools.ant." href="http://www.dpml.net/api/ant/1.7.0"/> |
29 <link packages="org.junit.,junit.framework." href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/> | 37 <link packages="org.junit.,junit.framework." href="http://junit.sourceforge.net/junit3.8.1/javadoc/"/> |
30 <link packages="groovy.,org.codehaus.groovy." href="http://groovy.codehaus.org/api/"/> | 38 <link packages="groovy.,org.codehaus.groovy." href="http://groovy.codehaus.org/api/"/> |
31 </groovydoc> | 39 </groovydoc> |
32 </target> | 40 </target> |
35 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> | 43 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> |
36 <attribute default="${includes}" name="includes"/> | 44 <attribute default="${includes}" name="includes"/> |
37 <attribute default="${excludes}" name="excludes"/> | 45 <attribute default="${excludes}" name="excludes"/> |
38 <attribute default="**" name="testincludes"/> | 46 <attribute default="**" name="testincludes"/> |
39 <sequential> | 47 <sequential> |
48 <property name="work.dir" value="${basedir}"/> | |
40 <property name="jacoco.coverage.agent" value=""/> | 49 <property name="jacoco.coverage.agent" value=""/> |
50 <property name="run.jvmargs" value=""/> | |
51 <property name="j2ee.platform.classpath" value=""/> | |
41 <if> | 52 <if> |
42 <isset property="java.agent.jar"/> | 53 <isset property="java.agent.jar"/> |
43 <then> | 54 <then> |
44 <property name="jvm.agent" value="-javaagent:${java.agent.jar}"/> | 55 <property name="jvm.agent" value="-javaagent:${java.agent.jar}"/> |
45 </then> | 56 </then> |
58 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes}" includes="${testg.includes}"> | 69 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes}" includes="${testg.includes}"> |
59 <filename name="@{testincludes}"/> | 70 <filename name="@{testincludes}"/> |
60 </fileset> | 71 </fileset> |
61 </batchtest> | 72 </batchtest> |
62 <classpath> | 73 <classpath> |
63 <path path="${run.test.classpath}"/> | 74 <path path="${run.test.classpath}:${j2ee.platform.classpath}"/> |
64 </classpath> | 75 </classpath> |
65 <syspropertyset> | 76 <syspropertyset> |
66 <propertyref prefix="test-sys-prop."/> | 77 <propertyref prefix="test-sys-prop."/> |
67 <mapper from="test-sys-prop.*" to="*" type="glob"/> | 78 <mapper from="test-sys-prop.*" to="*" type="glob"/> |
68 </syspropertyset> | 79 </syspropertyset> |
93 <attribute name="gensrcdir" default="${empty.dir}"/> | 104 <attribute name="gensrcdir" default="${empty.dir}"/> |
94 <attribute default="" name="processorpath"/> | 105 <attribute default="" name="processorpath"/> |
95 <attribute default="" name="apgeneratedsrcdir"/> | 106 <attribute default="" name="apgeneratedsrcdir"/> |
96 <element name="customize" optional="true"/> | 107 <element name="customize" optional="true"/> |
97 <sequential> | 108 <sequential> |
109 <echo message="using groovyc joint compiler (jse)"/> | |
98 <taskdef name="groovyc" classpath="${javac.classpath}" classname="org.codehaus.groovy.ant.Groovyc"/> | 110 <taskdef name="groovyc" classpath="${javac.classpath}" classname="org.codehaus.groovy.ant.Groovyc"/> |
99 <property name="empty.dir" location="${build.dir}/empty"/> | 111 <property name="empty.dir" location="${build.dir}/empty"/> |
100 <mkdir dir="${empty.dir}"/> | 112 <mkdir dir="${empty.dir}"/> |
101 <groovyc fork="true" srcdir="@{srcdir}" sourcepath="@{sourcepath}" destdir="@{destdir}" encoding="${source.encoding}" includes="@{includes}" excludes="@{excludes}" includeAntRuntime="false"> | 113 <groovyc fork="true" srcdir="@{srcdir}" sourcepath="@{sourcepath}" destdir="@{destdir}" encoding="${source.encoding}" includes="@{includes}" excludes="@{excludes}" includeAntRuntime="false"> |
102 <src> | 114 <src> |
112 <customize/> | 124 <customize/> |
113 </javac> | 125 </javac> |
114 </groovyc> | 126 </groovyc> |
115 </sequential> | 127 </sequential> |
116 </macrodef> | 128 </macrodef> |
129 | |
130 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> | |
131 <attribute default="${src.dir}" name="srcdir"/> | |
132 <attribute default="${build.classes.dir}" name="destdir"/> | |
133 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> | |
134 <attribute default="${javac.processorpath}" name="processorpath"/> | |
135 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> | |
136 <attribute default="${includes}" name="includes"/> | |
137 <attribute default="${excludes}" name="excludes"/> | |
138 <attribute default="${javac.debug}" name="debug"/> | |
139 <attribute default="${empty.dir}" name="gensrcdir"/> | |
140 <element name="customize" optional="true"/> | |
141 <sequential> | |
142 <echo message="using groovyc joint compiler (web)"/> | |
143 <taskdef name="groovyc" classpath="${javac.classpath}" classname="org.codehaus.groovy.ant.Groovyc"/> | |
144 <property location="${build.dir}/empty" name="empty.dir"/> | |
145 <mkdir dir="${empty.dir}"/> | |
146 <groovyc fork="true" srcdir="@{srcdir}" sourcepath="@{sourcepath}" destdir="@{destdir}" encoding="${source.encoding}" includes="@{includes}" excludes="@{excludes}" includeAntRuntime="false"> | |
147 <src> | |
148 <dirset dir="@{gensrcdir}" erroronmissingdir="false"> | |
149 <include name="*"/> | |
150 </dirset> | |
151 </src> | |
152 <classpath> | |
153 <path path="@{classpath}"/> | |
154 </classpath> | |
155 <javac debug="@{debug}" deprecation="${javac.deprecation}" encoding="${source.encoding}" source="${javac.source}" target="${javac.target}"> | |
156 <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/> | |
157 <customize/> | |
158 </javac> | |
159 </groovyc> | |
160 | |
161 <!-- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}"> | |
162 <src> | |
163 <dirset dir="@{gensrcdir}" erroronmissingdir="false"> | |
164 <include name="*"/> | |
165 </dirset> | |
166 </src> | |
167 <classpath> | |
168 <path path="@{classpath}"/> | |
169 </classpath> | |
170 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> | |
171 <compilerarg line="${javac.compilerargs}"/> | |
172 <customize/> | |
173 </javac> | |
174 --> | |
175 </sequential> | |
176 </macrodef> | |
177 | |
178 | |
179 | |
117 </target> | 180 </target> |
118 </project> | 181 </project> |