Subversion Repositories eFlore/Applications.del

Rev

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