svn-gvsig-desktop / trunk / binaries / ant / utilities.xml @ 13296
History | View | Annotate | Download (3.77 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"/> |
14 |
<property name="encoding" value="ISO_8859_1"/> |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
<!--
|
20 |
====================================
|
21 |
ant4eclipse library load
|
22 |
====================================
|
23 |
-->
|
24 |
<taskdef resource="net/sf/ant4eclipse/antlib.xml" > |
25 |
<classpath>
|
26 |
<pathelement location="${ant.file.ant_libs.dir}/ant4eclipse-0.5.0.rc1.jar"/> |
27 |
</classpath>
|
28 |
</taskdef>
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
<!--
|
34 |
====================================
|
35 |
ant-contrib library load
|
36 |
====================================
|
37 |
-->
|
38 |
<taskdef resource="net/sf/antcontrib/antlib.xml"> |
39 |
<classpath>
|
40 |
<pathelement location="${ant.file.ant_libs.dir}/ant-contrib-1.0b3.jar"/> |
41 |
<pathelement location="${ant.file.ant_libs.dir}/bcel-5.1.jar"/> |
42 |
<pathelement location="${ant.file.ant_libs.dir}/commons-httpclient-3.0.1.jar"/> |
43 |
<pathelement location="${ant.file.ant_libs.dir}/commons-logging-1.0.4.jar"/> |
44 |
<pathelement location="${ant.file.ant_libs.dir}/ivy-1.3.1.jar"/> |
45 |
</classpath>
|
46 |
</taskdef>
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
<!--
|
53 |
====================================
|
54 |
utilities tasks alias
|
55 |
====================================
|
56 |
-->
|
57 |
|
58 |
<!--
|
59 |
** loadEclipseClasspath Task **
|
60 |
|
61 |
Load the classpath from eclipse into the property 'eclipseClasspath'
|
62 |
of the project recived in 'project' attribute. 'project' must
|
63 |
be a directory of the workspace.
|
64 |
|
65 |
- Use 'property="otherProperty"' : for change the return property
|
66 |
|
67 |
Example:
|
68 |
|
69 |
|
70 |
<target name="compile" description="compile the source" >
|
71 |
<loadEclipseClasspath project="${basedir}>
|
72 |
<mkdir dir="${build}" />
|
73 |
<javac srcdir="${src}"
|
74 |
destdir="${build}"
|
75 |
source="${JavaSourceVersion}"
|
76 |
target="${JavaTargetVersion}"
|
77 |
debug="${debug}"
|
78 |
debuglevel="${debuglevel}"
|
79 |
classpath="${eclipseClasspath}"
|
80 |
encoding="${encoding}"/>
|
81 |
</target>
|
82 |
|
83 |
-->
|
84 |
<presetdef name="loadEclipseClasspath"> |
85 |
<getEclipseClasspath
|
86 |
property="eclipseClasspath" |
87 |
runtime="true"/> |
88 |
|
89 |
</presetdef>
|
90 |
|
91 |
<!--
|
92 |
** gvSIG-javac Task **
|
93 |
|
94 |
Javac whit default values to compile gvSIG proyects
|
95 |
|
96 |
Example (minimal syntax):
|
97 |
|
98 |
<gvSIG-javac
|
99 |
classpath="${eclipseClasspath}"
|
100 |
/>
|
101 |
|
102 |
Example with exclude:
|
103 |
|
104 |
<gvSIG-javac
|
105 |
classpath="${eclipseClasspath}"
|
106 |
exclude="org/gvsig/test/**"
|
107 |
/>
|
108 |
|
109 |
-->
|
110 |
<presetdef name="gvSIG-javac"> |
111 |
<javac srcdir="${src}" |
112 |
destdir="${build}" |
113 |
source="${JavaSourceVersion}" |
114 |
target="${JavaTargetVersion}" |
115 |
debug="${debug}" |
116 |
debuglevel="${debuglevel}" |
117 |
sourcepath="${eclipseClasspath}" |
118 |
encoding="${encoding}"> |
119 |
</javac>
|
120 |
</presetdef>
|
121 |
|
122 |
<!--
|
123 |
** gvSIG-javac Target **
|
124 |
|
125 |
Automate import of build.number gvSIG file
|
126 |
|
127 |
Example (minimal syntax):
|
128 |
|
129 |
<antcall target="gvSIG-import-build-number"/>
|
130 |
|
131 |
-->
|
132 |
|
133 |
<target name="gvSIG-import-build-number"> |
134 |
<!-- check buildNumberFile property -->
|
135 |
<if>
|
136 |
<not>
|
137 |
<and>
|
138 |
<isset property="buildNumberFile"/> |
139 |
<available file="${buildNumberFile}" type="file"/> |
140 |
</and>
|
141 |
</not>
|
142 |
<then>
|
143 |
<fail message="Error: property buildNumberFile not set or file not aviable: ${buildNumberFile}"/> |
144 |
</then>
|
145 |
</if>
|
146 |
<property name="localBuildNumberFile" value="${basedir}/build.number"/> |
147 |
<!-- copy the file if is needed-->
|
148 |
<if>
|
149 |
<not>
|
150 |
<and>
|
151 |
<available file="${localBuildNumberFile}" type="file"/> |
152 |
<filesmatch file1="${buildNumberFile}" file2="${localBuildNumberFile}"/> |
153 |
</and>
|
154 |
</not>
|
155 |
<then>
|
156 |
<copy file="${buildNumberFile}" tofile="${localBuildNumberFile}" overwrite="true"/> |
157 |
</then>
|
158 |
</if>
|
159 |
</target>
|
160 |
|
161 |
|
162 |
|
163 |
</project>
|