switch.xml
2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="help" name="HttpFileProxy - ADT - Switch">
<property name="project.name" value="MWM_trunk" />
<target name="help">
<echo message="Help.." />
</target>
<target name=">> Switch to ADT - produzione (web77db12) - jcluster" description="Cambia le configurazioni per lavorare su JCLUSTER">
<antcall target="sub-switch">
<param name="param.title" value="JCLUSTER (web77db12)"/>
<param name="param.source" value="context-jcluster-web77db12.xml"/>
</antcall>
</target>
<target name=">> Switch to ADT - sviluppo (web144db2) - liliana" description="Cambia le configurazioni per lavorare su DEV">
<antcall target="sub-switch">
<param name="param.title" value="LILIANA (web144db2)"/>
<param name="param.source" value="context-liliana-web144db2.xml"/>
</antcall>
</target>
<target name="sub-switch">
<echo>Switch context.xml to ${param.title}</echo>
<copy file="${basedir}/conf/myMETA-INF/${param.source}" tofile="${basedir}/WebContent/META-INF/context.xml" overwrite="true" verbose="false"/>
<delete>
<fileset dir="${basedir}/WebContent/META-INF" includes="**.txt" excludes="."/>
</delete>
<property name="myfile" value="${basedir}/WebContent/META-INF/${param.title}.txt" />
<echo file="${myfile}" append="true">context.xml from ${basedir}/conf/myMETA-INF/${param.source}
</echo>
<antcall target="refresh" />
</target>
<target name="refresh" depends="subInclude_AntContrib"
description="REFRESH di Eclipse">
<trycatch reference="exception_ref">
<try>
<echo>Eclipse refresh in progress...</echo>
<!-- Refresh del progetto Per funzionare deve essere impostato il seguente
flag in "External tool configuration" JRE > Run in the same JRE as the workspace -->
<eclipse.refreshLocal resource="${project.name}"
depth="infinite" />
<echo>Eclipse refreshed!</echo>
</try>
<catch>
<echo>Per funzionare deve essere impostato il seguente flag in
"External tool configuration"
JRE > Run in the same JRE as the
workspace
</echo>
</catch>
<finally>
<!-- <echo>Finally</echo> -->
</finally>
</trycatch>
</target>
<target name="subInclude_AntContrib"
description="Include le librerie (JAR) per gestire il TRY/CATCH/FINALLY">
<echo>Include ANT-contrib JAR</echo>
<!-- Include le librerie ant-contrib-0.6.jar http://ant-contrib.sourceforge.net/ -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${basedir}/lib/ant/ant-contrib-0.6.jar" />
</classpath>
</taskdef>
</target>
</project>