forked from gocd/gocd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ivy.ant.common.xml
111 lines (97 loc) · 4.59 KB
/
ivy.ant.common.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
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- *************************GO-LICENSE-START******************************
* Copyright 2014 ThoughtWorks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*************************GO-LICENSE-END******************************* -->
<project name="ivy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="module.dir" location="${basedir}"/>
<property name="ivy.local.default.root" location="${module.dir}/../localivy"/>
<property name="ivy.lib.dir" location="${module.dir}/lib"/>
<taskdef resource="emma_ant.properties">
<classpath>
<fileset dir="${ivy.local.default.root}" includes="**/emma*.jar"/>
</classpath>
</taskdef>
<taskdef name="dbdeploy" classname="net.sf.dbdeploy.AntTarget">
<classpath>
<fileset dir="${ivy.local.default.root}" includes="**/*.jar"/>
</classpath>
</taskdef>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant">
<classpath>
<pathelement location="${ivy.local.default.root}/_ivy.repository.setting/ivy-2.0.0-beta1.jar"/>
</classpath>
</taskdef>
<ivy:settings id="ivy.instance"
file="${ivy.local.default.root}/_ivy.repository.setting/ivy.repository.settings.xml"/>
<macrodef name="retrieve.dependencies">
<attribute name="module"/>
<attribute name="conf"/>
<attribute name="ivy.lib.dir" default="${basedir}/lib"/>
<attribute name="basedir" default="${basedir}"/>
<sequential>
<ivy:resolve file="@{basedir}/@{module}-dependencies.xml" conf="@{conf}" />
<delete quiet="true">
<fileset dir="@{ivy.lib.dir}" includes="*.jar"/>
</delete>
<!-- <ivy:cleancache /> <delete dir="${ivy.cache.dir}" quiet="true" /> -->
<echo message="Ivy lib dir: @{ivy.lib.dir}" />
<echo message="Base dir: ${basedir}" />
<ivy:retrieve conf="@{conf}" useorigin="true" pattern="@{ivy.lib.dir}/[artifact].[ext]"/>
</sequential>
</macrodef>
<macrodef name="checkstyle-macro">
<attribute name="reportsdir"/>
<attribute name="configfile"/>
<attribute name="failonviolation" default="true"/>
<attribute name="checkstylecache"/>
<attribute name="srcdir" default="src"/>
<attribute name="testdir" default="test"/>
<element name="nesteddef" implicit="true" optional="false"/>
<sequential>
<mkdir dir="@{reportsdir}"/>
<taskdef resource="checkstyletask.properties">
<classpath>
<fileset dir="${ivy.local.default.root}" includes="**/*.jar"/>
</classpath>
</taskdef>
<checkstyle config="@{configfile}" failOnViolation="@{failonviolation}">
<formatter type="plain"/>
<formatter type="xml" toFile="@{reportsdir}/checkstyle-log.xml"/>
<fileset dir="@{srcdir}" includes="**/*.java"/>
<fileset dir="@{testdir}" includes="**/*.java"/>
<property key="checkstyle.cache.file" file="@{checkstylecache}"/>
</checkstyle>
</sequential>
</macrodef>
<macrodef name="start.selenium.server">
<sequential>
<java jar="${ivy.local.default.root}/alltest/selenium-server.jar" fork="true" spawn="true">
<arg line="-timeout 30"/>
</java>
<waitfor maxwait="1" maxwaitunit="minute" checkevery="1" checkeveryunit="second">
<socket server="localhost" port="4444"/>
</waitfor>
</sequential>
</macrodef>
<macrodef name="stop.selenium.server">
<sequential>
<waitfor maxwait="20" maxwaitunit="second" checkevery="500">
<not>
<http url="http://localhost:4444/selenium-server/driver/?cmd=shutDown"/>
</not>
</waitfor>
</sequential>
</macrodef>
</project>