-
Notifications
You must be signed in to change notification settings - Fork 138
/
build.xml
188 lines (150 loc) · 7.84 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (c) 2019 Infostretch Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
For any inquiry or need additional information, please contact [email protected]
-->
<project basedir="." default="test" name="QMetryAutomationFramework" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:if="ant:if" xmlns:unless="ant:unless">
<available file="../common-build-tasks.xml" property="common-build-tasks.present"/>
<get src="https://raw.githubusercontent.com/qmetry/qaf-parent/master/common-build-tasks.xml" dest="../common-build-tasks.xml" unless:true="${common-build-tasks.present}" skipexisting="true"/>
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="**/*.jar" />
</fileset>
</path>
<!-- ================================= target: resolve needs to be removed from here================================= -->
<target name="resolve-remove" description="--> retrieve dependencies with ivy" depends="install-ivy, load-setting">
<ivy:resolve file="ivy.xml" />
<ivy:cachepath pathid="lib.path.id" />
<ivy:dependencytree />
<ivy:addpath topath="build.classpath">
<path refid="lib.path.id" />
</ivy:addpath>
<ivy:cachepath pathid="compile.path" conf="compile,provided" />
<ivy:cachepath pathid="test.path" conf="test,provided" />
</target>
<target name="compile" depends="init">
<taskdef classpathref="build.classpath" resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" />
<echo level="info">--- compile (start) ---</echo>
<iajc source="${source}" target="${target}" showweaveinfo="true" verbose="true" destdir="${bin.dir}" debug="false" encoding="utf-8">
<inpath location="${src.dir}">
</inpath>
<sourceroots>
<pathelement location="${src.dir}" />
</sourceroots>
<classpath refid="build.classpath">
</classpath>
</iajc>
<echo level="info">--- compile (finished) ---</echo>
</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}" />
<!-- All - core + testNG + step -->
<jar destfile="${dist.dir}/qaf.jar" basedir="${bin.dir}" excludes="**/test/**,**/step/CommonStep.*" includes="**/*.*">
<metainf dir="." includes="LICENSE.txt,NOTICE.txt" />
<manifest>
<attribute name="Vendor" value="Infostretch Corp." />
<attribute name="Built-By" value="${user.name}" />
<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="core" />
</section>
</manifest>
<metainf dir="${src.dir}" includes="**/aop.xml" />
<service type="org.testng.ITestNGListener">
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFAnnotationTransformer2" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFInvokedMethodListener2" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFMethodInterceptor" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFResultListener" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFSuiteListener" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFExecutionListener" />
</service>
</jar>
</target>
<target name="gendoc" depends="init" description="generate documentation">
<delete dir="${dist.dir}/docs" />
<mkdir dir="${dist.dir}/docs" />
<javadoc access="protected" additionalparam="-Xdoclint:none" sourcepath="${src.dir}" packagenames="com.qmetry.**.*" destdir="${dist.dir}/docs"
verbose="false" author="true" version="true" use="true" windowtitle="QMetry Automation Framework - ${version-num}.${build-num}"
overview="${basedir}/QAF-Overview.htm" encoding="utf-8">
<doctitle>
<![CDATA[<h1>QMetry Automation Framework - ${version-num}.${build-num}</h1>]]>
</doctitle>
<bottom>
<![CDATA[<i>Copyright © 2000 Infostretch Corp.</i>]]>
</bottom>
<classpath refid="build.classpath" />
<tag name="Todo" scope="all" description="To do:" />
<group title="qaf Properties" packages="com.qmetry.qaf.automation.keys*" />
<group title="qaf Web Driver" packages="com.qmetry.qaf.automation.ui.*" />
<group title="qaf Web Service" packages="com.qmetry.qaf.automation.ws.*" />
<group title="qaf Test-Step" packages="com.qmetry.qaf.automation.step.*" />
</javadoc>
<!--<zip destfile="${dist.dir}/qaf-javadoc.jar" basedir="${dist.dir}/docs">
</zip>-->
<jar compress="true" destfile="${dist.dir}/qaf-javadoc.jar" basedir="${dist.dir}/docs" />
<!-- <delete dir="${dist.dir}/docs">
</delete>-->
</target>
<target name="make-standalone-jar" depends="clean, compile" description="generate stand-alone jar">
<delete dir="dependencies" failonerror="false" />
<mkdir dir="dependencies" />
<!-- external libraries classpath, we don't need sources and javadoc -->
<ivy:retrieve pattern="dependencies/[artifact](-[classifier]).jar" conf="compile" />
<!--
<path id="build.classpath">
<fileset dir="${basedir}/">
<include name="${lib.dir}/*.jar" />
<exclude name="${lib.dir}/*sources.jar" />
<exclude name="${lib.dir}/*javadoc.jar" />
</fileset>
</path>
-->
<jar destfile="${dist.dir}/qaf-standalone.jar" basedir="${bin.dir}" excludes="**/test/**,**/step/CommonStep.*" includes="**/*.*" duplicate="preserve">
<zipgroupfileset dir="${lib.dir}" includes="*.jar" excludes="*sources.jar,*javadoc.jar" />
<zipgroupfileset dir="dependencies" includes="*.jar" excludes="*sources.jar,*javadoc.jar" />
<metainf dir="." includes="LICENSE.txt,NOTICE.txt" />
<manifest>
<attribute name="Vendor" value="Infostretch Corp." />
<attribute name="Built-By" value="${user.name}" />
<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="core" />
</section>
</manifest>
<metainf dir="${src.dir}" includes="**/aop.xml" />
<service type="org.testng.ITestNGListener">
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFAnnotationTransformer2" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFInvokedMethodListener2" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFMethodInterceptor" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFResultListener" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFSuiteListener" />
</service>
</jar>
</target>
<import file="../common-build-tasks.xml" optional="false"/>
</project>