Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2212 arthur 1
<project name="del" xmlns:artifact="urn:maven-artifact-ant" basedir=".">
2
 
3
  <property file="build.properties"/>
4
 
5
  <path id="gwt">
6
	<fileset includes="*.jar" dir="${user.home}/src/gwt/gwt/build/lib"/>
7
	<fileset includes="cobogw-1.3.2.jar" dir="${user.home}/src/gwt"/>
8
	<pathelement location="src" />
9
  </path>
10
 
11
  <target name="init-local-properties">
12
	<property file="local.properties" />
13
	<property name="gwt-path" value="${gwt-path}" />
14
	<property name="webservices-root-url" value="${webservices-root-url}" />
15
  </target>
16
 
17
  <target name="init-server-properties">
18
	<property file="server.properties" />
19
	<property name="server-url" value="${server-url}" />
20
	<property name="server-login" value="${server-login}" />
21
	<property name="server-password" value="${server-password}" />
22
	<property name="server-dir" value="${server-dir}" />
23
	<property name="webservices-root-url" value="${webservices-root-url}" />
24
  </target>
25
 
26
  <target name="compile" depends="init-local-properties">
27
	<java classname="com.google.gwt.dev.Compiler" fork="true">
28
	  <arg line="-logLevel INFO" />
29
	  <arg line="-style OBF" />
30
	  <arg value="org.tela_botanica.del.Del" />
31
	  <classpath>
32
		<path>
33
		  <pathelement location="${gwt-path}/gwt-user.jar" />
34
		  <pathelement location="${gwt-path}/gwt-dev.jar" />
35
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
36
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
37
		  <pathelement location="src" />
38
		  <pathelement location="war/WEB-INF/classes" />
39
		  <fileset dir="lib">
40
			<include name="**/*.jar" />
41
		  </fileset>
42
		</path>
43
	  </classpath>
44
	</java>
45
  </target>
46
 
47
  <target name="compile-quick" depends="init-local-properties">
48
	<java classname="com.google.gwt.dev.Compiler" fork="true">
49
	  <arg line="-style DETAILED -draftCompile ${projectTestName}" />
50
	  <arg line="-logLevel INFO" />
51
	  <!--<arg line="-style OBF" />-->
52
	  <arg value="org.tela_botanica.del.Del" />
53
	  <classpath>
54
		<path>
55
		  <pathelement location="${gwt-path}/gwt-user.jar" />
56
		  <pathelement location="${gwt-path}/gwt-dev.jar" />
57
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
58
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
59
		  <pathelement location="src" />
60
		  <pathelement location="war/WEB-INF/classes" />
61
		  <fileset dir="lib">
62
			<include name="**/*.jar" />
63
		  </fileset>
64
		</path>
65
	  </classpath>
66
	</java>
67
  </target>
68
 
69
  <target name="generate-vocabulary" depends="init-local-properties">
70
	<java classname="com.google.gwt.i18n.tools.I18NSync" fork="true">
71
	  <arg value="org.tela_botanica.del.client.i18n.Vocabulary" />
72
	  <classpath>
73
		<path>
74
		  <pathelement location="${gwt-path}/gwt-user.jar" />
75
		  <pathelement location="${gwt-path}/gwt-dev.jar" />
76
		  <pathelement location="src" />
77
		</path>
78
	  </classpath>
79
	</java>
80
  </target>
81
 
82
  <target name="build-and-deploy-test-server">
83
	<antcall target="gwt-compile" />
84
	<antcall target="remove-server-files" />
85
	<antcall target="copy-javascript-files-to-server" />
86
	<antcall target="copy-img-files-to-server" />
87
	<antcall target="copy-php-files-to-server" />
88
	<antcall target="copy-config-files-to-server" />
89
  </target>
90
 
91
  <target name="remove-server-files" depends="init-server-properties">
92
	<!-- Avant de redeployer supprime sur le serveur tous les fichiers et repertoires sauf ceux configures pour apache-->
93
	<ftp action="del" server="${server-url}" remotedir="${server-dir}/" userid="${server-login}" password="${server-password}">
94
	  <fileset>
95
		<include name="**/*" />
96
		<exclude name="services/framework.php" />
97
		<exclude name="services/configurations/*" />
98
	  </fileset>
99
	</ftp>
100
  </target>
101
 
102
  <target name="copy-javascript-files-to-server" depends="init-server-properties">
