-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
69 lines (58 loc) · 3.06 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
<project name="Cassandra-Jdbc" default="Compile" >
<property file="build.properties"/>
<!-- GET THE COMPLETE JAR BUNDLE FROM TAR BALL DOWNLOAD https://github.com/datastax/java-driver -->
<path id="cassandra.classpath">
<fileset id="lib" dir="driver/src/main/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<pathconvert property="cassandra.classpath.jar" refid="cassandra.classpath" pathsep=" ">
<map from="C:\work\cassandra-jdbc-driver\driver\src\main\lib\" to="./"/>
</pathconvert>
<target name="Compile" description="compile">
<!-- THE STARTDARD ANT TASK buildnumber DOES READ, THAN INCREMENT AND SAVE. THIS MAKE PROBLEMS WITH UPDATES -->
<propertyfile file="buildnum.properties">
<entry key="buildnum" type="int" default="0" operation="+" pattern="00"/>
</propertyfile>
<property file="buildnum.properties"/>
<echo message="------------------ Compile #${buildnum} -----------------"/>
<mkdir dir="target/classes"/>
<javac destdir="target/classes" debug="true" verbose="true" debuglevel="lines,source" deprecation="on" source="1.7" target="1.7" >
<classpath refid="cassandra.classpath" />
<src path="driver/src/main/java"/>
</javac>
<jar destfile="target/dist/cassandrajdbc${driver.version}.jar">
<fileset dir="target/classes" />
<fileset dir="driver/src/main/resources/jar"/>
<manifest>
<attribute name="Main-Class" value="com.wisecoders.dbs.Dbs"/>
<attribute name="Class-Path" value="${cassandra.classpath.jar}"/>
<attribute name="Specification-Version" value="${driver.version}"/>
<attribute name="Specification-Vendor" value="Wise Coders Technologies"/>
<attribute name="Implementation-Vendor-Id" value="dbschema.com"/>
<attribute name="Implementation-Vendor" value="Wise Coders Technologies"/>
<attribute name="Implementation-Version" value="${buildnum}"/>
</manifest>
</jar>
</target>
<target name="DeployLocal" depends="Compile">
<mkdir dir="${user.home}/.DbSchema/drivers/Cassandra"/>
<copy todir="${user.home}/.DbSchema/drivers/Cassandra">
<fileset file="target/dist/cassandrajdbc${driver.version}.jar"/>
<fileset dir="driver/src/main/lib/">
<include name="**/*"/>
</fileset>
</copy>
</target>
<target name="DeployWebSite" depends="Compile">
<delete file="target/dist/CassandraJdbcDriver.zip"/>
<zip destfile="target/dist/CassandraJdbcDriver.zip">
<zipfileset file="target/dist/cassandrajdbc${driver.version}.jar" />
<zipfileset dir="driver/src/main/lib/" prefix=""/>
</zip>
<scp todir="${dbs.deploy.url}" trust="true" sftp="true">
<!-- 'PASSIVE' FLAG HELPS TO GO EASIER THROUGH WINDOWS FIREWALL -->
<fileset file="target/dist/CassandraJdbcDriver.zip"/>
</scp>
</target>
</project>