[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-user
Subject:    Re: Ant gurus: Desperately Need Help with Ant build Failed Message
From:       Dale Anson <danson () germane-software ! com>
Date:       2004-03-30 17:02:08
Message-ID: 4069A810.3080101 () germane-software ! com
[Download RAW message or body]

Try using "todir" instead of "tofile" in your <copy>.

Dale


john brookes wrote:

> Anyone have a clue whats going wrong here? The include file in question is at the \
> bottom of the page. Thanks in advance,
> John B
> -----------------
> 
> 
> BUILD FAILED
> file:applicant.inc.xml:28: Failed to copy \
> /export/home/jbrookes/project/build/oncall.jar to \
> /export/home/jbrookes/project/build/applicant/WEB-INF/lib due to \
> /export/home/jbrookes/project/build/applicant/WEB-INF/lib (Is a directory) and I \
> couldn't delete the corrupt \
> /export/home/jbrookes/project/build/applicant/WEB-INF/lib 
> at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:539)
> at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:369)
> at org.apache.tools.ant.Task.perform(Task.java:341)
> at org.apache.tools.ant.Target.execute(Target.java:309)
> at org.apache.tools.ant.Target.performTasks(Target.java:336)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
> at org.apache.tools.ant.Main.runBuild(Main.java:609)
> at org.apache.tools.ant.Main.start(Main.java:196)
> at org.apache.tools.ant.Main.main(Main.java:235)
> Caused by: java.io.FileNotFoundException: \
> /export/home/jbrookes/project/build/applicant/WEB-INF/lib (Is a directory) at \
> java.io.FileOutputStream.open(Native Method) at \
> java.io.FileOutputStream.<init>(FileOutputStream.java:176) at \
> java.io.FileOutputStream.<init>(FileOutputStream.java:131) at \
> org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:395) at \
> org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:225) at \
>                 org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:528)
> ... 9 more
> --- Nested Exception ---
> java.io.FileNotFoundException: \
> /export/home/jbrookes/project/build/applicant/WEB-INF/lib (Is a directory) at \
> java.io.FileOutputStream.open(Native Method) at \
> java.io.FileOutputStream.<init>(FileOutputStream.java:176) at \
> java.io.FileOutputStream.<init>(FileOutputStream.java:131) at \
> org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:395) at \
> org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:225) at \
> org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:528) at \
> org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:369) at \
> org.apache.tools.ant.Task.perform(Task.java:341) at \
> org.apache.tools.ant.Target.execute(Target.java:309) at \
> org.apache.tools.ant.Target.performTasks(Target.java:336) at \
> org.apache.tools.ant.Project.executeTarget(Project.java:1339) at \
> org.apache.tools.ant.Project.executeTargets(Project.java:1255) at \
> org.apache.tools.ant.Main.runBuild(Main.java:609) at \
> org.apache.tools.ant.Main.start(Main.java:196) at \
> org.apache.tools.ant.Main.main(Main.java:235) 
> 
> 
> ===============================================
> 
> <target name="applicant-init"  description="init webapp">  
> 
> 
> <property name="applicant.src" value="${basedir}/applicant/src"/>  
> <property name="applicant.build.lib" value="${build.dir}/applicant/WEB-INF/lib"/>
> <property name="applicant.class" value="${build.dir}/applicant/WEB-INF/classes"/>   \
>  <property name="applicant.web" value="${basedir}/applicant"/>
> <property name="applicant.build" value="${build.dir}/applicant/"/>
> <property name="deploy.applicant.war" value="${basedir}"/>
> <property name="build.applicant.war" value="${build.dir}/applicant.war"/>
> </target>
> 
> <target name="applicant-clean" depends="applicant-init"
> description="clean up applicant" >
> <delete dir="${build.dir}/applicant"/>
> <delete file="${deploy.applicant.war}"/>
> <delete file="${build.applicant.war}"/>
> </target>
> <target name="checkout-applicant" depends="checkout-common,applicant-init"  \
> description="check out from cvs" > 
> <cvs cvsRoot="${cvsroot}"  package="project/applicant" dest="${checkoutdir}" \
> tag="${cvs.applicant.tagname}"/> </target>
> <target name="copy-common-jar-to-applicant-lib" depends="common-jar,applicant-init" \
> description="copy common jar to WEB-INF/lib">       <copy \
> file="${build.common.jar}" todir="${applicant.build.lib}"/> </target> 
> <target name="copy-oncall-jar-to-applicant-lib" \
> depends="copy-common-jar-to-applicant-lib,oncall-jar" description="copy oncall jar \
> to WEB-INF/lib">       <copy file="${build.oncall.jar}" \
> tofile="${applicant.build.lib}"/> </target>       
> <target name="applicant-class" depends="copy-oncall-jar-to-applicant-lib"  \
> description="compile application classes"> <mkdir dir="${applicant.class}"/>
> <javac srcdir="${applicant.src}" destdir="${applicant.class}" deprecation="on" \
> debug="on"> <classpath>             
> <fileset dir="${common.lib}">
> <include name="*.jar"/>
> </fileset>
> <fileset dir="${applicant.build.lib}">
> <include name="*.jar"/>
> </fileset>
> <pathelement location="${applicant.class}"/>
> </classpath>
> </javac>
> 
> <copy todir="${applicant.build}">
> <fileset dir="${applicant.web}" includes="WEB-INF/**"/>
> </copy>
> <copy todir="${applicant.build}">
> <fileset dir="${applicant.web}"/>
> </copy>
> <copy todir="${applicant.build}/error">
> <fileset dir="${applicant.web}/error"/>
> </copy>
> <copy todir="${applicant.build}/conf">
> <fileset dir="${applicant.web}/conf"/>
> </copy>
> <copy todir="${applicant.build}/grammar">
> <fileset dir="${applicant.web}/grammar"/>
> </copy>
> 
> <copy todir="${applicant.class}">
> <fileset dir="${applicant.class}" />               
> </copy>
> </target>
> 
> 
> <target name="applicant-war" depends="applicant-class" description="build war file \
> for content and classes"> <war destfile="${build.applicant.war}" \
> webxml="${applicant.web}/WEB-INF/web.xml"> <zipfileset dir="${applicant.build}"/>
> </war>
> 
> </target>
> 
> 
> <target name="checkoutandbuild-applicant" \
> depends="checkout-common,checkout-oncall,applicant-war"> <echo message="Check out \
> applicant module and build" /> </target>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic