ant unable to make a war, it stops while compiling classes
I have a build.xml file from which i was building war for three months. but currently it stops when it reaches at compling the code. my version of ant is 1.8. Last time i made war was on last friday evening and it was working fine that time.
here is my build.xml file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Written By Waqas Sadiq on 14062011 -->
<project name="smi-core" default="all" basedir="..">
<property name="name" value="EchelonSurvey"/>
<property name="common.deploy" value="../deploy"/>
<property name="home.dir" value="./WebRoot"/>
<property name="src.dir" value="./src"/>
<property name="oi.dir" value="./openInviter"/>
<property name="as.dir" value="./about-us"/>
<property name="rr.dir" value="./ResponsesReport"/>
<property name="lib.dir" value="./WebRoot/WEB-INF/lib"/>
<property name="images.dir" value="./WebRoot/images"/>
<property name="tabcontent.dir" value="./WebRoot/tabcontent"/>
<property name="css.dir" value="./WebRoot/css"/>
<property name="js.dir" value="./WebRoot/js"/>
<property name="jsp.dir" value="./WebRoot/jsp"/>
<property name="config.web" value="./WebRoot/WEB-INF"/>
<property name="config.web.class" value="./WebRoot/WEB-INF/classes"/>
<property name="build.dir" value="build/buildoutput"/>
<property name="build.lib" value="${build.dir}/lib"/>
<property name="build.dest" value="${build.dir}/classes"/>
<property name="build.war.dir" value="${build.dir}/EchelonSurvey.war"/>
<property name="sampleapp.name" value="EchelonSurvey"/>
<property name="build.ship.dir" value="build/ship"/>
<property name="build.deploy.dir" value="./deploy"/>
<property name="option.debug" value="on"/>
<property name="option.optimize" value="off"/>
<property name="option.deprecation" value="on"/>
<property name="version" value="1.0"/>
<property name="vendor.name" value="Stafona"/>
<property name="deploy.dir" value="./deploy"/>
<target name="eclipse" if="eclipse.running">
<property name="build.c开发者_如何学Pythonompiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
<path id="classpath">
<fileset dir="${lib.dir}/">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${build.dest}" />
</target>
<target name="prepare" depends="clean">
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.dest}"/>
</target>
<target name="compile" depends="prepare">
<delete dir="${config.web.class}"/>
<mkdir dir ="${config.web.class}"/>
<copy todir="${config.web.class}">
<fileset dir="${src.dir}" excludes="**/*.java"/>
</copy>
<javac
destdir="${config.web.class}"
debug="${option.debug}"
optimize="${option.optimize}"
deprecation="${option.deprecation}"
includeantruntime="false"
>
<src path="${src.dir}"/>
<classpath refid="classpath"/>
</javac>
<javac
destdir="${build.dest}"
debug="${option.debug}"
optimize="${option.optimize}"
deprecation="${option.deprecation}"
>
<src path="${src.dir}"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="package-EchelonSurvey"
depends="compile" description="Generates the EchelonSurvey implementation JAR">
<jar destfile="${build.lib}/${name}.jar">
<fileset dir="${build.dest}">
<include name="**/**.class"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${vendor.name}"/>
</manifest>
</jar>
</target>
<target name ="package-web-war" depends ="package-EchelonSurvey" description ="Generates war package">
<mkdir dir ="${build.war.dir}"/>
<mkdir dir ="${build.war.dir}/WEB-INF/classes"/>
<mkdir dir ="${build.war.dir}/WEB-INF/lib"/>
<mkdir dir ="${build.war.dir}/js"/>
<mkdir dir ="${build.war.dir}/jsp"/>
<mkdir dir ="${build.war.dir}/images"/>
<mkdir dir ="${build.war.dir}/css"/>
<copy todir="${build.war.dir}/WEB-INF">
<fileset dir="${config.web}">
<include name="*.xml"/>
<include name="*.log"/>
<include name="*.properties"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/images">
<fileset dir="${images.dir}">
<include name="**/**.*"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/tabcontent">
<fileset dir="${tabcontent.dir}">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/css">
<fileset dir="${css.dir}">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/js">
<fileset dir="${js.dir}">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/jsp">
<fileset dir="${jsp.dir}">
<include name="**/**.jsp"/>
<include name="*.html"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/WEB-INF/classes">
<fileset dir="${config.web.class}">
<include name="**/**.class"/>
<include name="**/**.xml"/>
<include name="**/**.properties"/>
</fileset>
</copy>
<copy todir="${build.war.dir}/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
<exclude name="EchelonSurvey.jar"/>
</fileset>
</copy>
<copy todir="${build.war.dir}">
<fileset dir="${home.dir}">
<include name="*.jsp"/>
<include name="*.properties"/>
<include name="*.html"/>
<include name="*.xml"/>
<include name="*.txt"/>
<include name="*.do"/>
</fileset>
</copy>
<jar jarfile ="${build.lib}/${sampleapp.name}.war" basedir ="${build.war.dir}">
<manifest>
<attribute name="Built-By" value="${vendor.name}"/>
</manifest>
</jar>
<copy todir="${deploy.dir}">
<fileset dir="${build.lib}">
<include name="*.war"/>
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="${common.deploy}">
<fileset dir="${build.lib}">
<include name="*.war"/>
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="all" depends="package-web-war">
</target>
<target name="ship" depends="all" description="* Generates a .zip file">
</target>
<target name="cleanagain">
<delete dir="${build.dir}" />
</target>
</project>
and here is the output from this. I am running this on Ubunto with java 6 installed on it.
Buildfile: /var/tempproject/suleman/EchlonSurvey/build/build.xml
clean:
[delete] Deleting directory /var/tempproject/suleman/EchlonSurvey/build/buildoutput
prepare:
[mkdir] Created dir: /var/tempproject/suleman/EchlonSurvey/build/buildoutput/lib
[mkdir] Created dir: /var/tempproject/suleman/EchlonSurvey/build/buildoutput/classes
compile:
[delete] Deleting directory /var/tempproject/suleman/EchlonSurvey/WebRoot/WEB-INF/classes
[mkdir] Created dir: /var/tempproject/suleman/EchlonSurvey/WebRoot/WEB-INF/classes
[copy] Copying 39 files to /var/tempproject/suleman/EchlonSurvey/WebRoot/WEB-INF/classes
[copy] Copied 13 empty directories to 9 empty directories under /var/tempproject/suleman/EchlonSurvey/WebRoot/WEB-INF/classes
[javac] Compiling 225 source files to /var/tempproject/suleman/EchlonSurvey/WebRoot/WEB-INF/classes
Killed
精彩评论