分享
 
 
 

jboss 4.0.4 GA构建、部署及初始化duke's bank应用的build文件

王朝other·作者佚名  2006-08-17
窄屏简体版  字體: |||超大  

jboss 4.0.4 GA的build文件

jboss文档中,构建、部署及初始化duke's bank应用的步骤如下:

第一步、Compiling the Java Source

ant -f jboss-build.xml compile

第二步、Package the EJBs

ant -f jboss-build.xml package-ejb

第三步、Package the WAR File

ant -f jboss-build.xml package-web

第四步、Package the Java Client

ant -f jboss-build.xml package-client

第五步、Assembling the EAR

ant -f jboss-build.xml assemble-app

第六步、Creating the Database Schema:

to create the necessary tables

ant -f jboss-build.xml db-create-table

populate them with the required data.

ant -f jboss-build.xml db-insert

第七步、Deploying the Application

ant -f jboss-build.xml deploy

详细build文件如下:

<project name="jboss-dukes-bank" default="all" basedir=".">

<property file="../../jboss-build.properties"/>

<property name="lib.dir" value="../../libs"/>

<property name="src.dir" value="${basedir}/src"/>

<property name="build.dir" value="${basedir}/build"/>

<!-- The classpath for running the client -->

<path id="client.classpath">

<pathelement location="${build.dir}"/>

<fileset dir="${jboss.home}/client">

<include name="**/*.jar"/>

</fileset>

</path>

<!-- The build classpath -->

<path id="build.classpath">

<path refid="client.classpath"/>

<fileset dir="${jboss.server}/lib/">

<include name="javax.servlet*.jar"/>

</fileset>

</path>

<!-- Hypersonic SQL classpath -->

<path id="hsql.classpath">

<pathelement location="${jboss.server}/lib/hsqldb.jar"/>

</path>

<!-- =================================================================== -->

<!-- Initialises the build. -->

<!-- =================================================================== -->

<target name="prepare">

<mkdir dir="${build.dir}"/>

</target>

<!-- ================================================================ -->

<!-- Compiles the source code -->

<!-- ================================================================ -->

<target name="compile" depends="prepare">

<javac destdir="${build.dir}" classpathref="build.classpath"

debug="on">

<src path="${src.dir}"/>

</javac>

</target>

<target name="package-ejb" depends="compile">

<mkdir dir="jar" />

<delete file="jar/account-ejb.jar"/>

<jar jarfile="jar/bank-ejb.jar">

<metainf dir="dd/ejb" includes="**/*.xml" />

<fileset dir="${build.dir}">

<include name="com/sun/ebank/util/**"/>

<include name="com/sun/ebank/ejb/**" />

</fileset>

</jar>

</target>

<target name="package-ws">

<mkdir dir="jar" />

<delete file="jar/bankws-ejb.jar"/>

<jar jarfile="jar/bankws-ejb.jar">

<metainf dir="dd/ws" includes="**/*" />

<fileset dir="${build.dir}">

<include name="com/jboss/ebank/**" />

<include name="com/sun/ebank/ejb/account/AccountController**"/>

<include name="com/sun/ebank/ejb/exception/**"/>

<include name="com/sun/ebank/util/**"/>

</fileset>

</jar>

</target>

<target name="package-client" depends="compile">

<mkdir dir="jar" />

<copy todir="${build.dir}">

<fileset dir="${src.dir}">

<include name="**/appclient/*.properties"/>

</fileset>

<mapper type="flatten"/>

</copy>

<delete file="jar/app-client.jar"/>

<jar jarfile="jar/app-client.jar">

<metainf dir="dd/client" includes="*.xml"/>

<fileset dir="${build.dir}">

<include name="com/sun/ebank/appclient/**"/>

<include name="com/sun/ebank/ejb/exception/**"/>

<include name="com/sun/ebank/util/**"/>

<include name="com/sun/ebank/ejb/customer/Account.class"/>

<include name="com/sun/ebank/ejb/customer/AccountHome.class"/>

</fileset>

<fileset dir="dd/client">

<include name="jndi.properties"/>

</fileset>

<fileset dir="${src.dir}/com/sun/ebank/">

<include name="appclient/*.properties"/>

</fileset>

</jar>

</target>

<target name="package-web" depends="compile">

<mkdir dir="jar" />

<delete file="jar/web-client.war"/>

<copy file="web/WebMessages.properties"

tofile="web/WebMessages_en.properties" />

<war warfile="jar/web-client.war" webxml="dd/web/web.xml">

<fileset dir="web">

<include name="*.jsp"/>

<include name="template/*"/>

<include name="images/*.gif"/>

</fileset>

<webinf dir="dd/web">

<include name="jboss-web.xml"/>

</webinf>

<webinf dir="web">

<include name="*.tld"/>

