/
maven.xml
73 lines (63 loc) · 2.42 KB
/
maven.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<project default="jar:jar" xmlns:j="jelly:core">
<preGoal name="xdoc:jelly-transform">
<attainGoal name="html2xdoc"/>
</preGoal>
<goal name="setclasspath">
<path id="test.classpath">
<pathelement path="${maven.build.dest}"/>
<pathelement path="target/classes"/>
<pathelement path="target/test-classes"/>
<path refid="maven.dependency.classpath"/>
</path>
</goal>
<postGoal name="test:compile">
<attainGoal name="setclasspath"/>
<attainGoal name="groovy:compile-tests"/>
</postGoal>
<goal name="asm:dump" prereqs="test:compile"
description="Dumps the ASM instructions to generate the given class using the name property">
<j:if test="${empty(name)}">
<j:set var="name" value="org.codehaus.groovy.classgen.DumpClass"/>
</j:if>
<echo>Dumping class $$name = ${name}</echo>
<java classname="org.objectweb.asm.util.DumpClassVisitor" fork="yes">
<classpath refid="test.classpath"/>
<arg value="${name}"/>
</java>
</goal>
<goal name="groovy:compile-tests"
description="Compiles the Groovy unit test cases">
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="test.classpath"/>
<groovyc destdir="${basedir}/target/test-classes" srcdir="${basedir}/src/test">
<classpath refid="test.classpath"/>
<include name="**/*.groovy"/>
<exclude name="**/notworking/*.groovy"/>
</groovyc>
</goal>
<goal name="groovy:make-install" prereqs="jar:jar">
<echo>${groovy.install.staging.dest}</echo>
<mkdir dir="${groovy.install.staging.dest}"/>
<mkdir dir="${groovy.install.staging.dest}/lib"/>
<mkdir dir="${groovy.install.staging.dest}/bin"/>
<mkdir dir="${groovy.install.staging.dest}/conf"/>
<j:forEach var="lib" items="${pom.artifacts}">
<copy file="${lib.path}" toDir="${groovy.install.staging.dest}/lib"/>
</j:forEach>
<copy file="${maven.build.dir}/${maven.final.name}.jar" toDir="${groovy.install.staging.dest}/lib"/>
<copy toDir="${groovy.install.staging.dest}/conf">
<fileset dir="${maven.src.dir}/conf">
<include name="*"/>
</fileset>
</copy>
<copy toDir="${groovy.install.staging.dest}/bin">
<fileset dir="${maven.src.dir}/bin">
<include name="*"/>
</fileset>
</copy>
<chmod perm="ugo+x">
<fileset dir="${groovy.install.staging.dest}/bin">
<include name="*"/>
</fileset>
</chmod>
</goal>
</project>