Statistics
| Revision:

root / branches / v2_0_0_prep / extensions / org.gvsig.hyperlink.app / org.gvsig.hyperlink.app.extension / target / org.gvsig.maven.base.tools / ant / utilities.xml @ 33402

History | View | Annotate | Download (4.23 KB)

1
<project name="ant_libs">
2
        <dirname file="${ant.file.ant_libs}" property="ant.file.ant_libs.dir"/>
3

    
4
        <!--
5
                ====================================
6
                Compilation base properties
7
                ====================================
8
        -->
9
        <property name="JUNIT_HOME" location="${ant.file.ant_libs.dir}" />
10
        <property name="JavaSourceVersion" value="1.5"/>
11
        <property name="JavaTargetVersion" value="1.5"/>
12
        <property name="debug" value="on"/>
13
        <property name="debuglevel" value="lines, vars, source"/>
14
        <property name="encoding" value="ISO_8859_1"/>
15
        <property name="workspaceDir" location="${ant.file.ant_libs.dir}/../.."/>
16
        <property name="workspace_loc" location="${workspaceDir}"/>
17
        <property name="binaries_loc" location="${workspace_loc}/binaries"/>
18
        <property name="dependencies_loc" location="${binaries_loc}/dependencies"/>
19
        <property name="lib_loc" location="${binaries_loc}/lib"/>
20
        <property name="unixOS" value="Linux,SunOS,Solaris,Mac OS X" />
21

    
22

    
23
        <!-- Macros to call the usual maven 2 goals from ant -->
24
        <macrodef name="mvn">
25
           <attribute name="arg" />
26
           <sequential>
27
                        <exec executable="${workspaceDir}/build/maven/bin/mvn" failonerror="true" os="${unixOS}">
28
                                <arg line="@{arg}"/>
29
                        </exec>
30
                        <exec executable="cmd" os="windows">
31
                            <arg value="/c"/>
32
                            <arg value="${workspaceDir}/build/maven/bin/mvn.bat"/>
33
                            <arg value="@{arg}"/>
34
                    </exec>
35
           </sequential>
36
        </macrodef>        
37
        
38
        <macrodef name="mvn-clean">
39
           <sequential>
40
                           <mvn arg="clean"/>
41
           </sequential>
42
        </macrodef>
43
        
44
        <macrodef name="mvn-compile">
45
           <sequential>
46
                           <mvn arg="compile"/>
47
           </sequential>
48
        </macrodef>
49

    
50
        <macrodef name="mvn-install">
51
           <attribute name="tofile" />
52
           <attribute name="mvnJarName"/>
53
           <attribute name="disable-tests" default="false" />
54
           <sequential>
55
                           <mvn arg="install"/>
56
                        <copy tofile="@{tofile}" file="target/@{mvnJarName}"/>
57
           </sequential>
58
        </macrodef>
59

    
60
        <macrodef name="mvn-install-no-tests">
61
           <attribute name="tofile" />
62
           <attribute name="mvnJarName"/>
63
           <attribute name="disable-tests" default="false" />
64
           <sequential>
65
                           <mvn arg="-Dmaven.test.skip=true install"/>
66
                        <copy tofile="@{tofile}" file="target/@{mvnJarName}"/>
67
           </sequential>
68
        </macrodef>
69
        
70
        <macrodef name="mvn-javadoc">
71
           <sequential>
72
                           <mvn arg="javadoc:javadoc"/>
73
           </sequential>
74
        </macrodef>
75

    
76

    
77
        <!-- Macros to call the usual cmake goals from ant -->
78
        <property name="target" value="target/target_cmake"/>
79
        <property name="cmakeExe" value="cmake"/>
80
        <property name="buildman.executable" location="${workspaceDir}/build/buildman/bin/bmn.py" />
81

    
82
        <macrodef name="cmake">
83
                <attribute name="install-dependencies" default="OFF"/>
84
                <attribute name="cmake-build-type" default="Release"/>
85
                <attribute name="args" default=""/>
86
           <sequential>
87
                        <mkdir dir="${target}" />
88
                        <delete file="${target}/CMakeCache.txt"/>
89
                <exec dir="${target}" executable="${cmakeExe}" failonerror="true" os="${unixOS}">
90
                    <arg value="-GUnix Makefiles" />
91
                    <arg value="-DCMAKE_BUILD_TYPE=@{cmake-build-type}" />
92
                    <arg value="-DINSTALL_DEPENDENCIES=@{install-dependencies}"/>
93
                    <arg line="@{args}"/>
94
                    <arg value="../../" />
95
                </exec>
96
                <exec dir="${target}" executable="${cmakeExe}" failonerror="true" osfamily="windows">
97
                    <arg value="-GNMake Makefiles" />
98
                    <arg value="-DCMAKE_BUILD_TYPE=@{cmake-build-type}" />
99
                    <arg value="-DINSTALL_DEPENDENCIES=@{install-dependencies}"/>
100
                    <arg line="@{args}"/>
101
                    <arg value="..\\..\\" />
102
                </exec>
103
                </sequential>
104
        </macrodef>        
105

    
106
        <macrodef name="make-install">
107
                <attribute name="numProc" default="2"/>
108
           <sequential>
109
                        <exec dir="${target}" executable="make" failonerror="true" os="${unixOS}">
110
                                <arg value="-j@{numProc}"/>
111
                                <arg value="install"/>
112
                        </exec>
113
                        <exec dir="${target}" executable="nmake" failonerror="true" osfamily="windows">
114
                                <arg value="install"/>
115
                        </exec>
116
                </sequential>
117
        </macrodef>
118
        <macrodef name="buildman">
119
                <attribute name="goal"/>
120
                <attribute name="args" default=""/>
121
                   <sequential>
122
                        <exec executable="python" failonerror="true" >
123
                                <arg value="${buildman.executable}" />
124
                                <arg value="@{goal}" />
125
                                <arg line="@{args}" />
126
                        </exec>
127
                </sequential>
128
        </macrodef>
129
</project>
130

    
131

    
132