forked from microsoft/mssql-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
106 lines (93 loc) · 3.77 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
<project name="sqljdbc" default="build" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
----- Building sqljdbc Project -----
</description>
<!-- set global properties for this build -->
<property name="artifactId" value="mssql-jdbc"/>
<property name="version" value="6.1.4"/>
<property name="src" location="src/main/java"/>
<property name="build" location="build"/>
<!-- download dependencies -->
<ivy:resolve>
<dependency org="com.microsoft.azure" name="azure-keyvault" rev="0.9.7"/>
<dependency org="junit" name="junit" rev="4.12"/>
<dependency org="org.junit.platform" name="junit-platform-console" rev="1.0.0-M3"/>
<dependency org="org.junit.platform" name="junit-platform-commons" rev="1.0.0-M3"/>
<dependency org="org.junit.platform" name="junit-platform-engine" rev="1.0.0-M3"/>
<dependency org="org.junit.platform" name="junit-platform-launcher" rev="1.0.0-M3"/>
<dependency org="org.junit.platform" name="junit-platform-runner" rev="1.0.0-M3"/>
<dependency org="org.junit.platform" name="junit-platform-surefire-provider" rev="1.0.0-M3"/>
<dependency org="org.junit.jupiter" name="junit-jupiter-api" rev="5.0.0-M3"/>
<dependency org="org.junit.jupiter" name="junit-jupiter-engine" rev="5.0.0-M3"/>
</ivy:resolve>
<!-- retrieves all the dependencies of the resolve call to lib directory -->
<ivy:retrieve />
<target name="init" >
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${build}/classes"/>
</target>
<target name="compile" depends="init"
description="compile the source">
<mkdir dir="${CLASSES_DST_DIR}"/>
<javac srcdir="${src}"
destdir="${CLASSES_DST_DIR}"
fork="yes"
deprecation="on"
encoding="UTF-8"
source="${JAVA_VERSION}"
target="${JAVA_VERSION}"
debug="true"
debuglevel="${DEBUG_LEVEL}"
excludes="${EXCLUDE_STUBS}" >
<classpath>
<fileset dir="lib"/>
</classpath>
</javac>
</target>
<target name="build41" description="generate the distribution">
<antcall target="compile">
<param name="CLASSES_DST_DIR" value="${build}/classes/jdbc41"/>
<param name="JAVA_VERSION" value="1.7"/>
<param name="DEBUG_LEVEL" value="source,lines"/>
<param name="EXCLUDE_STUBS" value="com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java"/>
</antcall>
<jar destfile="${build}/${artifactId}-${version}.jre7.jar">
<manifest>
<attribute name="Title" value="Microsoft JDBC Driver ${version} for SQL Server"/>
<attribute name="Version" value="${version}"/>
<attribute name="Vendor" value="Microsoft Corporation"/>
</manifest>
<fileset dir="${build}/classes/jdbc41"/>
<metainf dir="META-INF"/>
</jar>
</target>
<target name="build42" description="generate the distribution">
<antcall target="compile">
<param name="CLASSES_DST_DIR" value="${build}/classes/jdbc42"/>
<param name="JAVA_VERSION" value="1.8"/>
<param name="DEBUG_LEVEL" value="source,lines"/>
<param name="EXCLUDE_STUBS" value="com/microsoft/sqlserver/jdbc/SQLServerJdbc41.java"/>
</antcall>
<jar destfile="${build}/${artifactId}-${version}.jre8.jar">
<manifest>
<attribute name="Title" value="Microsoft JDBC Driver ${version} for SQL Server"/>
<attribute name="Version" value="${version}"/>
<attribute name="Vendor" value="Microsoft Corporation"/>
</manifest>
<fileset dir="${build}/classes/jdbc42"/>
<metainf dir="META-INF"/>
</jar>
</target>
<target name="build" description="generate the distribution">
<antcall target="clean"/>
<antcall target="build41"/>
<antcall target="build42"/>
</target>
<target name="clean"
description="clean up">
<delete dir="${build}"/>
</target>
</project>