build xml creation from eclipse project as war file
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <project basedir="." default="deploy" name="epubtoword"> <property name="warfile" value="epubtowordx" /> <target name="unpack"> <unwar src="${warfile}.war" dest="${warfile}" /> </target> <property name="debuglevel" value="source,lines,vars" /> <property name="target" value="1.5" /> <property name="source" value="1.5" /> <path id="Web App Libraries.libraryclasspath"> <pathelement location="WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar" /> <pathelement location="WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar" /> <pathelement location="WebContent/WEB-INF/lib/commons-io-2.3.jar" /> <pathelement location="WebContent/WEB-INF/lib/commons-logging-1.1.1.jar" /> <pathelement location="WebContent/WEB-INF/lib/javax.servlet-3.0.jar" /> <pathelement location="WebContent/WEB-INF/lib/javax.servlet.jar" /> <pathelement location="WebContent/WEB-INF/lib/mail.jar" /> <pathelement location="WebContent/WEB-INF/lib/mysql-connector-java-3.1.10-bin.jar" /> <pathelement location="WebContent/WEB-INF/lib/org.apache.commons.io.jar" /> <pathelement location="WebContent/WEB-INF/lib/quartz-1.5.2.jar" /> <pathelement location="WebContent/WEB-INF/lib/urlrewritefilter-4.0.3.jar" /> <pathelement location="WebContent/WEB-INF/lib/xercesImpl-2.6.2-jaxb-1.0.6.jar" /> </path> <path id="EAR Libraries.libraryclasspath" /> <path id="epubtoword.classpath"> <pathelement location="build/classes" /> <path refid="Web App Libraries.libraryclasspath" /> <path refid="EAR Libraries.libraryclasspath" /> </path> <target name="init"> <mkdir dir="build/classes" /> <copy includeemptydirs="false" todir="build/classes"> <fileset dir="src"> <exclude name="**/*.launch" /> <exclude name="**/*.java" /> </fileset> </copy> </target> <target name="clean"> <delete dir="build/classes" /> </target> <target name="build"> <javac debug="true" debuglevel="${debuglevel}" destdir="build/classes" source="${source}" target="${target}"> <src path="src" /> <classpath refid="epubtoword.classpath" /> </javac> </target> <target name="create"> <war destfile="/usr/jboss-4.2.3.GA/server/default/deploy/${warfile}.war" webxml="WebContent/WEB-INF/web.xml" update="true"> <classes dir="build/classes" /> <fileset dir="WebContent"> <exclude name="WEB-INF/web.xml" /> </fileset> </war> </target> <target name="deploy"> <antcall target="clean" /> <antcall target="init" /> <antcall target="build" /> <antcall target="create" /> </target> </project>
No comments:
Post a Comment