103
	<ftp server="${server-url}" remotedir="${server-dir}/" userid="${server-login}" password="${server-password}">
104
	  <fileset dir="war">
105
		<exclude name="config/*" />
106
		<exclude name="org.tela_botanica.del.Del.JUnit/*" />
107
		<exclude name="WEB-INF/**" />
108
		<exclude name="img/*" />
109
	  </fileset>
110
	</ftp>
111
  </target>
112
 
113
  <target name="copy-img-files-to-server" depends="init-server-properties">
114
	<ftp server="${server-url}" remotedir="${server-dir}/img" userid="${server-login}" password="${server-password}">
115
	  <fileset dir="war/img">
116
	  </fileset>
117
	</ftp>
118
  </target>
119
 
120
  <target name="copy-php-files-to-server" depends="init-server-properties">
121
	<ftp server="${server-url}" remotedir="${server-dir}/services" userid="${server-login}" password="${server-password}">
122
	  <fileset dir="services" excludes="*.svn">
123
		<include name="**/*" />
124
		<exclude name="configurations/*" />
125
		<exclude name="framework.php" />
126
	  </fileset>
127
	</ftp>
128
  </target>
129
 
130
  <target name="copy-config-files-to-server" depends="init-server-properties">
131
	<filter token="webservices-root-url" value="${webservices-root-url}" />
132
	<delete failonerror="false">
133
	  <fileset dir="target">
134
	  </fileset>
135
	</delete>
136
 
137
	<copy file="war/config/config.defaut.js" tofile="target/config/config.js" filtering="true" />
138
	<copy file="war/config/apropos.defaut.js" tofile="target/config/apropos.js" filtering="true" />
139
 
140
	<ftp server="${server-url}" remotedir="${server-dir}/config" userid="${server-login}" password="${server-password}">
141
	  <fileset dir="target/config" excludes="*.svn" />
142
	</ftp>
143
  </target>
144
 
145
  <target name="build-and-deploy-local">
146
	<antcall target="gwt-compile" />
147
	<antcall target="deploy-local" />
148
  </target>
149
 
150
  <target name="deploy-local" depends="init-local-properties">
151
	<delete dir="${local-deploy-path}" />
152
 
153
	<copy todir="${local-deploy-path}">
154
	  <fileset dir="war" excludes="*.svn">
155
	  </fileset>
156
	</copy>
157
 
158
	<antcall target="filter-local-config-files">
159
	</antcall>
160
	<copy todir="${local-deploy-path}/config" filtering="true">
161
	  <fileset dir="war/config" excludes="*.svn" />
162
	</copy>
163
  </target>
164
 
165
  <target name="filter-local-config-files" depends="init-local-properties">
166
	<filter token="webservices-root-url" value="${webservices-root-url}" />
167
	<copy flatten="true" file="war/config/config.defaut.js" tofile="war/config/config.js" filtering="true" />
168
	<copy flatten="true" file="war/config/apropos.defaut.js" tofile="war/config/apropos.js" filtering="true" />
169
  </target>
170
 
171
  <target name="hosted-mode" depends="init-local-properties">
172
	<java classname="com.google.gwt.dev.DevMode" fork="true">
173
	  <arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
174
	  <classpath>
175
		<path>
176
		  <pathelement location="${gwt-path}/gwt-user.jar" />
177
		  <pathelement location="${gwt-path}/gwt-dev.jar" />
178
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
179
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
180
		  <pathelement location="src" />
181
		  <fileset dir="lib">
182
			<include name="**/*.jar" />
183
		  </fileset>
184
		</path>
185
	  </classpath>
186
 
187
	</java>
188
  </target>
189
 
190
  <!-- In order to  execute task you must execute a remote java application in your debug configuration on default port 8000-->
191
  <target name="debug-mode" depends="init-local-properties">
192
	<java classname="com.google.gwt.dev.DevMode" fork="true">
193
	  <jvmarg value="-Xdebug" />
194
	  <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
195
	  <arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
196
	  <classpath>
197
		<path>
198
		  <pathelement location="${gwt-path}/gwt-user.jar" />
199
		  <pathelement location="${gwt-path}/gwt-dev.jar" />
200
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
201
		  <pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
202
		  <pathelement location="src" />
203
		  <fileset dir="lib">
204
			<include name="**/*.jar" />
205
		  </fileset>
206
		</path>
207
	  </classpath>
208
 
209
	</java>
210
  </target>
211
 
212
</project>