forked from pantsbuild/jmake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
import-defs.xml
71 lines (61 loc) · 2.26 KB
/
import-defs.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="import-defs" default="import">
<macrodef name="get-bundle">
<attribute name="name"/>
<attribute name="url"/>
<attribute name="bundle"/>
<sequential>
<mkdir dir="${bundle.dir}"/>
<delete file="${bundle.dir}/@{bundle}"/>
<get src="@{url}@{bundle}" dest="${bundle.dir}/@{bundle}"/>
<delete dir="${import.dir}/@{name}"/>
<mkdir dir="${import.dir}/@{name}"/>
</sequential>
</macrodef>
<macrodef name="unbundle-zip">
<attribute name="src"/>
<attribute name="dest"/>
<sequential>
<unzip src="@{src}" dest="@{dest}"/>
</sequential>
</macrodef>
<macrodef name="unbundle-targz">
<attribute name="src"/>
<attribute name="dest"/>
<sequential>
<untar src="@{src}" dest="@{dest}" compression="gzip"/>
</sequential>
</macrodef>
<macrodef name="file-check">
<attribute name="file"/>
<sequential>
<fail message="No @{file}">
<condition>
<not>
<available file="@{file}" type="file"/>
</not>
</condition>
</fail>
</sequential>
</macrodef>
<macrodef name="do-import-setup">
<attribute name="name"/>
<sequential>
<mkdir dir="${build.dir}/xml_generated"/>
<copy file="import-target-template.xml"
tofile="${build.dir}/xml_generated/import-@{name}.xml"/>
<replace file="${build.dir}/xml_generated/import-@{name}.xml"
token="@NAME@" value="@{name}"/>
<import file="${build.dir}/xml_generated/import-@{name}.xml"/>
</sequential>
</macrodef>
<do-import-setup name="junit"/>
<do-import-setup name="findbugs"/>
<do-import-setup name="pmd"/>
<target name="import" depends="import-junit, import-findbugs, import-pmd"
description="Import all items needed">
<!-- The findbugs tarball has executables we need that do
not have the execute bit flipped - fix that -->
<chmod file="${findbugs.file.reference}" perm="ugo+rx"/>
</target>
</project>