forked from ArticulatedSocialAgentsPlatform/hmibuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-Rebuilding.xml
More file actions
150 lines (123 loc) · 6 KB
/
build-Rebuilding.xml
File metadata and controls
150 lines (123 loc) · 6 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0" encoding="UTF-8"?>
<project name="Rebuilding"
xmlns:ac="antlib:net.sf.antcontrib" >
<description>Rebuilding, using local alpha versions</description>
<target name="help" description="Help for rebuilding">
<echo>
-- Rebuilding --
alpha: create an alpha jar file in the dist directory.
ca: get alpha version for projects from the rebuild.list, then build alpha
compilelist: recursive version of ca, rebuilding all projects on rebuild.list
</echo>
</target>
<target name="alpha" depends="init,createmanifest" description="produces an alpha jar version in the dist directory">
<delete dir="${dist.dir}"/>
<property name="mf.file" value="alpha-manifest.mf" />
<copy file="${manifest.file}" toFile="alpha-manifest.mf" overwrite="true"/>
<antcall target="-newmanifest"> <param name="new.type" value="alphaVersion"/> </antcall>
<antcall target="versioned.jar"> </antcall>
<delete file="alpha-manifest.mf" quiet="true"/>
</target>
<target name="-gba" >
<echo message=" ===================== Rebuild alpha for: ${module.name} ===================== " />
<antcall target="clean"/>
<antcall target="getalphas"/>
<antcall target="alpha"/>
</target>
<target name="ca" depends="init" description="get alphas, compile and build new alpha">
<antcall target="getalphas"/>
<antcall target="alpha"/>
</target>
<target name="getalphas" depends="init" description="Copy alpha versions for rebuild list">
<mkdir dir="${lib.dir}"/>
<ac:for param="projectdir" list="${rebuild.list}" trim="true" keepgoing="true">
<sequential>
<!--echo message="ctes param=@{projectdir}"/-->
<ac:if>
<available file="${shared.project.root}/@{projectdir}/dist" type="dir" />
<ac:then>
<!--echo message="ctes param=@{projectdir}/dist dir found"/-->
<ac:for param="distitem" >
<path>
<fileset dir="${shared.project.root}/@{projectdir}/dist">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<exclude name="**/*.xml"/>
</fileset>
</path>
<sequential>
<!--echo message="item: @{distitem}"/-->
<ac:propertyregex property="basename"
input="@{distitem}"
regexp=".*[\\/]"
replace=""
override="true"
/>
<!--echo message="basename: ${basename}"/-->
<ac:if>
<not>
<uptodate srcfile="@{distitem}" targetfile="${lib.dir}/${basename}"/>
</not>
<ac:then>
<ac:propertyregex property="unversionedprefix"
input="${basename}"
regexp="-[0-9].*"
replace=""
override="true"
/>
<delete>
<fileset dir="${lib.dir}" includes="${unversionedprefix}-*"/>
</delete>
<!--echo message="update ${basename}" level="info"/-->
<copy file="@{distitem}" todir="${lib.dir}" overwrite="false" preservelastmodified="true" verbose="true"/>
</ac:then>
</ac:if>
</sequential>
</ac:for>
</ac:then>
</ac:if>
</sequential>
</ac:for>
<!-- unzip all zips in lib.dir -->
<unzip dest="${lib.dir}">
<fileset dir="${lib.dir}/" includes="*.zip"/>
<patternset>
<include name="**/*.jar"/>
<include name="**/*.dll"/>
<include name="**/*.so"/>
<include name="**/*.jnilib"/>
<include name="**/*.py"/>
<include name="**/*.data"/>
</patternset>
</unzip>
</target>
<!--target name="rebuild" depends=" -init.rebuild.list" description="rebuild project including projects on the rebuild-list" >
<filelist id="rebuildList" dir="${shared.project.root}" files="${rebuild.list}" />
<echo message="REBUILD ${module.name}"/>
<property name="project.config" value="${default.project.config}"/>
<subant target="config" verbose="false" inheritall="false">
<property name="config" value="alpha"/>
<filelist refid="rebuildList"/>
</subant>
<subant target="rba" verbose="false" inheritall="false">
<filelist refid="rebuildList"/>
</subant>
</target-->
<target name="compilerebuildlist" depends="init" description="clean, getalphas, compile, and produce alpha jar, for all projects found on rebuild.list">
<echo message="REBUILDING ${module.name}"/>
<mkdir dir="${lib.dir}"/>
<ac:if>
<and>
<isset property="rebuild.list"/>
<not><equals arg1="${rebuild.list}" arg2="" /></not>
</and>
<ac:then>
<filelist id="rebuildList" dir="${shared.project.root}" files="${rebuild.list}" />
<delegate target="-gba" list="rebuildList" verbose="false"/>
</ac:then>
</ac:if>
</target>
<target name="compilelist" depends="compilerebuildlist" description="clean, getalphas, compile, and produce alpha jar, for all projects found on rebuild.list, then clean, getalphas, compile, and produce alpha jar for self">
<antcall target="-gba"/>
</target>
</project>