Develop and Download Open Source Software

Browse CVS Repository

Contents of /pal/cms-portlets/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Fri Dec 1 12:14:42 2006 UTC (17 years, 4 months ago) by shinsuke
Branch: MAIN
Changes since 1.1: +71 -0 lines
File MIME type: application/xml
enable/disable servlet env

1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <project name="build" default="all" basedir=".">
4
5 <property name="war.name" value="cms-portlet"/>
6 <property name="src.main.webapp.webinf.classes" value="${basedir}/src/main/webapp/WEB-INF/classes"/>
7 <property name="src.main.webapp.webinf.lib" value="${basedir}/src/main/webapp/WEB-INF/lib"/>
8 <property name="target.webapp.webinf.lib" value="${basedir}/target/${war.name}/WEB-INF/lib"/>
9 <property name="target.webapp.webinf.classes" value="${basedir}/target/${war.name}/WEB-INF/classes"/>
10
11 <property name="shell.cmd" value="sh"/>
12 <property name="shell.options" value="-c"/>
13
14 <target name="check.os"
15 description="--> Check OS">
16 <condition property="isWindows">
17 <os family="windows" />
18 </condition>
19 </target>
20
21 <target name="setup.shell" depends="check.os" if="isWindows"
22 description="--> Setup shell parameters">
23 <property name="shell.cmd" value="cmd.exe"/>
24 <property name="shell.options" value="/c"/>
25 </target>
26
27 <target name="clean"
28 description="--> Clean Directories">
29 <delete dir="${src.main.webapp.webinf.classes}"/>
30 <delete dir="${src.main.webapp.webinf.lib}"/>
31 </target>
32
33 <!-- =================================================================== -->
34 <!-- SERVLET DEVELOPMENT ENVRIONMENT -->
35 <!-- =================================================================== -->
36
37 <target name="servlet" depends="setup.shell,clean"
38 description="--> Setup Servlet Delopment Environment">
39 <exec
40 executable="${shell.cmd}"
41 failonerror="true"
42 dir="${basedir}"
43 >
44 <arg line="${shell.options} 'mvn clean'"/>
45 </exec>
46 <exec
47 executable="${shell.cmd}"
48 failonerror="true"
49 dir="${basedir}"
50 >
51 <arg line="${shell.options} 'mvn install'"/>
52 </exec>
53
54 <mkdir dir="${src.main.webapp.webinf.classes}"/>
55 <mkdir dir="${src.main.webapp.webinf.lib}"/>
56
57 <copy todir="${src.main.webapp.webinf.lib}">
58 <fileset dir="${target.webapp.webinf.lib}">
59 <include name="*.jar"/>
60 </fileset>
61 </copy>
62 <copy todir="${src.main.webapp.webinf.classes}">
63 <fileset dir="${target.webapp.webinf.classes}">
64 <include name="**"/>
65 </fileset>
66 </copy>
67
68 <exec
69 executable="${shell.cmd}"
70 failonerror="true"
71 dir="${basedir}"
72 >
73 <arg line="${shell.options} 'mvn clean'"/>
74 </exec>
75
76 <!-- pom.xml -->
77 <replace
78 file="${basedir}/pom.xml"
79 token="&lt;!-- SERVLET DEV: BEGIN @@@"
80 value="&lt;!-- SERVLET DEV: BEGIN --&gt;"
81 >
82 </replace>
83 <replace
84 file="${basedir}/pom.xml"
85 token="@@@@ SERVLET DEV: END --&gt;"
86 value="&lt;!-- SERVLET DEV: END --&gt;"
87 >
88 </replace>
89
90 <!-- web.xml -->
91 <replace
92 file="${basedir}/src/main/webapp/WEB-INF/web.xml"
93 token="&lt;!-- SERVLET DEV: BEGIN @@@"
94 value="&lt;!-- SERVLET DEV: BEGIN --&gt;"
95 >
96 </replace>
97 <replace
98 file="${basedir}/src/main/webapp/WEB-INF/web.xml"
99 token="@@@@ SERVLET DEV: END --&gt;"
100 value="&lt;!-- SERVLET DEV: END --&gt;"
101 >
102 </replace>
103
104
105 </target>
106
107 <!-- =================================================================== -->
108 <!-- PORTLET DEVELOPMENT ENVRIONMENT -->
109 <!-- =================================================================== -->
110
111 <target name="portlet" depends="setup.shell,clean"
112 description="--> Setup Portlet Delopment Environment">
113 <exec
114 executable="${shell.cmd}"
115 failonerror="true"
116 dir="${basedir}"
117 >
118 <arg line="${shell.options} 'mvn clean'"/>
119 </exec>
120
121 <!-- pom.xml -->
122 <replace
123 file="${basedir}/pom.xml"
124 token="&lt;!-- SERVLET DEV: BEGIN --&gt;"
125 value="&lt;!-- SERVLET DEV: BEGIN @@@"
126 >
127 </replace>
128 <replace
129 file="${basedir}/pom.xml"
130 token="&lt;!-- SERVLET DEV: END --&gt;"
131 value="@@@@ SERVLET DEV: END --&gt;"
132 >
133 </replace>
134
135 <!-- web.xml -->
136 <replace
137 file="${basedir}/src/main/webapp/WEB-INF/web.xml"
138 token="&lt;!-- SERVLET DEV: BEGIN --&gt;"
139 value="&lt;!-- SERVLET DEV: BEGIN @@@"
140 >
141 </replace>
142 <replace
143 file="${basedir}/src/main/webapp/WEB-INF/web.xml"
144 token="&lt;!-- SERVLET DEV: END --&gt;"
145 value="@@@@ SERVLET DEV: END --&gt;"
146 >
147 </replace>
148
149 </target>
150
151 </project>
152

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26