DefaultPhpBuild.xml Sample

This topic inludes the source code for the DefaultPhpBuild.xml Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/ExtensionDevKit/IdeDevKit/CustomProject/xml/

Sample Source Code


01 <?xml version="1.0" encoding="UTF-8"?>
02 <!-- This is a template for generating an Ant build file. The values
03     preceding with an @ sign are replaced with contextually-
04     appropriate values by the build driver. The PhpProjectBuildDriver
05     class extends DefaultBuildDriver, inherited from that class the
06     functions needed to convert these placeholders to useful values. 
07     See PhpProjectBuildDriver for more information. 
08     
09     The build target of this file merely zip the projects contents
10     and puts the ZIP file in the project's root directory.
11     -->
12 <project name="PHP project" default="build">
13   <property environment="env"/>
14   <!-- These properties are auto-set to match local values when executed within the IDE. -->
15     <!-- Note that most of the following properties aren't actually used in this file's
16         targets. They're here to display values that WebLogic Workshop replaces. -->
17   <property name="beahome.local.directory" value="@beahome.local.directory"/>
18   <property name="platformhome.local.directory" value="@platformhome.local.directory"/>
19   <property name="app.local.directory" value="@app.local.directory"/>
20   <property name="project.local.directory" value="@project.local.directory"/>
21   <!--end auto properties -->
22 
23   <property name="dest.path" value="${project.local.directory}"/>
24   <property name="output.filename" value="@output.filename"/>
25 
26   <target name="build" description="Zip this project and copy the resulting file to the project root.">
27     <delete file="${dest.path}/${output.filename}" failonerror="false"/>
28     <mkdir dir="${dest.path}"/>
29     <zip destfile="${dest.path}/${output.filename}" basedir="${dest.path}" includes="**/*.*" encoding="UTF8">
30       <zipfileset dir="${project.local.directory}" includes="*.*"/>
31         </zip>
32   </target>
33 
34   <target name="clean">
35     <delete file="${dest.path}/${output.filename}" failonerror="false"/>
36   </target>
37 </project>