Subversion Repositories eFlore/Applications.del

Rev

Rev 2046 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1445 raphael 1
<project name="del" xmlns:artifact="urn:maven-artifact-ant" basedir=".">
2
 
3
  <property file="build.properties"/>
4
 
5
  <path id="gwt">
1459 raphael 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"/>
1445 raphael 8
	<pathelement location="src" />
9
  </path>
10
 
1459 raphael 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>
1445 raphael 16
 
1459 raphael 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>
1445 raphael 25
 
2046 mathias 26
  <target name="compile" depends="init-local-properties">
1459 raphael 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>
1445 raphael 46
 
2046 mathias 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" />
2077 mathias 51
	  <!--<arg line="-style OBF" />-->
2046 mathias 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
 
1459 raphael 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>
1445 raphael 81
 
1459 raphael 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>
1445 raphael 90
 
1459 raphael 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>
1445 raphael 101
 
1459 raphael 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>
1445 raphael 112
 
1459 raphael 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>
1445 raphael 119
 
1459 raphael 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>
1445 raphael 129
 
1459 raphael 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>
561 benjamin 136
 
1459 raphael 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" />
1445 raphael 139
 
1459 raphael 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>
1445 raphael 144
 
1459 raphael 145
  <target name="build-and-deploy-local">
146
	<antcall target="gwt-compile" />
147
	<antcall target="deploy-local" />
148
  </target>
1445 raphael 149
 
1459 raphael 150
  <target name="deploy-local" depends="init-local-properties">
151
	<delete dir="${local-deploy-path}" />
1445 raphael 152
 
1459 raphael 153
	<copy todir="${local-deploy-path}">
154
	  <fileset dir="war" excludes="*.svn">
155
	  </fileset>
156
	</copy>
1445 raphael 157
 
1459 raphael 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>
1445 raphael 164
 
1459 raphael 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>
1445 raphael 170
 
1459 raphael 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>
1445 raphael 186
 
1459 raphael 187
	</java>
188
  </target>
1445 raphael 189
 
1459 raphael 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>
1445 raphael 208
 
1459 raphael 209
	</java>
210
  </target>
1445 raphael 211
 
212
</project>