<exclude name="*.jsp"/>

<exclude name="*.txt"/>

<exclude name="images/**"/>

</webinf>

<webinf dir="jar">

<include name="*.tld"/>

</webinf>

<lib dir="${lib.dir}">

<include name="jstl.jar"/>

<include name="standard.jar"/>

</lib>

<classes dir="${build.dir}">

<include name="**/*.class"/>

<exclude name="com/sun/ebank/appclient/**"/>

<exclude name="com/sun/ebank/ejb/**"/>

<exclude name="com/sun/ebank/util/**"/>

</classes>

<classes dir="web">

<include name="*.properties"/>

</classes>

</war>

</target>

<target name="wstool">

<taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">

<classpath refid="build.classpath" />

</taskdef>

<wstools dest="dd/ws"

config="wstools-config.xml"/>

</target>

<target name="deploy-ws">

<copy file="jar/bankws-ejb.jar" todir="${jboss.server}/deploy"/>

</target>

<target name="run-ws">

<java classname="com.jboss.ebank.WSClient" fork="true">

<jvmarg value="-Djava.endorsed.dirs=${jboss.home}/lib/endorsed" />

<classpath>

<path refid="client.classpath"/>

<pathelement path="${java.class.path}"/>

</classpath>

</java>

</target>

<target name="ws" depends="wstool,package-ws,deploy-ws">

</target>

<!-- Creates an ear file containing the ejb jars and the web client war. -->

<target name="assemble-app">

<delete file="jar/JBossDukesBank.ear"/>

<ear destfile="jar/JBossDukesBank.ear" appxml="dd/application.xml">

<fileset dir="jar" includes="*-ejb.jar,app-client.jar,*.war,*.wsr"/>

<fileset dir="src" includes="users.properties,roles.properties"/>

</ear>

</target>

<!-- Deploys the EAR file by copying it to the JBoss deploy directory. -->

<target name="deploy" depends="assemble-app">

<copy file="jar/JBossDukesBank.ear" todir="${jboss.server}/deploy"/>

</target>

<!-- Run the standalone client -->

<target name="run-client">

<echo>${java.class.path}</echo>

<java classname="com.sun.ebank.appclient.BankAdmin" fork="yes">

<classpath>

<pathelement path="jar/app-client.jar"/>

<path refid="client.classpath"/>

<pathelement path="${java.class.path}"/>

</classpath>

</java>

</target>

<!-- Call the HSQL ScriptTool utility. -->

<target name="db-create-table">

<java classname="org.hsqldb.util.ScriptTool" fork="yes">

<arg value="-url"/>

<arg value="jdbc:hsqldb:hsql:"/>

<arg value="-database"/>

<arg value="//localhost:1701"/>

<arg value="-script"/>

<arg value="sql/hsql-create-table.sql"/>

<classpath refid="hsql.classpath"/>

</java>

</target>

<target name="db-insert">

<java classname="org.hsqldb.util.ScriptTool" fork="yes">

<arg value="-url"/>

<arg value="jdbc:hsqldb:hsql:"/>

<arg value="-database"/>

<arg value="//localhost:1701"/>

<arg value="-script"/>

<arg value="sql/hsql-insert.sql"/>

<classpath refid="hsql.classpath"/>

</java>

</target>

<target name="db-list">

<java classname="org.hsqldb.util.ScriptTool" fork="yes">

<arg value="-url"/>

<arg value="jdbc:hsqldb:hsql:"/>

<arg value="-database"/>

<arg value="//localhost:1701"/>

<arg value="-script"/>

<arg value="sql/hsql-list.sql"/>

<classpath refid="hsql.classpath"/>

</java>

</target>

<!--

<target name="db-delete">

<java classname="org.hsqldb.util.ScriptTool" fork="yes">

<arg value="-url"/>

<arg value="jdbc:hsqldb:hsql:"/>

<arg value="-database"/>

<arg value="//localhost:1701"/>

<arg value="-script"/>

<arg value="sql/delete.sql"/>

<classpath refid="hsql.classpath"/>

</java>

</target>

<target name="db-reset-key">

<java classname="org.hsqldb.util.ScriptTool" fork="yes">

<arg value="-url"/>

<arg value="jdbc:hsqldb:hsql:"/>

<arg value="-database"/>

<arg value="//localhost:1701"/>

<arg value="-script"/>

<arg value="sql/hsql-reset-key.sql"/>

<classpath refid="hsql.classpath"/>

</java>

</target>

-->

<target name="clean">

<delete dir="${build.dir}" />

<mkdir dir="${build.dir}" />

</target>

<target name="db-all" depends="db-create-table,db-insert,db-list" />

<target name="all" depends="compile,package-ejb,package-web,package-client,assemble-app,deploy" />

</project>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有