Files
gateway-mnp-dbc/dbcmnpsrc/GW/mnpdev/build/build.xml
2024-05-13 12:54:14 +02:00

335 lines
12 KiB
XML

<project name="mnp" default="cleanup" basedir=".">
<property environment="env"/>
<property file="build.properties"/>
<!--
<property name="sdk.home" value="CHANGE_ME"/>
<property name="project.home" value="CHANGE_ME"/>
<property name="weblogic.home" value="CHANGE_ME"/>
<property name="mnpgw.lib.path" value="${project.home}/mnpgw/lib"/>
-->
<property name="build.path" value="${project.home}/build"/>
<property name="building.path" value="${build.path}/building"/>
<property name="mnpgw.src.path" value="${project.home}/mnpgw/src"/>
<property name="mnpgw.web.path" value="${project.home}/mnpgw/web"/>
<property name="mnpgw.ear.path" value="${project.home}/mnpgw/ear"/>
<property name="mnpgw.ejb.path" value="${project.home}/mnpgw/ejb"/>
<property name="mnpgw.classes.path" value="${building.path}/mnpgw-classes"/>
<!-- Pattern per estrarre dai sorgenti le parti che ci interessano: all/common/ejb/servlet -->
<patternset id="mnpgw.all.sources">
<include name="**/*.java"/>
</patternset>
<!-- Pattern per estrarre dai sorgenti le parti che ci interessano: common/ejb/servlet -->
<!-- Pattern per estrarre dai .class le parti che ci interessano: all/common/ejb/servlet -->
<patternset id="mnpgw.all.classes">
<include name="**/*.class"/>
</patternset>
<!-- Pattern per estrarre dai sorgenti le parti che ci interessano: common/ejb/servlet -->
<patternset id="web.resources">
<exclude name="**/CVS/*"/>
</patternset>
<!-- Pattern per estrarre dai .class le parti che ci interessano: all/common/ejb/servlet -->
<patternset id="mnpgw.manager.classes">
<include name="**/GatewayManagerEJB*.class"/>
<!--<include name="**/ReinvioManager.class"/>
<include name="**/LogProcessFE.class"/>
<include name="**/ProcessLoggerFE.class"/>
<include name="**/FileInfo.class"/>
<include name="**/LogInfoFE.class"/>
<include name="**/LoggableFE.class"/>
<include name="**/Resources.class"/>
<include name="**/CriticalException.class"/>
<include name="**/MyListaLogProcessiFE.class"/>
<include name="**/XMLSender.class"/>
<include name="**/CustomSSLSocketFactory.class"/>-->
</patternset>
<patternset id="mnpgw.lib.classes">
<include name="**/GatewayManagerEJB.class"/>
<include name="**/GatewayManagerEJBHome.class"/>
<include name="**/FileInfo.class"/>
</patternset>
<!-- Classpath preso dallo startWebLogic.sh -->
<!--
CLASSPATH="${MNPFE_HOME}/lib/castor-0.9.4.3.jar"
CLASSPATH="${CLASSPATH}:${MNPFE_HOME}/lib/dataBindingFE.jar"
CLASSPATH="${CLASSPATH}:${MNPFE_HOME}/lib/xercesImpl.jar"
CLASSPATH="${CLASSPATH}:${MNPFE_HOME}/classes"
CLASSPATH="${CLASSPATH}:${WL_HOME}/server/lib/weblogic_sp.jar"
CLASSPATH="${CLASSPATH}:${WL_HOME}/server/lib/weblogic.jar"
CLASSPATH="${CLASSPATH}:${JAVA_HOME}/lib/tools.jar"
-->
<path id="all.classpath">
<pathelement location="${mnpgw.lib.path}/castor-1.3.2-anttasks.jar"/>
<pathelement location="${mnpgw.lib.path}/castor-1.3.2-codegen.jar"/>
<pathelement location="${mnpgw.lib.path}/castor-1.3.2-core.jar"/>
<pathelement location="${mnpgw.lib.path}/castor-1.3.2-ddlgen.jar"/>
<pathelement location="${mnpgw.lib.path}/castor-1.3.2-xml-schema.jar"/>
<pathelement location="${mnpgw.lib.path}/castor-1.3.2-xml.jar"/>
<pathelement location="${mnpgw.lib.path}/castor-1.3.2.jar"/>
<pathelement location="${mnpgw.lib.path}/dataBindingFE.jar"/>
<pathelement location="${mnpgw.lib.path}/xercesImpl.jar"/>
<pathelement location="${mnpgw.lib.path}/security-utility.jar"/>
<pathelement location="${mnpgw.lib.path}/logging.jar"/>
<pathelement location="${mnpgw.lib.path}/log4j-1.2.7.jar"/>
<pathelement location="${mnpgw.lib.path}/datedFileAppender-1.0.2.jar"/>
<pathelement location="${mnpgw.lib.path}/databindingLogSec.jar"/>
<pathelement location="${mnpgw.lib.path}/ibmjsseprovider.jar"/>
<pathelement location="${mnpgw.lib.path}/FrontendProxy-client.jar"/>
<pathelement location="${mnpgw.lib.path}/commons-fileupload-1.2.jar"/>
<pathelement location="${mnpgw.lib.path}/commons-io-1.3.2.jar"/>
<pathelement location="${mnpgw.lib.path}/commons-io-1.3.2.jar"/>
<!-- MNPGW classes -->
<pathelement path="${mnpgw.classes.path}"/>
<!-- Weblogic -->
<!-- pathelement location="${weblogic.home}/server/lib/weblogic.jar"/-->
<!--<fileset dir="${weblogic.home}/../modules/">
<include name="**/*.jar"/>
</fileset>-->
<fileset dir="${weblogic.home}/server/lib/">
<include name="weblogic.jar"/>
</fileset>
<!-- Java compiler tools.jar -->
<pathelement location="${sdk.home}/lib/tools.jar"/>
</path>
<!-- Classpath preso dallo startWebLogic.sh END -->
<target name="test">
<echo>java.home=${java.home}</echo>
<echo>java.home=${sdk.home}</echo>
<echo>weblogic.jar=${weblogic.home}/server/lib/weblogic.jar</echo>
<echo>tools.jar=${sdk.home}/lib/tools.jar</echo>
<!--
<mkdir dir="${building.path}"/>
<mkdir dir="${building.path}/all"/>
<mkdir dir="${building.path}/ejb"/>
<mkdir dir="${building.path}/war"/>
<mkdir dir="${building.path}/common"/>
<copy todir="${building.path}/all">
<fileset dir="${mnpgw.src.path}">
<patternset refid="mnpgw.all.sources"/>
</fileset>
</copy>
<copy todir="${building.path}/ejb">
<fileset dir="${mnpgw.src.path}">
<patternset refid="mnpgw.ejb.sources"/>
</fileset>
</copy>
<copy todir="${building.path}/web">
<fileset dir="${mnpgw.src.path}">
<patternset refid="mnpgw.web.sources"/>
</fileset>
</copy>
<copy todir="${building.path}/common">
<fileset dir="${mnpgw.src.path}">
<patternset refid="mnpgw.common.sources"/>
</fileset>
</copy>
-->
</target>
<target name="echo">
<echo>
Starting build using:
sdk.home= ${sdk.home}
weblogic.home= ${weblogic.home}
project.home= ${project.home}
mnp.lib.path= ${mnpgw.lib.path}
</echo>
<input
message="Ok to continue? "
validargs="y,n"
addproperty="do.continue"
/>
<condition property="do.abort">
<equals arg1="n" arg2="${do.continue}"/>
</condition>
<fail if="do.abort">Build aborted by user.</fail>
</target>
<target name="init" depends="echo">
<tstamp prefix="start"/>
<echo>
Build started at: ${start.DSTAMP} ${start.TSTAMP}
-----------------
</echo>
<delete dir="${building.path}"/>
<mkdir dir="${building.path}"/>
<mkdir dir="${mnpgw.classes.path}"/>
<mkdir dir="${building.path}/mnpgw-gui-war/WEB-INF/classes" />
<mkdir dir="${building.path}/mnpgw-ear/APP-INF/classes" />
<mkdir dir="${building.path}/mnpgw-ear/APP-INF/lib" />
<mkdir dir="${building.path}/mnpgw-common-jar" />
<mkdir dir="${building.path}/mnpgw-manager-jar" />
<mkdir dir="${building.path}/mnpgw-ejbclient-jar" />
</target>
<target name="compile_mnpgw" depends="init">
<echo>
Compiling MNPGW
---------------
</echo>
<javac srcdir="${mnpgw.src.path}"
destdir="${mnpgw.classes.path}"
debug="on"
deprecation="off"
failonerror="true">
<classpath refid="all.classpath"/>
</javac>
</target>
<target name="compile" depends="compile_mnpgw"/>
<target name="war_mnpgw" depends="jar_mnpgw">
<copy todir="${building.path}/mnpgw-gui-war">
<fileset dir="${mnpgw.web.path}">
<patternset refid="web.resources"/>
</fileset>
</copy>
<!--<copy todir="${building.path}/mnpgw-gui-war/WEB-INF/classes">
<fileset dir="${mnpgw.classes.path}">
<patternset refid="mnpgw.all.classes"/>
<exclude name="**/GatewayManagerEJB*.class"/>
<patternset refid="mnpgw.web.classes"/> -->
<!--</fileset>
</copy> -->
<war destfile="${building.path}/mnpgw-gui.war" webxml="${building.path}/mnpgw-gui-war/WEB-INF/web.xml">
<fileset dir="${building.path}/mnpgw-gui-war"/>
</war>
</target>
<target name="war" depends="war_mnpgw"/>
<target name="jar_mnpgw" depends="compile">
<copy todir="${building.path}/mnpgw-common-jar">
<fileset dir="${mnpgw.classes.path}">
<patternset refid="mnpgw.all.classes"/>
<exclude name="**/GatewayManagerEJB*.class"/>
<!--
<patternset refid="mnpgw.web.classes"/>
-->
</fileset>
</copy>
<jar destfile="${building.path}/mnpgw-common.jar" >
<fileset dir="${building.path}/mnpgw-common-jar"/>
</jar>
</target>
<target name="jar_mnpgw_ejbclient" depends="jar_gwmanager">
<copy todir="${building.path}/mnpgw-ejbclient-jar">
<fileset dir="${mnpgw.classes.path}">
<patternset refid="mnpgw.lib.classes"/>
</fileset>
</copy>
<jar destfile="${building.path}/mnpgw-ejbclient.jar" >
<fileset dir="${building.path}/mnpgw-ejbclient-jar"/>
</jar>
</target>
<target name="jar_gwmanager" depends="jar_mnpgw">
<copy todir="${building.path}/mnpgw-manager-jar">
<fileset dir="${mnpgw.ejb.path}">
<patternset refid="web.resources"/>
</fileset>
<fileset dir="${mnpgw.classes.path}">
<patternset refid="mnpgw.manager.classes"/>
<!--
<patternset refid="mnpgw.web.classes"/>
-->
</fileset>
</copy>
<jar destfile="${building.path}/mnpgw-manager-src.jar">
<fileset dir="${building.path}/mnpgw-manager-jar"/>
</jar>
<java fork="true" failonerror="true" classname="weblogic.ejbc">
<classpath refid="all.classpath"/>
<arg value="${building.path}/mnpgw-manager-src.jar"/>
<arg value="${building.path}/mnpgw-manager.jar"/>
</java>
</target>
<target name="jar" depends="jar_mnpgw"/>
<target name="ear" depends="war,jar_gwmanager,jar_mnpgw_ejbclient">
<copy todir="${building.path}/mnpgw-ear">
<fileset dir="${mnpgw.ear.path}">
<patternset refid="web.resources"/>
</fileset>
</copy>
<copy todir="${building.path}/mnpgw-ear" file="${building.path}/mnpgw-gui.war"/>
<copy todir="${building.path}/mnpgw-ear" file="${building.path}/mnpgw-manager.jar"/>
<copy todir="${building.path}/mnpgw-ear/APP-INF/lib">
<fileset dir="${mnpgw.lib.path}">
<include name="castor-1.3.2-anttasks.jar"/>
<include name="castor-1.3.2-codegen.jar"/>
<include name="castor-1.3.2-core.jar"/>
<include name="castor-1.3.2-ddlgen.jar"/>
<include name="castor-1.3.2-xml-schema.jar"/>
<include name="castor-1.3.2-xml.jar"/>
<include name="castor-1.3.2.jar"/>
<include name="dataBindingFE.jar"/>
<include name="xercesImpl.jar"/>
<include name="jakarta-regexp-1.1.jar"/>
<include name="security-utility.jar"/>
<include name="logging.jar"/>
<include name="log4j-1.2.7.jar"/>
<include name="datedFileAppender-1.0.2.jar"/>
<include name="databindingLogSec.jar"/>
<include name="FrontendProxy-client.jar"/>
<include name="commons-logging-1.1.1.jar"/>
<include name="commons-fileupload-1.2.jar"/>
<include name="commons-io-1.3.2.jar"/>
<include name="ibmjsseprovider.jar"/>
</fileset>
<fileset dir="${building.path}">
<include name="mnpgw-common.jar"/>
</fileset>
</copy>
<ear destfile="${building.path}/mnpgw.ear" appxml="${mnpgw.ear.path}/META-INF/application.xml">
<fileset dir="${building.path}/mnpgw-ear"/>
</ear>
</target>
<target name="cleanup" depends="ear,jar">
<mkdir dir="${build.path}/deploy_${start.DSTAMP}_${start.TSTAMP}" />
<copy todir="${build.path}/deploy_${start.DSTAMP}_${start.TSTAMP}" file="${building.path}/mnpgw.ear"/>
<copy todir="${build.path}/deploy_${start.DSTAMP}_${start.TSTAMP}" file="${building.path}/mnpgw-common.jar"/>
<!--<copy todir="${build.path}/deploy_${start.DSTAMP}_${start.TSTAMP}" file="${building.path}/mnpgw-manager.jar"/>-->
<copy todir="${build.path}/deploy_${start.DSTAMP}_${start.TSTAMP}" file="${building.path}/mnpgw-ejbclient.jar"/>
<!--
<copy todir="${build.path}/deploy_${start.DSTAMP}_${start.TSTAMP}" file="${building.path}/mnpgw-gui.war"/>
-->
<delete dir="${building.path}"/>
</target>
</project>