@echo on
@echo.
@echo ======== Start BizTalk Server example build ========


@REM Compile BizTalk Server classes
javac -d %SERVER_CLASSES% IncomingMessage.java OutgoingMessage.java BizException.java
cd ejb
javac -d %SERVER_CLASSES% BizBean.java BizBeanHome.java
cd ..\
javac -d %SERVER_CLASSES% AdminCLU.java BizAdapter.java BizConfig.java BizServer.java DOMIncomingMessage.java DOMOutgoingMessage.java
javac -d %SERVLET_CLASSES% BizHttpProtocolAdapter.java
@echo.
@echo ======== build BizTraderBean ======== 


cd ejb\biztrader

@REM Create the build directory, and copy the deployment descriptors into it
if not exist build mkdir build 
if not exist build\META-INF mkdir build\META-INF
copy *.xml build\META-INF

@REM Compile ejb classes into the build directory (jar preparation)
javac -d build ..\BizBean.java ..\BizBeanHome.java ProcessingErrorException.java BizTraderBean.java

@REM Make a standard ejb jar file, including XML deployment descriptors
cd build
jar cvf std_xml_biztalk_ejb_bizTrader.jar META-INF examples
cd ..

@REM Run ejbc to create the deployable jar file
java -classpath %CLASSPATH% weblogic.ejbc -compiler javac build\std_xml_biztalk_ejb_bizTrader.jar -d %SERVER_CLASSES%\..\xml_biztalk_ejb_bizTrader.jar

@echo.
@echo ======== build BizTraderJournalBean ========

cd ..\biztradejournal

@REM Create the build directory, and copy the deployment descriptors into it
if not exist build mkdir build 
if not exist build\META-INF mkdir build\META-INF
copy *.xml build\META-INF

@REM Compile ejb classes into the build directory (jar preparation)
javac -d build ..\BizBean.java ..\BizBeanHome.java BizTradeJournalBean.java

@REM Make a standard ejb jar file, including XML deployment descriptors
cd build
jar cvf std_xml_biztalk_ejb_bizTradeJournal.jar META-INF examples
cd ..

@REM Run ejbc to create the deployable jar file
java -classpath %CLASSPATH% weblogic.ejbc -compiler javac build\std_xml_biztalk_ejb_bizTradeJournal.jar -d %SERVER_CLASSES%\..\xml_biztalk_ejb_bizTradeJournal.jar

cd ..\..\

@echo.
@echo ======== end BizTalk Server example build ========