<?xml version="1.0" encoding="GBK"?> <project name="facet" default="help" basedir="."> <!-- =================================================================== --> <!-- 设置属性 --> <!-- =================================================================== --> <property name="optimize" value="false" /> <property name="debug" value="on" /> <property name="deprecation" value="false" /> <property name="build.lib" value="${basedir}/WebContent/WEB-INF/lib" /> <property name="sources" value="${basedir}/src" /> <property name="wsdl" value="${sources}/HelloService.wsdl" /> <property name="schema" value="${basedir}/resource/policyWS.xsd" /> <property name="build.classes" value="${basedir}/WebContent/WEB-INF/classes" /> <property name="package" value="com.tpaic.auto.webservice" /> <!-- =================================================================== --> <!-- 设置类路径 --> <!-- =================================================================== --> <path id="classpath"> <pathelement location="${build.classes}" /> <fileset dir="${build.lib}"> <include name="*.jar" /> </fileset> </path> <taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask" classpathref="classpath" /> <!-- ================================================ --> <!-- 帮助 --> <!-- ================================================ --> <target name="help" description="显示帮助信息"> <echo message="target" /> <echo message="-----------------------------------------------------------------" /> <echo message="compile " /> <echo message="create_code" /> </target> <!-- =============================================== --> <!-- 编译代码 --> <!-- =============================================== --> <target name="compile" description="编译代码"> <javac srcdir="${sources}" destdir="${build.classes}" classpathref="classpath" debug="${debug}" optimize="${optimize}" deprecation="${deprecation}" /> </target> <!-- =============================================== --> <!-- 创建客户端代码 --> <!-- =============================================== --> <target name="create_code" description="创建代码"> <wsgen outputDirectory="${sources}" wsdl="${wsdl}" package="${package}" overwrite="true" /> </target> <!-- =============================================== --> <!-- schema First --> <!-- =============================================== --> <target name="schema First" description="schema优先"> <exec executable="xjc"> <arg line=" ${schema}" /> <arg line=" -p ${package}" /> <arg line=" -d ${sources}" /> <arg line=" -target 2.0" /> </exec> </target> </project>