This repository has been archived by the owner on Oct 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
126 lines (117 loc) · 4.38 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
<?xml version="1.0"?>
<project name="thumbslug" default="why">
<property environment="env" />
<property name="ts-home" location="." />
<property name="script.dir" location="${ts-home}/buildconf/" />
<property name="src.main.dir" location="${ts-home}/src/main/java" />
<property name="res.main.dir" location="${ts-home}/src/main/resources" />
<property name="webapp.main.dir" location="${ts-home}/src/main/webapp" />
<property name="src.test.dir" location="${ts-home}/src/test/java" />
<property name="res.test.dir" location="${ts-home}/src/test/resources" />
<property name="webapp.test.dir" location="${ts-home}/src/test/webapp" />
<property name="target.dir" location="${ts-home}/target" />
<property name="lib.dir" location="${libdir}" />
<property name="pkgname" value="org.fedoraproject.thumbslug" />
<macrodef name="grepfromspec">
<attribute name="text" />
<attribute name="prop" />
<sequential>
<exec executable="${script.dir}/antgetvr" outputproperty="@{prop}">
<arg value="@{text}" />
</exec>
</sequential>
</macrodef>
<target name="why">
<echo message="This is for building in an rpm environment," />
<echo message="don't use otherwise. Please use buildr instead." />
</target>
<target name="setvr">
<grepfromspec text="Version:" prop="version" />
<grepfromspec text="Release:" prop="release" />
<property name="ts.jar"
value="${target.dir}/thumbslug.jar" />
</target>
<!--<target name="da_popo">
<mkdir dir="${target.dir}/generated-source" />
<apply executable="${script.dir}/antmsgfmt"
dest="${target.dir}/generated-source">
<arg value="org.fedoraproject.thumbslug.i18n.Messages" />
<arg value="${target.dir}/generated-source" />
<fileset dir="${ts-home}/po">
<include name="**/*.po" />
</fileset>
<mapper type="glob" from="*.po" to="*.class" />
</apply>
</target>-->
<target name="init" depends="setvr"/>
<target name="compile" depends="init">
<mkdir dir="${target.dir}/classes" />
<mkdir dir="${target.dir}/resources" />
<javac destdir="${target.dir}/classes"
optimize="off"
debug="on"
source="1.6"
target="1.6"
encoding="utf-8"
fork="yes">
<src>
<path location="${src.main.dir}" />
<path location="${res.main.dir}" />
</src>
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="${target.dir}/resources">
<fileset dir="${res.main.dir}" />
<filterset begintoken="$${" endtoken="}">
<filter token="version" value="${version}" />
<filter token="release" value="${release}" />
</filterset>
</copy>
</target>
<target name="package" depends="compile">
<jar destfile="${ts.jar}">
<fileset dir="${target.dir}/classes"/>
<fileset dir="${target.dir}/resources"/>
<manifest>
<attribute name="Implementation-Vendor" value="" />
<attribute name="Manifest-Version" value="1.0" />
<attribute name="Build-By" value="${env.USER}" />
<attribute name="Created-By" value="Buildr" />
<attribute name="Implementation-Version" value="" />
<attribute name="Implementation-Title" value="The Proxy project" />
<attribute name="Build-Jdk" value="" />
<attribute name="Main-Class" value="org.candlepin.thumbslug.Main" />
</manifest>
</jar>
<!--
<war destfile="${thumbslug.war}"
webxml="${webapp.main.dir}/WEB-INF/web.xml">
<fileset dir="${webapp.main.dir}">
<exclude name="${webapp.main.dir}/WEB-INF/web.xml" />
</fileset>
<classes dir="${target.dir}/classes" />
<classes dir="${target.dir}/resources">
<include name="**/*.properties" />
<include name="**/*.js" />
<include name="**/*.xml" />
</classes>
<classes dir="${target.dir}/generated-source" />
<lib dir="${lib.dir}">
<exclude name="**/emma*.jar" />
<exclude name="**/hamcrest*.jar" />
<exclude name="**/jmock*.jar" />
<exclude name="**/junit*.jar" />
<exclude name="**/mockito*.jar" />
<exclude name="**/schemaSpy*.jar" />
</lib>
</war>
-->
</target>
<target name="clean">
<delete dir="${target.dir}" quiet="true" />
</target>
</project>