-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
105 lines (87 loc) · 4.18 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="tomcat-util-cli" default="default">
<description>
A Command Line Interface for Tomcat, using JMX
</description>
<loadproperties srcFile="build.properties" />
<target name="default" depends="enjar" description="default build">
</target>
<target name="compile">
<delete dir="${build.dir.bin}" />
<mkdir dir="${build.dir.bin}"/>
<javac
srcdir="${build.dir.src}"
destdir="${build.dir.bin}"
debug="${compiler.debug}"
source="${compiler.src.version}"
target="${compiler.bin.version}">
</javac>
</target>
<target name="enjar" depends="compile">
<mkdir dir="${build.dir.dist}"/>
<jar destfile="${build.dir.dist}/${application.name}-v${application.version.major}.${application.version.minor}.jar">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="org.pidster.tomcat.util.cli.Console"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Pidster.org"/>
<attribute name="Implementation-Title" value="Apache Tomcat CLI"/>
<attribute name="Implementation-Version" value="${version} ${TODAY}"/>
<attribute name="Implementation-Vendor" value="Pidster.org"/>
</manifest>
<metainf dir="${resources.dir.meta}">
<include name="**" />
</metainf>
<fileset dir="${build.dir.bin}">
<include name="**"/>
</fileset>
<fileset dir="${build.dir.src}">
<exclude name="**.java"/>
</fileset>
</jar>
</target>
<target name="enjar-src">
<mkdir dir="${build.dir.dist}"/>
<jar destfile="${build.dir.dist}/${application.name}-v${application.version.major}.${application.version.minor}-src.jar">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="org.pidster.tomcat.util.cli.Console"/>
<attribute name="ISpecification-Title" value="${application.title}"/>
<attribute name="Specification-Version" value="${application.version.major}"/>
<attribute name="Specification-Vendor" value="Pidster.org"/>
<attribute name="Implementation-Title" value="${application.title}"/>
<attribute name="Implementation-Version" value="${application.version.major}.${application.version.minor} ${TODAY}"/>
<attribute name="Implementation-Vendor" value="Pidster.org"/>
</manifest>
<fileset dir="${build.dir.src}">
<include name="**.java"/>
</fileset>
</jar>
</target>
<target name="package" depends="enjar, enjar-src">
<delete file="${build.dir.dist}/${application.name}.sh" />
<copy file="${resources.dir.bin}/${application.name}-template.sh" toFile="${build.dir.dist}/${application.name}.sh" />
<replace file="${build.dir.dist}/${application.name}.sh" token="@appname" value="${application.name}-v${application.version.major}.${application.version.minor}"/>
<chmod perm="755" file="${build.dir.dist}/${application.name}.sh" />
</target>
<target name="docs">
<mkdir dir="${build.dir.docs}"/>
</target>
<target name="release" depends="package, docs" description="Build a release">
<mkdir dir="${build.dir.rel}"/>
<property name="release.tar" value="${application.name}-v${application.version.major}.${application.version.minor}.tar" />
<tar destfile="${build.dir.rel}/${release.tar}">
<tarfileset dir="${build.dir.dist}" filemode="755">
<include name="${application.name}.sh"/>
</tarfileset>
<tarfileset dir="${build.dir.dist}">
<exclude name="${application.name}.sh"/>
<exclude name=".*"/>
<include name="${application.name}*.jar"/>
</tarfileset>
</tar>
<gzip src="${build.dir.rel}/${application.name}-v${application.version.major}.${application.version.minor}.tar"
destfile="${build.dir.rel}/${application.name}-v${application.version.major}.${application.version.minor}.tar.gz" />
<delete file="${build.dir.rel}/${release.tar}" />
</target>
</project>