235 lines
8.2 KiB
XML
235 lines
8.2 KiB
XML
<project name="mnp-simulatori" default="speaker" basedir=".">
|
|
|
|
|
|
<condition property="isWindowsOs">
|
|
<os family="windows"/>
|
|
</condition>
|
|
<condition property="isWindowsXpOs">
|
|
<os family="windows" name="Windows XP"/>
|
|
</condition>
|
|
<condition property="isUnix">
|
|
<os family="unix"/>
|
|
</condition>
|
|
<condition property="isAixOs">
|
|
<os family="unix" name="aix"/>
|
|
</condition>
|
|
|
|
<condition property="build.prop.file.path" value="winxp">
|
|
<isset property="isWindowsOs"/>
|
|
</condition>
|
|
<condition property="build.prop.file.path" value="aix">
|
|
<isset property="isAixOs"/>
|
|
</condition>
|
|
<property name="build.prop.file" value="${build.prop.file.path}/build_${user.name}.properties"/>
|
|
|
|
|
|
<property environment="env"/>
|
|
<property file="${build.prop.file}"/>
|
|
|
|
<property name="build.path" value="${project.home}/buildSim"/>
|
|
<property name="building.path" value="${build.path}/building"/>
|
|
|
|
<property name="testAuto.src.path" value="${project.home}/src"/>
|
|
|
|
<!-- Configurazione per le classi generate da hibernate -->
|
|
<property name="mnp.hibernateDAO.destdir.path" value="${testAuto.src.path}/it/valueteam/dao/db/hb"/>
|
|
<property name="mnp.hibernatePojoXml.destdir.path" value="${testAuto.src.path}/it/valueteam/obj/dao/db/hb"/>
|
|
<property name="mnp.hibernate.gen.configFile" value="${project.home}/hibernate/hibernateGen.cfg.xml"/>
|
|
<property name="mnp.hibernate.gen.revengeFile" value="${project.home}/hibernate/hibernate.reveng.xml"/>
|
|
<property name="mnp.hibernate.gen.revengeFileFK" value="${project.home}/hibernate/hibernateFK.reveng.xml"/>
|
|
<property name="mnp.hibernate.gen.lib.path" value="${project.home}/hibernate/genLib"/>
|
|
<!-- define a mapper for Home to DAO -->
|
|
<mapper id="DAOMapper" type="glob" from="*Home.java" to="*DAO.java"/>
|
|
|
|
|
|
<filelist id="mnp.files.classpath" dir="${mnp.lib.path}">
|
|
<!-- LIB xml -->
|
|
<file name="jaxp-api.jar"/>
|
|
<file name="hibernate-dom4j-1.5.2.jar"/>
|
|
<file name="xalan.jar"/>
|
|
<file name="sax.jar"/>
|
|
<file name="hibernate-xerces-2.6.2.jar"/>
|
|
<file name="castor-1.0.5-xml.jar"/>
|
|
<file name="jakarta-oro-2.0.5.jar"/>
|
|
<file name="databinding.jar"/>
|
|
<!-- LIB common-->
|
|
<file name="commons-net-1.3.0.jar"/>
|
|
<file name="commons-logging-1.1.jar"/>
|
|
<file name="jakarta-regexp-1.1.jar"/>
|
|
<file name="jug-lgpl-2.0.0.jar"/>
|
|
|
|
</filelist>
|
|
|
|
<!-- LIB per la compilazione degli oggetti di hibernate -->
|
|
<filelist id="hibernate.compile.files.classpath" dir="${mnp.lib.path}">
|
|
<file name="hibernate-c3p0-0.9.0.jar"/>
|
|
<file name="hibernate-cglib-2.1.3.jar"/>
|
|
<file name="hibernate-ehcache-1.2.jar"/>
|
|
<file name="hibernate3.jar"/>
|
|
<file name="hibernate-jgroups-2.2.8.jar"/>
|
|
<file name="hibernate-antlr-2.7.6rc1.jar"></file>
|
|
<file name="logging.jar"></file>
|
|
<file name="log4j-1.2.7.jar"></file>
|
|
<file name="hibernate-dom4j-1.5.2.jar"/>
|
|
<file name="hibernate-asm.jar"/>
|
|
<file name="hibernate-asm-attrs.jar"/>
|
|
<file name="hibernate-commons-collections-2.1.1.jar"/>
|
|
</filelist>
|
|
|
|
<!-- LIB per la generazione degli oggetti di hibernate -->
|
|
<filelist id="hibernate.gen.files.classpath" dir="${mnp.hibernate.gen.lib.path}" >
|
|
<file name="hibernate-tools-MNPcustom.jar"/>
|
|
<file name="classes12.jar"/>
|
|
<!-- <file name="commons-fileupload.jar"/> -->
|
|
<file name="freemarker.jar"/>
|
|
<file name="jtidy-r8-20060801.jar"/>
|
|
</filelist>
|
|
|
|
|
|
|
|
|
|
<filelist id="weblogic.jar" dir="${weblogic.home}/server/lib">
|
|
<file name="weblogic.jar"/>
|
|
</filelist>
|
|
|
|
|
|
|
|
<!-- Classpath preso dallo startWebLogic.sh -->
|
|
|
|
|
|
<path id="hibernate.gen.all.claspath">
|
|
<filelist refid="mnp.files.classpath"/>
|
|
<filelist refid="hibernate.gen.files.classpath"/>
|
|
<filelist refid="hibernate.compile.files.classpath"/>
|
|
<filelist refid="weblogic.jar"/>
|
|
</path >
|
|
|
|
<!-- ################################################################################ -->
|
|
<!-- ################################################################################ -->
|
|
<!-- ################################################################################ -->
|
|
|
|
|
|
<target name="init">
|
|
<tstamp prefix="start"/>
|
|
|
|
<echo>
|
|
Build started at: ${start.DSTAMP} ${start.TSTAMP}
|
|
-----------------
|
|
|
|
sdk.home= ${sdk.home}
|
|
weblogic.home= ${weblogic.home}
|
|
project.home= ${project.home}
|
|
mnp.lib.path= ${mnp.lib.path}
|
|
build.prop.file= ${build.prop.file}
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<!-- TARGET PER LA CREAZIONE DEI DTO E FILE XML DI MAPPING-->
|
|
<target name="hibernateGenDto">
|
|
<echo>
|
|
Creating Hibernate DTO Objects and XML Mapping
|
|
-------------
|
|
</echo>
|
|
<echo message="${mnp.hibernate.gen.lib.path}" />
|
|
<echo message="${build.prop.file}" />
|
|
<!-- DEFINIZIONE TASK GENERAZIONE XML E POJO -->
|
|
<taskdef name="hibernatetoolGenPojoXml"
|
|
classname="org.hibernate.tool.ant.HibernateToolTask"
|
|
classpathref="hibernate.gen.all.claspath"
|
|
/>
|
|
<!-- DEFINIZIONE TASK GENERAZIONE XML E POJO PER LE TABELLE CON FK-->
|
|
<taskdef name="hibernatetoolFKGenPojoXml"
|
|
classname="org.hibernate.tool.ant.HibernateToolTask"
|
|
classpathref="hibernate.gen.all.claspath"
|
|
/>
|
|
<!-- IMPLEMENTAZIONE TASK GENERAZIONE XML E POJO-->
|
|
<hibernatetoolGenPojoXml >
|
|
<jdbcconfiguration
|
|
configurationfile="${mnp.hibernate.gen.configFile}"
|
|
revengfile="${mnp.hibernate.gen.revengeFile}"
|
|
detectmanytomany="false"
|
|
detectoptimisticlock="true"/>
|
|
<hbm2hbmxml destdir="${mnp.hibernatePojoXml.destdir.path}"/>
|
|
<hbm2java destdir="${mnp.hibernatePojoXml.destdir.path}" />
|
|
</hibernatetoolGenPojoXml>
|
|
<!-- IMPLEMENTAZIONE TASK GENERAZIONE XML E POJO LE TABELLE CON FK -->
|
|
<hibernatetoolFKGenPojoXml >
|
|
<jdbcconfiguration
|
|
configurationfile="${mnp.hibernate.gen.configFile}"
|
|
revengfile="${mnp.hibernate.gen.revengeFileFK}"
|
|
detectmanytomany="false"
|
|
detectoptimisticlock="true"/>
|
|
<hbm2hbmxml destdir="${mnp.hibernatePojoXml.destdir.path}"/>
|
|
<hbm2java destdir="${mnp.hibernatePojoXml.destdir.path}"/>
|
|
</hibernatetoolFKGenPojoXml>
|
|
</target>
|
|
<!-- FINE TARGET PER LA CREAZIONE DEI DTO E FILE XML DI MAPPING-->
|
|
|
|
<!-- INIZIO DEI TARGET PER LA GESTIONE DELLA CREAZIONE DEI DAO-->
|
|
<target name="hibernateDAO" depends="init">
|
|
<echo>
|
|
Creating Hibernate DAO Objects -
|
|
ATTENZIONE VERRANNO GENERATI I DAO STANDARD ELIMINADO COSI' LE PERSONALIZZAZIONI
|
|
-------------
|
|
</echo>
|
|
<!-- DEFINIZIONE TASK GENERAZIONE DAO -->
|
|
<taskdef name="hibernatetoolGenDAO"
|
|
classname="org.hibernate.tool.ant.HibernateToolTask"
|
|
classpathref="hibernate.gen.all.claspath"
|
|
/>
|
|
|
|
<!-- DEFINIZIONE TASK GENERAZIONE DAO PER LE TABELLE CON FK-->
|
|
<taskdef name="hibernatetoolFKGenDAO"
|
|
classname="org.hibernate.tool.ant.HibernateToolTask"
|
|
classpathref="hibernate.gen.all.claspath"
|
|
/>
|
|
|
|
<!-- IMPLEMENTAZIONE TASK GENERAZIONE DAO-->
|
|
<hibernatetoolGenDAO >
|
|
<jdbcconfiguration
|
|
configurationfile="${mnp.hibernate.gen.configFile}"
|
|
revengfile="${mnp.hibernate.gen.revengeFile}"
|
|
detectmanytomany="false"
|
|
detectoptimisticlock="true"/>
|
|
<hbm2dao destdir="${mnp.hibernateDAO.destdir.path}"/>
|
|
</hibernatetoolGenDAO>
|
|
|
|
<!-- IMPLEMENTAZIONE TASK GENERAZIONE DAO LE TABELLE CON FK -->
|
|
<hibernatetoolFKGenDAO >
|
|
<jdbcconfiguration
|
|
configurationfile="${mnp.hibernate.gen.configFile}"
|
|
revengfile="${mnp.hibernate.gen.revengeFileFK}"
|
|
detectmanytomany="false"
|
|
detectoptimisticlock="true"/>
|
|
<hbm2dao destdir="${mnp.hibernateDAO.destdir.path}"/>
|
|
</hibernatetoolFKGenDAO>
|
|
</target>
|
|
|
|
<target name="hibernateGenDao" depends="hibernateDAO">
|
|
<echo>
|
|
Renaming Hibernate DAO
|
|
-------------
|
|
</echo>
|
|
<taskdef name="move"
|
|
classname="org.apache.tools.ant.taskdefs.Move"
|
|
classpathref="hibernate.gen.all.claspath"/>
|
|
|
|
<move todir="${mnp.hibernateDAO.destdir.path}">
|
|
<!-- the files to move -->
|
|
<fileset dir="${mnp.hibernateDAO.destdir.path}">
|
|
<include name="**/*Home.java" />
|
|
</fileset>
|
|
<mapper refid="DAOMapper" />
|
|
</move>
|
|
</target>
|
|
<!-- FINE DEI TARGET PER LA GESTIONE DELLA CREAZIONE DEI DAO-->
|
|
|
|
|
|
|
|
</project>
|