|
6 | 6 | set to the current working directory.
|
7 | 7 | -->
|
8 | 8 |
|
9 |
| -<project name="WebGoat" default="Build_ALL_OWASP_Releases" basedir="."> |
| 9 | +<project name="WebGoat" xmlns:artifact="antlib:org.apache.maven.artifact.ant" default="Build_ALL_OWASP_Releases" basedir="."> |
10 | 10 |
|
11 | 11 | <!-- ===================== Property Definitions =========================== -->
|
12 | 12 |
|
|
57 | 57 | <property name="app.home" value="${basedir}"/>
|
58 | 58 | <property name="app.name" value="WebGoat"/> <!-- MUST BE CONSISTENT WITH src/main/build.xml! -->
|
59 | 59 | <property name="app.version" value="5.4"/> <!-- MUST BE CONSISTENT WITH src/main/build.xml! -->
|
60 |
| - <property name="catalina.home" value="${basedir}/../apache-tomcat-7.0.27"/> |
61 | 60 | <property name="dist.home" value="${app.home}/dist"/>
|
62 | 61 | <property name="dist.owasp" value="${app.home}/owasp_distributions"/>
|
63 | 62 | <property name="install.home" value="WebGoat-${app.version}"/>
|
64 |
| - <property name="maven.war" value="${basedir}/target/webgoat-5.4-SNAPSHOT.war"/> <!-- UPDATE THIS! --> |
65 |
| - <property name="maven.target" value="${basedir}/target/webgoat-5.4-SNAPSHOT"/> <!-- UPDATE THIS! --> |
| 63 | + <property name="maven.war" value="${basedir}/target/WebGoat-5.4-SNAPSHOT.war"/> <!-- UPDATE THIS! --> |
| 64 | + <property name="maven.target" value="${basedir}/target/WebGoat-5.4-SNAPSHOT"/> <!-- UPDATE THIS! --> |
| 65 | + <property name="maven.home" value="C:/Program Files (x86)/apache/apache-maven-3.0.3"/> <!-- UPDATE THIS! --> |
66 | 66 | <property name="java32.home" value="C:/Program Files (x86)/Java/jre7"/> <!-- UPDATE THIS! -->
|
| 67 | + <property name="java32.ubuntu.home" value="C:/RTC/WebGoat/ubuntu_openjava_6_32"/> <!-- UPDATE THIS! --> |
67 | 68 | <property name="java64.home" value="C:/Program Files/Java/jdk1.6.0_26"/> <!-- UPDATE THIS! -->
|
68 | 69 | <property name="tomcat32.home" value="C:/RTC/WebGoat/apache-tomcat-7.0.27-x86/"/> <!-- UPDATE THIS! -->
|
69 | 70 | <property name="tomcat64.home" value="C:/RTC/WebGoat/apache-tomcat-7.0.27"/> <!-- UPDATE THIS! -->
|
| 71 | + <property name="tomcat32.ubuntu.home" value="C:/RTC/WebGoat/ubuntu_tomcat_7_32"/> <!-- UPDATE THIS! --> |
70 | 72 |
|
71 | 73 |
|
72 | 74 | <!-- ==================== Clean Target ==================================== -->
|
|
76 | 78 | so that you can be ensured the application can be built from scratch.
|
77 | 79 | -->
|
78 | 80 |
|
79 |
| - <target name="clean" |
| 81 | + <target name="cleanwin32" |
80 | 82 | description="Delete old build and dist directories">
|
81 |
| - <delete file="${web_inf.home}/web.xml"/> |
82 | 83 | <delete dir="${dist.home}"/>
|
83 |
| - <delete dir="${catalina.home}/logs"/> |
84 |
| - <delete dir="${catalina.home}/work/Catalina/localhost"/> |
85 |
| - <delete dir="${catalina.home}/webapps/${app.name}"/> |
86 |
| - <delete file="${catalina.home}/webapps/${app.name}.war"/> |
87 |
| - <delete dir="${catalina.home}/server/webapps/${app.name}"/> |
| 84 | + <delete dir="${tomcat32.home}/logs"/> |
| 85 | + <delete dir="${tomcat32.home}/work/Catalina/localhost"/> |
| 86 | + <delete dir="${tomcat32.home}/webapps/${app.name}"/> |
| 87 | + <delete file="${tomcat32.home}/webapps/${app.name}.war"/> |
| 88 | + <delete dir="${tomcat32.home}/server/webapps/${app.name}"/> |
88 | 89 | <mkdir dir="${dist.home}"/>
|
89 |
| - <mkdir dir="${catalina.home}/logs"/> |
| 90 | + <mkdir dir="${tomcat32.home}/logs"/> |
90 | 91 | </target>
|
91 |
| - |
92 |
| - <target name="clean_all" |
| 92 | + <target name="cleanwin64" |
| 93 | + description="Delete old build and dist directories"> |
| 94 | + <delete dir="${dist.home}"/> |
| 95 | + <delete dir="${tomcat64.home}/logs"/> |
| 96 | + <delete dir="${tomcat64.home}/work/Catalina/localhost"/> |
| 97 | + <delete dir="${tomcat64.home}/webapps/${app.name}"/> |
| 98 | + <delete file="${tomcat64.home}/webapps/${app.name}.war"/> |
| 99 | + <delete dir="${tomcat64.home}/server/webapps/${app.name}"/> |
| 100 | + <mkdir dir="${dist.home}"/> |
| 101 | + <mkdir dir="${tomcat64.home}/logs"/> |
| 102 | + </target> |
| 103 | + <target name="cleanubuntu32" |
| 104 | + description="Delete old build and dist directories"> |
| 105 | + <delete dir="${dist.home}"/> |
| 106 | + <delete dir="${tomcat32.ubuntu.home}/logs"/> |
| 107 | + <delete dir="${tomcat32.ubuntu.home}/work/Catalina/localhost"/> |
| 108 | + <delete dir="${tomcat32.ubuntu.home}/webapps/${app.name}"/> |
| 109 | + <delete file="${tomcat32.ubuntu.home}/webapps/${app.name}.war"/> |
| 110 | + <delete dir="${tomcat32.ubuntu.home}/server/webapps/${app.name}"/> |
| 111 | + <mkdir dir="${dist.home}"/> |
| 112 | + <mkdir dir="${tomcat32.ubuntu.home}/logs"/> |
| 113 | + </target> |
| 114 | + |
| 115 | + <target name="clean_dist" |
93 | 116 | description="Delete old build, dist directories and zips">
|
94 | 117 | <delete dir="${dist.home}"/>
|
95 | 118 | <delete dir="${dist.owasp}"/>
|
|
109 | 132 | dependencies) will have been assembled
|
110 | 133 | -->
|
111 | 134 |
|
112 |
| - <target name="DeployWar32" |
| 135 | + <target name="DeployWarWin32" |
113 | 136 | description="Copy existing war to Tomcat - Does not rebuild">
|
114 | 137 |
|
115 | 138 | <!-- Install war to Tomcat -->
|
|
118 | 141 | <copy file="${maven.war}" tofile="${tomcat32.home}/webapps/${app.name}.war"/>
|
119 | 142 |
|
120 | 143 | </target>
|
121 |
| - <target name="DeployWar64" |
| 144 | + <target name="DeployWarWin64" |
122 | 145 | description="Copy existing war to Tomcat - Does not rebuild">
|
123 | 146 |
|
124 | 147 | <!-- Install war to Tomcat -->
|
125 | 148 | <delete dir="${tomcat64.home}/webapps/${app.name}"/>
|
126 |
| - <delete file="${tomcat65.home}/webapps/${app.name}.war"/> |
127 |
| - <copy file="${maven.war}" tofile="${catalina.home}/webapps/${app.name}.war"/> |
| 149 | + <delete file="${tomcat64.home}/webapps/${app.name}.war"/> |
| 150 | + <copy file="${maven.war}" tofile="${tomcat64.home}/webapps/${app.name}.war"/> |
128 | 151 |
|
129 | 152 | </target>
|
130 |
| - |
131 |
| - |
132 |
| - <target name="ZipProject-Win64" |
133 |
| - description="Create a zip archive of all Eclipse project files from C:\WebGoatClassCD"> |
134 |
| - |
135 |
| - <!-- Put a copy of the keystore into the WTP dynamic deployment area --> |
136 |
| - <copy file="/WebGoatClassCD/tomcat/.keystore" tofile="/WebGoatClassCD/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/.keystore"/> |
137 |
| - |
138 |
| - <zip destfile="${basedir}/project-student.zip" |
139 |
| - basedir="/WebGoatClassCD" |
140 |
| - includes="project/.project, project/.classpath, project/.settings/**, workspace/**"/> |
141 |
| - </target> |
| 153 | + <target name="DeployWarUbuntu32" |
| 154 | + description="Copy existing war to Tomcat - Does not rebuild"> |
142 | 155 |
|
143 |
| - |
144 |
| - <!--Build patch release --> |
145 |
| - <target name="BuildPatch_release" depends="clean" |
146 |
| - description="Creates patch release of class files for WebGoat"> |
147 |
| - <zip destfile="${dist.home}/${app.name}-${app.version}_patch.zip"> |
148 |
| - <zipfileset dir="${maven.target}/WEB-INF/classes" prefix="WEB-INF/classes"/> |
149 |
| - <zipfileset dir="." includes="readme_patch.txt"/> |
150 |
| - </zip> |
151 |
| - </target> |
| 156 | + <!-- Install war to Tomcat --> |
| 157 | + <delete dir="${tomcat32.ubuntu.home}/webapps/${app.name}"/> |
| 158 | + <delete file="${tomcat32.ubuntu.home}/webapps/${app.name}.war"/> |
| 159 | + <copy file="${maven.war}" tofile="${tomcat32.ubuntu.home}/webapps/${app.name}.war"/> |
| 160 | + |
| 161 | + </target> |
152 | 162 |
|
| 163 | + |
153 | 164 | <!-- Build J2EE Lab Environment release -->
|
154 |
| - <target name="Build_DeveloperLab_Release" depends="clean" |
| 165 | + <target name="Build_DeveloperLab_Release_FIXME" depends="cleanwin32" |
155 | 166 | description="Builds J2EE Developer Course release">
|
156 | 167 |
|
157 | 168 | <!-- Build the WebGoat WAR with the desired properties file -->
|
|
172 | 183 | </zip>
|
173 | 184 | </target>
|
174 | 185 |
|
175 |
| - <target name="Build_Class_Release" depends="clean" |
| 186 | + <target name="Build_Class_Release_FIXME" depends="cleanwin32" |
176 | 187 | description="Builds WebGoat Course release">
|
177 | 188 |
|
178 | 189 | <!-- Build the WebGoat WAR with the desired properties file -->
|
|
192 | 203 | </target>
|
193 | 204 |
|
194 | 205 | <!-- Build OWASP Developer Lab Environment release -->
|
195 |
| - <target name="Build_OWASP_DeveloperLab_release" depends="clean" |
| 206 | + <target name="Build_OWASP_DeveloperLab_release_FIXME" depends="cleanwin32" |
196 | 207 | description="Builds OWASP Developer release">
|
197 | 208 | <!-- Build the WebGoat WAR with the desired properties file -->
|
198 | 209 | <ant dir="${app.home}" inheritAll="false">
|
|
210 | 221 | </zip>
|
211 | 222 | </target>
|
212 | 223 |
|
213 |
| - <target name="Build_OWASP_Standard_Release_32" depends="clean" |
214 |
| - description="Builds WebGoat OWASP release"> |
215 |
| - <antcall target="DeployWar32"> </antcall> |
| 224 | + <target name="Build_OWASP_Standard_Release_win32" depends="cleanwin32" |
| 225 | + description="Builds WebGoat OWASP win32 release"> |
| 226 | + <antcall target="DeployWarWin32"> </antcall> |
216 | 227 | <!-- Build the CD image -->
|
217 | 228 | <zip destfile="${dist.home}/${ant.project.name}-OWASP_Standard_32-${app.version}.zip">
|
218 | 229 | <zipfileset dir="." prefix="${install.home}"
|
|
223 | 234 | </zip>
|
224 | 235 | </target>
|
225 | 236 |
|
226 |
| - <target name="Build_OWASP_Standard_Release_64" depends="clean" |
227 |
| - description="Builds WebGoat OWASP release"> |
228 |
| - <antcall target="DeployWar"> </antcall> |
| 237 | + <target name="Build_OWASP_Standard_Release_win64" depends="cleanwin64" |
| 238 | + description="Builds WebGoat OWASP win64 release"> |
| 239 | + <antcall target="DeployWarWin64"> </antcall> |
229 | 240 | <!-- Build the CD image -->
|
230 | 241 | <zip destfile="${dist.home}/${ant.project.name}-OWASP_Standard_64-${app.version}.zip">
|
231 | 242 | <zipfileset dir="." prefix="${install.home}"
|
232 |
| - includes="java/, tomcat/, read*.txt, webgoat.*, webgoat_8080.*" |
233 |
| - excludes="project/.*, project/.settings/**, project/dist/**, project/owasp_distributions/**, project/bin/**, project/build/**"/> |
| 243 | + includes=", READ*.txt, webgoat.*, webgoat_8080.*" |
| 244 | + excludes=".*, .settings/**,dist/**, owasp_distributions/**, bin/**, build/**"/> |
| 245 | + <zipfileset dir="${java64.home}" prefix="${install.home}/java"/> |
| 246 | + <zipfileset dir="${tomcat64.home}" prefix="${install.home}/tomcat"/> |
| 247 | + </zip> |
| 248 | + </target> |
| 249 | + |
| 250 | + <target name="Build_OWASP_Standard_Release_ubuntu32" depends="cleanubuntu32" |
| 251 | + description="Builds WebGoat OWASP ubuntu release"> |
| 252 | + <antcall target="DeployWarUbuntu32"> </antcall> |
| 253 | + <!-- Build the CD image --> |
| 254 | + <zip destfile="${dist.home}/${ant.project.name}-OWASP_Standard_Ubuntu_32-${app.version}.zip"> |
| 255 | + <zipfileset dir="." prefix="${install.home}" |
| 256 | + includes=", READ*.txt, webgoat.*, webgoat_8080.*" |
| 257 | + excludes=".*, .settings/**,dist/**, owasp_distributions/**, bin/**, build/**"/> |
| 258 | + <zipfileset dir="${java32.ubuntu.home}" prefix="${install.home}/java"/> |
| 259 | + <zipfileset dir="${tomcat32.ubuntu.home}" prefix="${install.home}/tomcat"/> |
234 | 260 | </zip>
|
235 | 261 | </target>
|
236 | 262 |
|
237 | 263 | <!--Build all OWASP release -->
|
238 |
| - <target name="Build_ALL_OWASP_Releases" depends="clean_all" |
| 264 | + <target name="Build_ALL_OWASP_Releases" depends="clean_dist" |
239 | 265 | description="Creates all binary distributions for OWASP">
|
240 | 266 | <copy file="${basedir}/readme.txt" tofile="${dist.owasp}/readme.txt"/>
|
241 |
| - <antcall target="Build_OWASP_Standard_Release"> </antcall> |
| 267 | + <antcall target="Build_OWASP_Standard_Release_win32"> </antcall> |
| 268 | + <copydir dest="${dist.owasp}" src="${dist.home}"/> |
| 269 | + <antcall target="Build_OWASP_Standard_Release_win64"> </antcall> |
242 | 270 | <copydir dest="${dist.owasp}" src="${dist.home}"/>
|
243 |
| - <antcall target="Build_OWASP_DeveloperLab_release"> </antcall> |
| 271 | + <antcall target="Build_OWASP_Standard_Release_ubuntu32"> </antcall> |
244 | 272 | <copydir dest="${dist.owasp}" src="${dist.home}"/>
|
245 | 273 | </target>
|
246 | 274 |
|
|
0 commit comments