forked from qmetry/qaf-qmetry-updator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
102 lines (82 loc) · 4.56 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
QMetry Automation Framework provides a powerful and versatile platform to author
Automated Test Cases in Behavior Driven, Keyword Driven or Code Driven approach
Copyright 2016 Infostretch Corporation
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
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
You should have received a copy of the GNU General Public License along with this program in the name of LICENSE.txt in the root folder of the distribution. If not, see https://opensource.org/licenses/gpl-3.0.html
See the NOTICE.TXT file in root folder of this source files distribution
for additional information regarding copyright ownership and licenses
of other open source software / files used by QMetry Automation Framework.
For any inquiry or need additional information, please contact support-qaf@infostretch.com
-->
<project basedir="." default="build" name="SeleniumAutomationFramework" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- Sets the DSTAMP, TSTAMP, and TODAY properties in the current project -->
<tstamp>
<format property="build.timestamp" pattern="dd-MMM-yyyy HH:mm:ss" />
</tstamp>
<property file="build.properties" />
<path id="seleniumautomation.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="**/*.jar" />
</fileset>
</path>
<!-- IVY -->
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}" />
<!-- download Ivy from web site so that it can be used even without any
special installation -->
<echo message="installing ivy..." />
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true" />
</target>
<!-- ================================= target: install-ivy ================================= -->
<target name="install-ivy" depends="download-ivy" description="--> install ivy">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar" />
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
</target>
<!-- ================================= target: resolve ================================= -->
<target name="resolve" description="--> retrieve dependencies with ivy" depends="install-ivy">
<ivy:resolve file="ivy.xml" />
<ivy:cachepath pathid="lib.path.id" />
<ivy:addpath topath="seleniumautomation.classpath">
<path refid="lib.path.id" />
</ivy:addpath>
</target>
<!-- ================================= target: init ================================= -->
<target name="init" depends="resolve">
<mkdir dir="${bin.dir}" />
</target>
<!-- ================================= target: clean ================================= -->
<target name="clean">
<delete dir="${bin.dir}" failonerror="false" />
<delete dir="${dist.dir}" failonerror="false" />
</target>
<!-- ================================= target: compile ================================= -->
<target name="compile" depends="init">
<echo level="info">--- compile (start) ---</echo>
<javac srcdir="${src.dir}" destdir="${bin.dir}" classpathref="seleniumautomation.classpath" debug="false" source="${source}" target="${target}" />
<echo level="info">--- compile (finished) ---</echo>
</target>
<!-- ================================= target: build ================================= -->
<target name="build" depends="clean,compile" description="build jar">
<mkdir dir="${dist.dir}" />
<jar destfile="${dist.dir}/${dist.file.name}.jar" basedir="${bin.dir}">
<manifest>
<attribute name="Vendor" value="Infostretch Corp." />
<attribute name="Built-By" value="${user.name}" />
<section name="Build-Info">
<attribute name="Build-Time" value="${build.timestamp}" />
<attribute name="Version" value="${version-num}" />
<attribute name="Revision" value="${build-num}" />
</section>
</manifest>
</jar>
</target>
</project>