?? build.xml
字號:
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY common SYSTEM "file:./common.xml">
]>
<!--
Build file for 'OTN JSP Multimedia Tag Application',
Version: $Revision: 4.10 $ $Date: 2004/01/09 11:37:05 $
Author: Shefali Bansal
-->
<project name="WebinarApp" default="ear" basedir=".">
&common;
<!-- ================================================================== -->
<!-- Initialization of all property settings -->
<!-- ================================================================== -->
<target name="init">
<property name="appname" value="multimediatagdemo" />
<property name="webappname" value="multimediatagdemo-web" />
<property name="WebinarApp.home" value="." />
<property name="build.dir" value="build" />
<property name="temp.dir" value="temp" />
<property name="temp1.dir" value="temp1" />
<property name="orion.dir" value="{j2ee.home}" />
<property name="build.compiler" value="classic" />
</target>
<!-- ================================================================== -->
<!-- Removes all created files and directories -->
<!-- ================================================================== -->
<target name="clean" depends="init">
<delete failonerror="false" dir="${temp.dir}" />
<delete failonerror="false" dir="${build.dir}" />
</target>
<!-- ================================================================== -->
<!-- Makes sure the needed directory structure is in place -->
<!-- ================================================================== -->
<target name="prepare" depends="init">
<mkdir dir="${temp.dir}" />
<mkdir dir="${temp1.dir}" />
<mkdir dir="${temp1.dir}/META-INF" />
<mkdir dir="${temp.dir}/WEB-INF" />
<mkdir dir="${build.dir}" />
<mkdir dir="${WebinarApp.home}/build" />
</target>
<!-- ================================================================== -->
<!-- 1. Copy the required files to the temp directory -->
<!-- 2. Compile the java sources -->
<!-- 3. Create the jars -->
<!-- ================================================================== -->
<target name="web-web-inf" depends="prepare">
<copy file="${WebinarApp.home}/etc/web.xml"
tofile="${temp.dir}/WEB-INF/web.xml" />
<copy todir="${temp.dir}">
<fileset dir="${WebinarApp.home}/jsps">
<include name="**/*" />
</fileset>
</copy>
<copy todir="${temp.dir}">
<fileset dir="${WebinarApp.home}">
<include name="build.xml" />
<include name="**/sql/*" />
<include name="**/docs/*" />
<include name="**/etc/*" />
<include name="images/*" />
<include name="stylesheets/*" />
</fileset>
</copy>
<copy todir="${temp.dir}/WEB-INF">
<fileset dir="${WebinarApp.home}">
<include name="classes/*" />
</fileset>
</copy>
</target>
<target name="war" depends="web-web-inf">
<delete dir="${temp.dir}/build" />
<jar jarfile="${temp1.dir}/${appname}-web.war"
basedir="${temp.dir}" />
</target>
<target name="j2ee-meta-inf" depends="prepare">
<copy file="${WebinarApp.home}/etc/application.xml"
tofile="${temp1.dir}/META-INF/application.xml" />
<copy file="${WebinarApp.home}/etc/data-sources.xml"
tofile="${temp1.dir}/META-INF/data-sources.xml" />
<copy file="${WebinarApp.home}/etc/orion-application.xml"
tofile="${temp1.dir}/META-INF/orion-application.xml" />
<replace dir="${temp1.dir}/META-INF">
<include name="data-sources.xml"/>
<replacefilter token="$db_user" value="${DB_USER}"/>
<replacefilter token="$db_passwd" value="${DB_PASSWD}"/>
<replacefilter token="$db_host" value="${DB_HOST}"/>
<replacefilter token="$db_port" value="${DB_PORT}"/>
<replacefilter token="$db_sid" value="${DB_SID}"/>
</replace>
</target>
<target name="ear" depends="war,j2ee-meta-inf">
<jar jarfile="${build.dir}/${appname}.ear"
basedir="${temp1.dir}" />
<delete dir="${temp.dir}" />
<delete dir="${temp1.dir}" />
<delete dir="${temp.dir}/build/classes" />
<echo>EAR creation successfull !!!</echo>
<!-- Deploy the sample -->
<antcall target="deploySample"/>
<echo message="To access the sample, open your favourite browser and access the URL http://${HOST_NAME}:7777/multimediatagdemo" />
</target>
<target name="deploySample" depends="init">
<echo message="Deploying ${appname} application using DCMCTL to Oracle Application Server 10g" />
<exec executable="${IAS_HOME}/dcm/bin/dcmctl" output="dcmun.log">
<arg line="undeployApplication -d -v -a ${appname}"/>
</exec>
<exec executable="${IAS_HOME}/dcm/bin/dcmctl" output="dcm.log">
<arg line="deployApplication -d -v -f ${SAMPLE_HOME}/build/${appname}.ear -application
${appname}"/>
</exec>
<echo message="Successfully deployed ${appname} application to Oracle Application Server 10g."/>
</target>
</project>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -