-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (60 loc) · 2.96 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<project name="MyShop" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Import maven-build.xml into the current project -->
<!-- ====================================================================== -->
<import file="maven-build.xml" />
<!-- ====================================================================== -->
<!-- Help target -->
<!-- ====================================================================== -->
<property file="build.properties" />
<target name="help">
<echo message="Please run: $ant -projecthelp" />
</target>
<path id="dbclasspath" location="postgresql-42.2.11.jar">
</path>
<target name="drop">
<sql classpathref="dbclasspath" driver="${db.driver}" url="${db.url}" userid="${db.user}" password="${db.pw}" onerror="continue">
<transaction src="src/test/resources/drop.sql" />
</sql>
<sql classpathref="dbclasspath" driver="${db.driver}" url="${db.test_url}" userid="${db.user}" password="${db.pw}" onerror="continue">
<transaction src="src/test/resources/drop.sql" />
</sql>
</target>
<target name="create">
<sql classpathref="dbclasspath" driver="${db.driver}" url="${db.url}" userid="${db.user}" password="${db.pw}" onerror="continue">
<transaction src="src/test/resources/schema.sql" />
</sql>
<sql classpathref="dbclasspath" driver="${db.driver}" url="${db.test_url}" userid="${db.user}" password="${db.pw}" onerror="continue">
<transaction src="src/test/resources/schema.sql" />
</sql>
</target>
<target name="fill">
<sql classpathref="dbclasspath" driver="${db.driver}" url="${db.url}" userid="${db.user}" password="${db.pw}">
<transaction src="src/test/resources/data.sql" />
</sql>
<sql classpathref="dbclasspath" driver="${db.driver}" url="${db.test_url}" userid="${db.user}" password="${db.pw}">
<transaction src="src/test/resources/data.sql" />
</sql>
</target>
<taskdef name="testng" classname="org.testng.TestNGAntTask">
<classpath location="${maven.repo.local}/org/testng/testng/6.10/testng-6.10.jar" />
</taskdef>
<target name="test"
depends="compile-tests"
description="Run the TestNG test cases">
<mkdir dir="${maven.test.reports}"/>
<testng haltonfailure="true">
<sysproperty key="basedir" value="."/>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${maven.build.outputDir}"/>
<pathelement location="${maven.build.testOutputDir}"/>
</classpath>
<classfileset dir="${maven.build.testOutputDir}" includes="**/*Test*.class" />
</testng>
</target>
</project>