Subversion Repositories eFlore/Applications.del

Rev

Rev 562 | Rev 1012 | 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">
562 benjamin 54
		<antcall target="gwt-compile" />
561 benjamin 55
		<antcall target="remove-server-files" />
56
		<antcall target="copy-javascript-files-to-server" />
57
		<antcall target="copy-img-files-to-server" />
58
		<antcall target="copy-php-files-to-server" />
59
		<antcall target="copy-config-files-to-server" />
60
	</target>
193 benjamin 61
 
561 benjamin 62
	<target name="remove-server-files" depends="init-server-properties">
63
 
64
		<!-- Avant de redeployer supprime sur le serveur tous les fichiers et repertoires sauf ceux configures pour apache-->
65
		<ftp action="del" server="${server-url}" remotedir="${server-dir}/" userid="${server-login}" password="${server-password}">
66
			<fileset>
67
				<include name="**/*" />
68
				<exclude name="jrest/.htaccess" />
69
				<exclude name="jrest/jrest.ini.php" />
6 benjamin 70
			</fileset>
71
		</ftp>
561 benjamin 72
	</target>
73
 
74
	<target name="copy-javascript-files-to-server" depends="init-server-properties">
75
		<ftp server="${server-url}" remotedir="${server-dir}/" userid="${server-login}" password="${server-password}">
76
			<fileset dir="war">
77
				<exclude name="config/*" />
78
				<exclude name="org.tela_botanica.del.Del.JUnit/*" />
79
				<exclude name="WEB-INF/**" />
80
				<exclude name="img/*" />
193 benjamin 81
			</fileset>
1 aurelien 82
		</ftp>
561 benjamin 83
	</target>
84
 
85
	<target name="copy-img-files-to-server" depends="init-server-properties">
86
		<ftp server="${server-url}" remotedir="${server-dir}/img" userid="${server-login}" password="${server-password}">
87
			<fileset dir="war/img">
193 benjamin 88
			</fileset>
89
		</ftp>
561 benjamin 90
	</target>
424 benjamin 91
 
561 benjamin 92
	<target name="copy-php-files-to-server" depends="init-server-properties">
381 gduche 93
		<ftp server="${server-url}" remotedir="${server-dir}/jrest" userid="${server-login}" password="${server-password}">
424 benjamin 94
			<fileset dir="jrest" excludes="*.svn">
561 benjamin 95
				<include name="**/*" />
424 benjamin 96
				<exclude name=".htaccess" />
561 benjamin 97
				<exclude name="jrest.ini.php" />
424 benjamin 98
			</fileset>
381 gduche 99
		</ftp>
1 aurelien 100
	</target>
101
 
561 benjamin 102
	<target name="copy-config-files-to-server" depends="init-server-properties">
103
		<filter token="webservices-root-url" value="${webservices-root-url}" />
104
		<delete>
105
			<fileset dir="target">
106
			</fileset>
107
		</delete>
108
 
109
		<copy file="war/config/config.defaut.js" tofile="target/config/config.js" filtering="true" />
110
		<copy file="war/config/apropos.defaut.js" tofile="target/config/apropos.js" filtering="true" />
424 benjamin 111
 
561 benjamin 112
		<ftp server="${server-url}" remotedir="${server-dir}/config" userid="${server-login}" password="${server-password}">
113
			<fileset dir="target/config" excludes="*.svn" />
114
		</ftp>
424 benjamin 115
	</target>
116
 
561 benjamin 117
 
118
 
563 benjamin 119
	<target name="build-and-deploy-local">
561 benjamin 120
		<antcall target="gwt-compile" />
121
		<antcall target="deploy-local" />
122
	</target>
123
 
124
	<target name="deploy-local" depends="init-local-properties">
125
		<delete dir="${local-deploy-path}" />
126
 
127
		<copy todir="${local-deploy-path}">
424 benjamin 128
			<fileset dir="war" excludes="*.svn">
129
			</fileset>
130
		</copy>
131
 
561 benjamin 132
		<copy todir="${local-deploy-path}/jrest">
424 benjamin 133
			<fileset dir="jrest" excludes="*.svn" />
134
		</copy>
561 benjamin 135
 
136
		<antcall target="filter-local-config-files">
137
		</antcall>
138
		<copy todir="${local-deploy-path}/config" filtering="true">
139
			<fileset dir="war/config" excludes="*.svn" />
140
		</copy>
157 benjamin 141
	</target>
142
 
561 benjamin 143
	<target name="filter-local-config-files" depends="init-local-properties">
144
		<filter token="webservices-root-url" value="${webservices-root-url}" />
145
		<copy flatten="true" file="war/config/config.defaut.js" tofile="war/config/config.js" filtering="true" />
146
		<copy flatten="true" file="war/config/apropos.defaut.js" tofile="war/config/apropos.js" filtering="true" />
147
	</target>
148
 
149
	<target name="hosted-mode" depends="init-local-properties">
424 benjamin 150
		<java classname="com.google.gwt.dev.DevMode" fork="true">
151
			<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
152
			<classpath>
153
				<path>
154
					<pathelement location="${gwt-path}/gwt-user.jar" />
155
					<pathelement location="${gwt-path}/gwt-dev.jar" />
156
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
157
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
158
					<pathelement location="src" />
159
					<fileset dir="lib">
160
						<include name="**/*.jar" />
161
					</fileset>
162
				</path>
163
			</classpath>
164
 
165
		</java>
166
	</target>
167
 
168
	<!-- In order to  execute task you must execute a remote java application in your debug configuration on default port 8000-->
561 benjamin 169
	<target name="debug-mode" depends="init-local-properties">
424 benjamin 170
		<java classname="com.google.gwt.dev.DevMode" fork="true">
171
			<jvmarg value="-Xdebug" />
172
			<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
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
 
1 aurelien 190
</project>