svn-gvsig-desktop / tags / v2_0_0_Build_2059 / build / ant-tasks / ant-tasks-config.xml @ 43469
History | View | Annotate | Download (6.18 KB)
1 | 29554 | cordinyana | <project name="gvSIG-ant-tasks-config" |
---|---|---|---|
2 | xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
||
3 | |||
4 | <description>
|
||
5 | Ant tasks and macros configuration to interact with maven and |
||
6 | subversion |
||
7 | </description>
|
||
8 | |||
9 | <dirname property="ant-tasks-config.basedir" |
||
10 | file="${ant.file.gvSIG-ant-tasks-config}" /> |
||
11 | |||
12 | <property name="workspace_loc" location="${ant-tasks-config.basedir}/../.." |
||
13 | description="Eclipse workspace location" /> |
||
14 | |||
15 | <property name="build.folder" location="${ant-tasks-config.basedir}/.." |
||
16 | description="Folder of the build project" /> |
||
17 | |||
18 | <property name="gvsiglogo" |
||
19 | location="${ant-tasks-config.basedir}/resources/gvSIG.png" /> |
||
20 | |||
21 | <property name="ant.libs.dir" location="${ant-tasks-config.basedir}" |
||
22 | description="Additional ant tasks libs folder" /> |
||
23 | |||
24 | <!-- ============================= -->
|
||
25 | <!-- External ant tasks definition -->
|
||
26 | <!-- ============================= -->
|
||
27 | |||
28 | <!-- Maven ant tasks registration -->
|
||
29 | <path id="maven-ant-tasks.classpath" |
||
30 | 35754 | cordinyana | path="${ant.libs.dir}/maven-ant-tasks-2.1.3.jar" /> |
31 | 29554 | cordinyana | <typedef resource="org/apache/maven/artifact/ant/antlib.xml" |
32 | uri="antlib:org.apache.maven.artifact.ant" |
||
33 | classpathref="maven-ant-tasks.classpath" /> |
||
34 | |||
35 | <!-- ant-contrib library load -->
|
||
36 | <taskdef resource="net/sf/antcontrib/antlib.xml"> |
||
37 | <classpath>
|
||
38 | <pathelement location="${ant.libs.dir}/ant-contrib-1.0b3.jar" /> |
||
39 | <pathelement location="${ant.libs.dir}/bcel-5.1.jar" /> |
||
40 | <pathelement location="${ant.libs.dir}/commons-httpclient-3.0.1.jar" /> |
||
41 | <pathelement location="${ant.libs.dir}/commons-logging-1.0.4.jar" /> |
||
42 | <pathelement location="${ant.libs.dir}/ivy-1.3.1.jar" /> |
||
43 | </classpath>
|
||
44 | </taskdef>
|
||
45 | |||
46 | 38932 | jjdelcerro | <typedef resource="com/googlecode/svntask/svntask.xml"> |
47 | <classpath>
|
||
48 | <fileset dir= "${ant.libs.dir}" > |
||
49 | <include name="svnkit-1.3.0.jar"/> |
||
50 | <include name="svntask-1.0.8.jar"/> |
||
51 | <include name="sqljet-1.1.1.jar"/> |
||
52 | <include name="antlr-runtime-3.4.jar"/> |
||
53 | <include name="sequence-library-1.0.2.jar"/> |
||
54 | |||
55 | </fileset>
|
||
56 | </classpath>
|
||
57 | </typedef>
|
||
58 | <taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" classpath="${ant.libs.dir}/antelopetasks-3.2.10.jar" /> |
||
59 | |||
60 | |||
61 | 29554 | cordinyana | <taskdef name="antform" classname="com.sardak.antform.AntForm"> |
62 | <classpath>
|
||
63 | <pathelement location="${ant.libs.dir}/antform-2.0.jar" /> |
||
64 | </classpath>
|
||
65 | </taskdef>
|
||
66 | |||
67 | <taskdef name="antmenu" classname="com.sardak.antform.AntMenu"> |
||
68 | <classpath>
|
||
69 | <pathelement location="${ant.libs.dir}/antform-2.0.jar" /> |
||
70 | </classpath>
|
||
71 | </taskdef>
|
||
72 | |||
73 | <target name="show.path.properties" unless="path.properties.shown"> |
||
74 | <echo>workspace_loc = ${workspace_loc}</echo> |
||
75 | <echo>build.folder = ${build.folder}</echo> |
||
76 | <echo>ant.libs.dir = ${ant.libs.dir}</echo> |
||
77 | <property name="path.properties.shown" value="true" /> |
||
78 | </target>
|
||
79 | |||
80 | <!-- Maven targets -->
|
||
81 | <macrodef name="maven"> |
||
82 | <attribute name="arg" /> |
||
83 | <sequential>
|
||
84 | 32300 | cordinyana | <condition property="gvsig.platform.exists"> |
85 | <available file="${user.home}/.gvsig.platform.properties"/> |
||
86 | </condition>
|
||
87 | |||
88 | <fail unless="gvsig.platform.exists"> |
||
89 | ERROR!! |
||
90 | |||
91 | You have to define your gvSIG platform properties, |
||
92 | by creating the file: ${user.home}/.gvsig.platform.properties |
||
93 | with the following content: |
||
94 | |||
95 | native_platform=linux |
||
96 | native_distribution=Ubuntu-9.10 |
||
97 | native_compiler=gcc4 |
||
98 | native_arch=i386 |
||
99 | native_libraryType=dynamic |
||
100 | export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType} |
||
101 | |||
102 | Replace the fifth initial variables values with the ones appropiate |
||
103 | to your platform. |
||
104 | |||
105 | If you use maven in the command line, you can use the previous file also |
||
106 | to define the MAVEN_OPTS environment variable, by adding to your |
||
107 | .bash_rc file something like this: |
||
108 | |||
109 | if [ -f "${HOME}/.gvsig.platform.properties" ] |
||
110 | then |
||
111 | . ${HOME}/.gvsig.platform.properties |
||
112 | 37155 | cordinyana | export MAVEN_OPTS="-Xmx384M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier} -Dnative-platform=${native_platform}" |
113 | 32300 | cordinyana | else |
114 | 33695 | cordinyana | export MAVEN_OPTS="-Xmx384M -XX:MaxPermSize=64m" |
115 | 32300 | cordinyana | fi |
116 | |||
117 | It will work if you use the bash shell. In any other case or platform, you'll |
||
118 | have to define your MAVEN_OPTS environment variable and set the |
||
119 | "native-classifier" parameter directly. |
||
120 | </fail>
|
||
121 | |||
122 | <loadproperties srcFile="${user.home}/.gvsig.platform.properties"> |
||
123 | <filterchain>
|
||
124 | <linecontains>
|
||
125 | <contains value="native_"/> |
||
126 | </linecontains>
|
||
127 | </filterchain>
|
||
128 | </loadproperties>
|
||
129 | <property name="native_classifier" value="${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}"/> |
||
130 | 37161 | cordinyana | <echo>mvn -e -Dnative-classifier=${native_classifier} -Dnative-platform=${native_platform} @{arg}</echo> |
131 | 29554 | cordinyana | <artifact:mvn mavenHome="${build.folder}/maven" fork="true" |
132 | 33695 | cordinyana | failonerror="true" maxmemory="384M"> |
133 | 37155 | cordinyana | <arg line="-e -Dnative-classifier=${native_classifier} -Dnative-platform=${native_platform} @{arg}" /> |
134 | 33695 | cordinyana | <jvmarg value="-XX:MaxPermSize=96M" /> |
135 | 29554 | cordinyana | </artifact:mvn>
|
136 | </sequential>
|
||
137 | </macrodef>
|
||
138 | 37161 | cordinyana | |
139 | <macrodef name="maven.lin"> |
||
140 | <attribute name="arg" /> |
||
141 | <sequential>
|
||
142 | <echo>mvn -e -Dnative-classifier=linux-all-gcc4-i386-dynamic -Dnative-platform=linux @{arg}</echo> |
||
143 | <artifact:mvn mavenHome="${build.folder}/maven" fork="true" |
||
144 | failonerror="true" maxmemory="384M"> |
||
145 | <arg line="-e -Dnative-classifier=linux-all-gcc4-i386-dynamic -Dnative-platform=linux @{arg}" /> |
||
146 | <jvmarg value="-XX:MaxPermSize=96M" /> |
||
147 | </artifact:mvn>
|
||
148 | </sequential>
|
||
149 | </macrodef>
|
||
150 | 29554 | cordinyana | |
151 | 37161 | cordinyana | <macrodef name="maven.win"> |
152 | <attribute name="arg" /> |
||
153 | <sequential>
|
||
154 | <echo>mvn -e -Dnative-classifier=win-nt-vs8-i386-dynamic -Dnative-platform=win @{arg}</echo> |
||
155 | <artifact:mvn mavenHome="${build.folder}/maven" fork="true" |
||
156 | failonerror="true" maxmemory="384M"> |
||
157 | <arg line="-e -Dnative-classifier=win-nt-vs8-i386-dynamic -Dnative-platform=win @{arg}" /> |
||
158 | <jvmarg value="-XX:MaxPermSize=96M" /> |
||
159 | </artifact:mvn>
|
||
160 | </sequential>
|
||
161 | </macrodef>
|
||
162 | |||
163 | 29554 | cordinyana | <!-- Utility targets -->
|
164 | <target name="cancel"> |
||
165 | <fail>User canceled</fail> |
||
166 | </target>
|
||
167 | </project> |