-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.xml
128 lines (105 loc) · 4.3 KB
/
build.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<project name="Community File Repository" basedir="." default="jar"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
CFR convenience build
</description>
<property file="override.properties"
description="Properties customized for your development environment belong in this file. This file will never be checked into the SCM." />
<property file="build.properties"
description="Properties customized for your particular project belong in this file." />
<property name="projects.list" value="cfr-pentaho,cfr-pentaho5" description="directories of dependant projects"/>
<property name="core.project" value="cfr-core" description="the core project on which all depend"/>
<!-- just to steal install-antcontrib from subfloor -->
<property name="Implementation-Version" value="bogus"/>
<property name="Implementation-Title" value="cfr:bogus"/>
<import file="build-res/subfloor-pkg.xml" as="subfloor"/>
<!-- No project-specific stuff beyond this point! -->
<property name="all.projects" value="${core.project},${projects.list}"/>
<!--params: projects, target -->
<target name="call" depends="subfloor.install-antcontrib">
<for list="${projects}" param="proj">
<sequential>
<echo level="info">###############################</echo>
<echo level="info"> CALL ${target} on @{proj}</echo>
<echo level="info">###############################</echo>
<ant dir="@{proj}" antfile="build.xml" target="${target}" inheritAll="false"/>
<echo level="info">###############################</echo>
<echo level="info">FINISHED</echo>
<echo level="info">###############################</echo>
</sequential>
</for>
</target>
<target name="clean-all">
<antcall target="call">
<param name="target" value="clean-all"/>
<param name="projects" value="${all.projects}"/>
</antcall>
</target>
<target name="clean">
<antcall target="call">
<param name="target" value="clean"/>
<param name="projects" value="${all.projects}"/>
</antcall>
</target>
<target name="resolve">
<antcall target="call">
<param name="target" value="resolve"/>
<param name="projects" value="${all.projects}"/>
</antcall>
</target>
<target name="test">
<antcall target="call">
<param name="target" value="test"/>
<param name="projects" value="${all.projects}"/>
</antcall>
</target>
<target name="publish-local-core">
<ant dir="${core.project}" antfile="build.xml" target="resolve" inheritAll="false" />
<ant dir="${core.project}" antfile="build.xml" target="publish-local" inheritAll="false"/>
</target>
<target name="resolve-projects">
<antcall target="call">
<param name="target" value="resolve"/>
<param name="projects" value="${projects.list}"/>
</antcall>
</target>
<target name="publish">
<antcall target="call">
<param name="target" value="publish"/>
<param name="projects" value="${all.projects}"/>
</antcall>
</target>
<target name="dist" depends="publish-local-core, resolve-projects, subfloor.install-antcontrib">
<antcall target="call">
<param name="target" value="dist"/>
<param name="projects" value="${projects.list}"/>
</antcall>
<for list="${projects.list}" param="proj">
<sequential>
<mkdir dir="dist/@{proj}"/>
<copy todir='dist/@{proj}'>
<fileset dir='@{proj}/dist'/>
</copy>
</sequential>
</for>
</target>
<target name="build-core" >
<ant dir="${core.project}" antfile="build.xml" target="dist" inheritAll="false"/>
</target>
<target name="build-and-test-core" depends="build-core">
<ant dir="${core.project}" antfile="build.xml" target="test" inheritAll="false"/>
</target>
<target name="publish-local">
<antcall target="call">
<param name="target" value="publish-local"/>
<param name="projects" value="${all.projects}"/>
</antcall>
</target>
<target name="full-dist" depends="build-and-test-core,dist"/>
<target name="install-plugin" depends="publish-local-core, resolve-projects">
<antcall target="call">
<param name="target" value="install-plugin"/>
<param name="projects" value="${projects.list}"/>
</antcall>
</target>
</project>