Subversion Repositories eFlore/Applications.del

Rev

Rev 424 | Rev 562 | Go to most recent revision | Details | Compare with Previous | 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">
30 benjamin 40
 
157 benjamin 41
		<java classname="com.google.gwt.i18n.tools.I18NSync" fork="true">
30 benjamin 42
			<arg value="org.tela_botanica.del.client.i18n.Vocabulary" />
43
			<classpath>
44
				<path>
45
					<pathelement location="${gwt-path}/gwt-user.jar" />
46
					<pathelement location="${gwt-path}/gwt-dev.jar" />
47
					<pathelement location="src" />
48
				</path>
49
			</classpath>
50
		</java>
51
	</target>
52
 
561 benjamin 53
	<target name="build-and-deploy-test-server">
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>
1 aurelien 99
	</target>
100
 
561 benjamin 101
	<target name="copy-config-files-to-server" depends="init-server-properties">
102
		<filter token="webservices-root-url" value="${webservices-root-url}" />
103
		<delete>
104
			<fileset dir="target">
105
			</fileset>
106
		</delete>
107
 
108
		<copy file="war/config/config.defaut.js" tofile="target/config/config.js" filtering="true" />
109
		<copy file="war/config/apropos.defaut.js" tofile="target/config/apropos.js" filtering="true" />
424 benjamin 110
 
561 benjamin 111
		<ftp server="${server-url}" remotedir="${server-dir}/config" userid="${server-login}" password="${server-password}">
112
			<fileset dir="target/config" excludes="*.svn" />
113
		</ftp>
424 benjamin 114
	</target>
115
 
561 benjamin 116
 
117
 
118
	<target name="build-and-deploy-local" depends="gwt-compile, deploy-local">
119
		<antcall target="gwt-compile" />
120
		<antcall target="deploy-local" />
121
	</target>
122
 
123
	<target name="deploy-local" depends="init-local-properties">
124
		<delete dir="${local-deploy-path}" />
125
 
126
		<copy todir="${local-deploy-path}">
424 benjamin 127
			<fileset dir="war" excludes="*.svn">
128
			</fileset>
129
		</copy>
130
 
561 benjamin 131
		<copy todir="${local-deploy-path}/jrest">
424 benjamin 132
			<fileset dir="jrest" excludes="*.svn" />
133
		</copy>
561 benjamin 134
 
135
		<antcall target="filter-local-config-files">
136
		</antcall>
137
		<copy todir="${local-deploy-path}/config" filtering="true">
138
			<fileset dir="war/config" excludes="*.svn" />
139
		</copy>
157 benjamin 140
	</target>
141
 
561 benjamin 142
	<target name="filter-local-config-files" depends="init-local-properties">
143
		<filter token="webservices-root-url" value="${webservices-root-url}" />
144
		<copy flatten="true" file="war/config/config.defaut.js" tofile="war/config/config.js" filtering="true" />
145
		<copy flatten="true" file="war/config/apropos.defaut.js" tofile="war/config/apropos.js" filtering="true" />
146
	</target>
147
 
148
	<target name="hosted-mode" depends="init-local-properties">
424 benjamin 149
		<java classname="com.google.gwt.dev.DevMode" fork="true">
150
			<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
151
			<classpath>
152
				<path>
153
					<pathelement location="${gwt-path}/gwt-user.jar" />
154
					<pathelement location="${gwt-path}/gwt-dev.jar" />
155
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
156
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
157
					<pathelement location="src" />
158
					<fileset dir="lib">
159
						<include name="**/*.jar" />
160
					</fileset>
161
				</path>
162
			</classpath>
163
 
164
		</java>
165
	</target>
166
 
167
	<!-- In order to  execute task you must execute a remote java application in your debug configuration on default port 8000-->
561 benjamin 168
	<target name="debug-mode" depends="init-local-properties">
424 benjamin 169
		<java classname="com.google.gwt.dev.DevMode" fork="true">
170
			<jvmarg value="-Xdebug" />
171
			<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
172
			<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
173
			<classpath>
174
				<path>
175
					<pathelement location="${gwt-path}/gwt-user.jar" />
176
					<pathelement location="${gwt-path}/gwt-dev.jar" />
177
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
178
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
179
					<pathelement location="src" />
180
					<fileset dir="lib">
181
						<include name="**/*.jar" />
182
					</fileset>
183
				</path>
184
			</classpath>
185
 
186
		</java>
187
	</target>
188
 
1 aurelien 189
</project>