Ant多项功能配置
来源:互联网 发布:淘宝买阿玛尼是正品吗 编辑:程序博客网 时间:2024/05/16 08:39
以下是Ant对多项应用的配置:
<?xml version="1.0" encoding="UTF-8"?>
<project name="GP Test" default="" basedir=".">
<property file="build.properties"/>
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<path id="compile.classpath">
<pathelement location="${lib.home}"/>
<fileset dir="${lib.home}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean" description="Clean the deploy dist.">
<delete dir="${classes.home}"/>
<delete dir="${tomcat.webapps}/${project.name}"/>
</target>
<target name="compile" description="Compile the java source.">
<mkdir dir="${classes.home}"/>
<javac srcdir="${src.home}"
destdir="${classes.home}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
>
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${classes.home}">
<fileset dir="${src.home}" excludes="*.properties"/>
<fileset dir="${src.home}" excludes="*.xml"/>
<fileset dir="${src.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="deploy" depends="compile"
description="Deploy application to servlet container">
<!-- Copy the contents of the build directory -->
<mkdir dir="${tomcat.webapps}/${project.name}"/>
<mkdir dir="${tomcat.webapps}/${project.name}/log"/>
<mkdir dir="${tomcat.webapps}/${project.name}/WEB-INF/reports"/>
<mkdir dir="${tomcat.webapps}/${project.name}/WEB-INF/classes"/>
<mkdir dir="${tomcat.webapps}/${project.name}/WEB-INF/lib"/>
<copy todir="${tomcat.webapps}/${project.name}/WEB-INF">
<fileset dir="${webroot.webhome}/WEB-INF" includes="*.xml"/>
<fileset dir="${webroot.webhome}/WEB-INF" includes="*.properties"/>
<fileset dir="${webroot.webhome}/WEB-INF" includes="*.tld"/>
<fileset dir="${webroot.webhome}/WEB-INF" includes="*.wsdd"/>
<fileset dir="${webroot.webhome}/WEB-INF" includes="*.dtd"/>
<!--fileset dir="${config.home}/properties" includes="*.*"/ -->
<fileset dir="${src.home}" includes="*.properties"/>
<fileset dir="${src.home}" includes="*.xml"/>
</copy>
<copy todir="${tomcat.webapps}/${project.name}">
<fileset dir="${webroot.webhome}" includes="**/*.jsp"/>
<fileset dir="${webroot.webhome}" includes="**/*.js"/>
<fileset dir="${webroot.webhome}" includes="**/*.css"/>
<fileset dir="${webroot.webhome}" includes="**/*.gif"/>
</copy>
<copy todir="${tomcat.webapps}/${project.name}/WEb-INF/reports">
<fileset dir="${reports.home}" includes="*.*"/>
</copy>
<copy todir="${tomcat.webapps}/${project.name}/WEB-INF/classes">
<fileset dir="${classes.home}" excludes="**/*.properties"/>
<fileset dir="${classes.home}" excludes="**/*.xml"/>
</copy>
<copy todir="${tomcat.webapps}/${project.name}/WEB-INF/lib">
<fileset dir="${lib.home}" excludes="postgresql-8.0-311.jdbc3.jar"/>
</copy>
</target>
<!--Hibernate配置-->
<target name="codegen" description="Generate Java source code from the Hibernate mapping files">
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="compile.classpath"/>
<hibernatetool destdir="${src.home}">
<configuration propertyFile="build.properties">
<fileset dir="${hibernate.mapping.home}">
<include name="${hibernate.mapping.file}"/>
</fileset>
</configuration>
<hbm2java />
</hibernatetool>
</target>
<target name="hibernateCreator" description="Generate java source code and mapping files from the config file">
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="compile.classpath"/>
<hibernatetool destdir="${src.home}" classpath="${lib.home}" taskname="hibernatetool">
<jdbcconfiguration configurationfile="${config.home}/hibernate.hbm.xml"
revengfile="${config.home}/hibernate.reveng.xml"
packagename="com.technodex.gp.hbm"/>
<!--cfg2cfgxml/-->
<cfg2hbm/>
<hbm2java/>
<hbm2ddl/>
<hbm2doc/>
</hibernatetool>
</target>
<!--Axis配置-->
<target name="axisDeploy" description="Deploy axis service" depends="compile">
<echo message="**/*Deploy the axis service..."/>
<java classname="org.apache.axis.utils.Admin"
failonerror="true"
fork="true"
classpathref="compile.classpath"
dir="${webroot.webhome}/WEB-INF/">
<arg value="server"/>
<arg file="${webservice.wsdd.path}"/>
</java>
</target>
<taskdef resource="axis-tasks.properties" classpathref="compile.classpath"/>
<target name="javaToWsdl" description="Create the wsdl file from the java class" depends="compile">
<echo level="info" message="**/*Create the wsdl file..."/>
<axis-java2wsdl classname="${webservice.java.class}"
classpath="${classes.home}"
classpathref="compile.classpath"
location="${webservice.wsdl.location}"
namespace="urn:com.technodex.gp.webservice"
output="${schema.home}/${webservice.wsdl.file.name}"
serviceelementname="${webservice.wsdl.service.name}"
serviceportname="${webservice.wsdl.service.port.name}"
style="rpc"
use="encoded"
/>
</target>
<target name="wsdlToJava" description="Create the java class from wsdl file">
<echo level="debug" message="**/*Create the java classes..."/>
<axis-wsdl2java allowinvalidurl="on"
debug="true"
failonnetworkerrors="true"
output="${webservice.java.class.output}"
printstacktraceonfailure="true"
timeout="30"
testcase="true"
verbose="true"
url="${webservice.wsdl.file.url}">
<mapping namespace="http://axis.apache.org/ns/interop" package="com.technodex.gp.webservice.client"/>
</axis-wsdl2java>
</target>
<!--JasperReport配置-->
<target name="jasperReportsCompile" description="Compile the jasperreports source files">
<echo level="info" message="**/*Compile the jasperreports files..."/>
<taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask">
<classpath>
<fileset dir="${lib.home}">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<jrc srcdir="${reports.home}" destdir="${reports.home}" keepjava="no"/>
</target>
</project>
- Ant多项功能配置
- Foursquare 重组多项功能
- svn多项目配置
- maven多项目配置
- wampServer多项目配置
- Maven多项目依赖配置
- Maven多项目依赖配置
- Maven多项目依赖配置
- Apache配置(多项目)
- django + wamp 配置多项目
- android多项目UI功能合集
- ListView多项选择功能的实现
- listView的多项删除功能实现
- ant 配置
- ANT 配置
- ant 配置
- ANT配置
- Ant配置
- 英语发音规则
- 转载 STUDY 博客(1)
- Visual SourceSafe 2005 简体中文版(Whikiey 汉化) + 英文版
- 转载 STUDY 博客(2)
- 《WebGIS开发实践手册》将在ESRI用户大会首发
- Ant多项功能配置
- 中研院院士王汎森:如果让我重做一次研究生
- web.xml元素介绍
- 在用hibernate实现oracle 分页查询时报错ORA-00923: FROM keyword not found where expected
- 转载 STUDY 博客(3)
- Python笔记(4)
- C语言余数
- 如何安装ubuntu
- 转载 STUDY 博客(4)