This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.xml
62 lines (55 loc) · 2.52 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="metrics_publish" default="jar" basedir=".">
<property name="srcdir" value="src/"/>
<property name="builddir" value="build"/>
<property name="libdir" value="lib"/>
<property name="distdir" location="dist"/>
<property name="version" value="2.0.1"/>
<property name="jarfile" value="${distdir}/metrics_publish-${version}.jar"/>
<property name="json-simple.jar" value="${libdir}/json-simple-1.1.1.jar"/>
<property name="logback-classic.jar" value="${libdir}/logback-classic-1.1.1.jar"/>
<property name="logback-core.jar" value="${libdir}/logback-core-1.1.1.jar"/>
<property name="slf4j-api.jar" value="${libdir}/slf4j-api-1.7.6.jar"/>
<path id="classpath">
<pathelement location="${json-simple.jar}"/>
<pathelement location="${logback-classic.jar}"/>
<pathelement location="${logback-core.jar}"/>
<pathelement location="${slf4j-api.jar}"/>
</path>
<target name="init" depends="clean">
<echo>Creating directory: ${builddir}</echo>
<mkdir dir="${builddir}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code -->
<echo>Building project...</echo>
<javac srcdir="${srcdir}" destdir="${builddir}" debug="true">
<classpath refid="classpath"/>
</javac>
<echo>Done.</echo>
</target>
<target name="clean">
<echo>Cleaning project...</echo>
<delete dir="${builddir}"/>
<delete file="${jarfile}"/>
<echo>Done.</echo>
</target>
<target name="jar" depends="compile" description="create a Jar file for the application">
<tstamp/>
<jar destfile="${jarfile}">
<manifest>
<attribute name="Specification-Title" value="Platform Metric Publish SDK"/>
<attribute name="Specification-Vendor" value="New Relic, Inc."/>
<attribute name="Implementation-Vendor" value="New Relic, Inc."/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Version" value="${version} ${TODAY}"/>
</manifest>
<fileset dir="${builddir}"/>
<zipfileset src="${json-simple.jar}"/>
<zipfileset src="${logback-classic.jar}"/>
<zipfileset src="${logback-core.jar}"/>
<zipfileset src="${slf4j-api.jar}"/>
</jar>
</target>
</project>