-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
95 lines (74 loc) · 3.42 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="QualityAutomationFramework" xmlns:ivy="antlib:org.apache.ivy.ant">
<get src="https://raw.githubusercontent.com/qmetry/qaf-parent/master/common-build-tasks.xml" dest="../common-build-tasks.xml" skipexisting="true"/>
<property name="bin.dir" value="${basedir}/bin/src" />
<property name="bin.dir.test" value="${basedir}/bin/test" />
<property name="src.dir" value="${basedir}/src" />
<property name="test.dir" value="${basedir}/test" />
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="**/*.jar" />
</fileset>
</path>
<path id="test.classpath">
<path refid="build.classpath" />
<pathelement location="${bin.dir}" />
</path>
<target name="clean">
<delete dir="${bin.dir}" failonerror="false" />
<delete dir="${bin.dir.test}" failonerror="false" />
<delete dir="${dist.dir}" failonerror="false" />
</target>
<target depends="init, clean" name="compile">
<mkdir dir="${bin.dir}" />
<echo level="info">--- compile (start) ---</echo>
<javac debug="false" destdir="${bin.dir}" source="${source}" target="${target}">
<src path="${src.dir}" />
<classpath refid="build.classpath" />
</javac>
<echo level="info">--- compile (finished) ---</echo>
</target>
<target depends="compile" name="test-compile">
<mkdir dir="${bin.dir.test}" />
<echo level="info">--- test compile (start) ---</echo>
<javac debug="false" destdir="${bin.dir.test}" source="${source}" target="${target}">
<src path="${test.dir}" />
<classpath refid="test.classpath" />
</javac>
<echo level="info">---test compile (finished) ---</echo>
</target>
<target name="test" depends="test-compile">
<taskdef resource="testngtasks" classpathref="test.classpath" />
<testng classpathref="test.classpath" workingDir="${test.dir}" outputDir="${bin.dir.test}/test-results" haltOnFailure="false" verbose="2">
<classpath location="${bin.dir}" />
<classpath location="${bin.dir.test}" />
<classfileset dir="${bin.dir.test}" includes="**/*.class" />
<sysproperty key="log4j.configuration" value="file:///${test.dir}/log4j.properties" />
<sysproperty key="outputDir" value="test-results" />
</testng>
</target>
<!-- ================================= target: build ================================= -->
<target name="build" depends="make-jar, gendoc, gensource" description="build framework, generate docs">
</target>
<target name="make-jar" depends="clean, compile" description="build basic version">
<mkdir dir="${dist.dir}" />
<jar destfile="${dist.dir}/${ivy.module}.jar" basedir="${bin.dir}">
<metainf dir="." includes="LICENSE.txt" />
<metainf dir="." includes="${dist.dir}/pom.xml,${dist.dir}/pom.properties" />
<manifest>
<attribute name="Vendor" value="Infostretch Corp." />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="com.qmetry.qaf.automation.openapi.v3.CodeGeneratorCLI" />
<section name="Build-Info">
<attribute name="qaf-Build-Time" value="${build.timestamp}" />
<!-- Information about the program itself -->
<attribute name="qaf-Version" value="${version-num}" />
<attribute name="qaf-Revision" value="${build-num}" />
<attribute name="qaf-Type" value="support" />
</section>
</manifest>
</jar>
</target>
<import file="../common-build-tasks.xml" optional="false" />
</project>