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="**/*" />
1012 gduche 67
				<exclude name="services/framework.php" />
68
				<exclude name="services/configurations/*" />
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">
974 gduche 92
		<ftp server="${server-url}" remotedir="${server-dir}/services" userid="${server-login}" password="${server-password}">
93
			<fileset dir="services" excludes="*.svn">
94
				<include name="**/*" />
1012 gduche 95
				<exclude name="configurations/*" />
96
				<exclude name="framework.php" />
974 gduche 97
			</fileset>
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}" />
974 gduche 103
		<delete failonerror="false">
561 benjamin 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
 
563 benjamin 118
	<target name="build-and-deploy-local">
561 benjamin 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
		<antcall target="filter-local-config-files">
132
		</antcall>
133
		<copy todir="${local-deploy-path}/config" filtering="true">
134
			<fileset dir="war/config" excludes="*.svn" />
135
		</copy>
157 benjamin 136
	</target>
137
 
561 benjamin 138
	<target name="filter-local-config-files" depends="init-local-properties">
139
		<filter token="webservices-root-url" value="${webservices-root-url}" />
140
		<copy flatten="true" file="war/config/config.defaut.js" tofile="war/config/config.js" filtering="true" />
141
		<copy flatten="true" file="war/config/apropos.defaut.js" tofile="war/config/apropos.js" filtering="true" />
142
	</target>
143
 
144
	<target name="hosted-mode" depends="init-local-properties">
424 benjamin 145
		<java classname="com.google.gwt.dev.DevMode" fork="true">
146
			<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
147
			<classpath>
148
				<path>
149
					<pathelement location="${gwt-path}/gwt-user.jar" />
150
					<pathelement location="${gwt-path}/gwt-dev.jar" />
151
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
152
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
153
					<pathelement location="src" />
154
					<fileset dir="lib">
155
						<include name="**/*.jar" />
156
					</fileset>
157
				</path>
158
			</classpath>
159
 
160
		</java>
161
	</target>
162
 
163
	<!-- In order to  execute task you must execute a remote java application in your debug configuration on default port 8000-->
561 benjamin 164
	<target name="debug-mode" depends="init-local-properties">
424 benjamin 165
		<java classname="com.google.gwt.dev.DevMode" fork="true">
166
			<jvmarg value="-Xdebug" />
167
			<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
168
			<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
169
			<classpath>
170
				<path>
171
					<pathelement location="${gwt-path}/gwt-user.jar" />
172
					<pathelement location="${gwt-path}/gwt-dev.jar" />
173
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
174
					<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
175
					<pathelement location="src" />
176
					<fileset dir="lib">
177
						<include name="**/*.jar" />
178
					</fileset>
179
				</path>
180
			</classpath>
181
 
182
		</java>
183
	</target>
184
 
1 aurelien 185
</project>