-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
110 lines (95 loc) · 4.61 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2009 Igor Azarnyi, Denys Pavlov
~
~ 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.
-->
<project name="yes-cart" default="help" basedir=".">
<property environment="env"/>
<taskdef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${basedir}/env/setup/lib3rdparty/ant/cpptasks-1.0b5.jar"/>
<macrodef name="exec-mvn">
<attribute name="dir" default="."/>
<attribute name="arg"/>
<sequential>
<echo message="Running Maven with [-B @{arg}] in [@dir] ..."/>
<if>
<os family="windows"/>
<then>
<exec dir="@{dir}" executable="${env.M2_HOME}\bin\mvn.bat">
<arg line="-B @{arg}"/>
</exec>
</then>
<else>
<exec dir="@{dir}" executable="${env.M2_HOME}/bin/mvn">
<arg line="-B @{arg}"/>
</exec>
</else>
</if>
</sequential>
</macrodef>
<macrodef name="exec-ant">
<attribute name="dir" default="."/>
<attribute name="arg"/>
<sequential>
<echo message="Running Ant with [@{arg}] in [@dir] ..."/>
<if>
<os family="windows"/>
<then>
<exec dir="@{dir}" executable="${env.ANT_HOME}\bin\ant.bat">
<arg line="@{arg}"/>
</exec>
</then>
<else>
<exec dir="@{dir}" executable="${env.ANT_HOME}/bin/ant">
<arg line="@{arg}"/>
</exec>
</else>
</if>
</sequential>
</macrodef>
<target name="all" depends="update,setup,build" description="'All targets: update, setup, build'"/>
<target name="build" depends="init" description="'Build the project'">
<!-- TODO Fix to build the client by Maven -->
<exec-ant dir="./manager/client" arg="depl"/>
<exec-mvn arg="clean install"/>
</target>
<target name="setup" depends="init" description="'Setup development environment'">
<exec-mvn dir="{basedir}/env/setup/lib3rdparty/authorize.net"
arg="install:install-file -DgroupId=net.authorize -DartifactId=authorize-client -Dversion=1.4.2 -Dpackaging=jar -Dfile=anet-java-sdk-1.4.2.jar"/>
<exec-mvn dir="{basedir}/env/setup/lib3rdparty/cybersource"
arg="install:install-file -DgroupId=com.cybersource -DartifactId=cybersource-security -Dversion=1.5 -Dpackaging=jar -Dfile=cybssecurity.jar"/>
<exec-mvn dir="{basedir}/env/setup/lib3rdparty/cybersource"
arg="install:install-file -DgroupId=com.cybersource -DartifactId=cybersource-client -Dversion=1.5 -Dpackaging=jar -Dfile=cybsclients15.jar"/>
<exec-mvn dir="{basedir}/env/setup/lib3rdparty/payflow"
arg="install:install-file -DgroupId=paypal.payflow -DartifactId=payflow-client -Dversion=4.31 -Dpackaging=jar -Dfile=payflow.jar"/>
<exec-mvn dir="{basedir}/env/setup/lib3rdparty/paypal"
arg="install:install-file -DgroupId=com.paypal -DartifactId=paypal-client -Dversion=5.1.1 -Dpackaging=jar -Dfile=paypal_base.jar"/>
</target>
<target name="update" depends="init" description="'Update working copy'">
<exec executable="svn">
<arg line="up"/>
</exec>
</target>
<target name="help" depends="init">
<echo message="List of available targets:"/>
<exec-ant arg="-p"/>
</target>
<target name="init">
<echo message="user.name : ${user.name}"/>
<echo message="user.home : ${user.home}"/>
<echo message="env.ANT_HOME : ${env.ANT_HOME}"/>
<echo message="env.FLEX_HOME : ${env.FLEX_HOME}"/>
<echo message="env.JAVA_HOME : ${env.JAVA_HOME}"/>
<echo message="env.M2_HOME : ${env.M2_HOME}"/>
</target>
</project>