Subversion Repositories eFlore/Applications.del

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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