ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EJ Ciramella" <ejcirame...@upromise.com>
Subject RE: Not able to call build.xml from another file build-testjava.xml - Getting error: java.io.FileNotFoundException
Date Wed, 06 Aug 2008 16:58:07 GMT

      [cvs] U Test_Code/Test_Java/build.xml.xml   <---- that could be
your problem ;-)

-----Original Message-----
From: Gaurav Chhabra [mailto:messagegc@gmail.com] 
Sent: Wednesday, August 06, 2008 11:27 AM
To: user@ant.apache.org
Subject: Not able to call build.xml from another file build-testjava.xml
- Getting error: java.io.FileNotFoundException


Hi,




I have a file called build-testjava.xml which checksout the latest code
from
the code repository and then calls a file called build.xml (this file is
also present in the checked out code). 

The file build.xml compiles the .java files and makes .jar out of it.

My problem is that whenever I try running the file build-testjava.xml, I
get
the following error. Although it says that it could not find the file
build.xml, it's very much present at the specified location.

Error Description:
------------------------------------------------------------------------
------------------
F:\buildtestjava>ant -f build-testjava.xml
Buildfile: build-testjava.xml

build:
   [delete] Deleting directory F:\buildtestjava\checkout\Test_Code
      [cvs] cvs checkout: Updating Test_Code/Test_Java
      [cvs] U Test_Code/Test_Java/build.xml.xml
      [cvs] cvs checkout: Updating Test_Code/Test_Java/Database
      [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Doc
      [cvs] U Test_Code/Test_Java/Database/Doc/.htaccess
      [cvs] cvs checkout: Updating Test_Code/Test_Java/Database/Schema
      [cvs] cvs checkout: Updating
Test_Code/Test_Java/Database/Schema/appusers
      [cvs] cvs checkout: Updating
Test_Code/Test_Java/Database/Schema/appusers/grants
      [cvs] U
Test_Code/Test_Java/Database/Schema/appusers/grants/.htaccess
      [cvs] cvs checkout: Updating
Test_Code/Test_Java/Database/Schema/appusers/source
      [cvs] cvs checkout: Updating
Test_Code/Test_Java/Database/Schema/tc_project
      [cvs] U Test_Code/Test_Java/Database/Schema/tc_project/.htaccess
      [cvs] cvs checkout: Updating Test_Code/Test_Java/src
      [cvs] U Test_Code/Test_Java/src/Ample.java
      [cvs] U Test_Code/Test_Java/src/Sample.java
      [cvs] U Test_Code/Test_Java/src/testOne.java
      [cvs] U Test_Code/Test_Java/src/testfile.java

BUILD FAILED
F:\buildtestjava\build-testjava.xml:7: The following error occurred
while
executing this line:
java.io.FileNotFoundException:
F:\buildtestjava\checkout\Test_Code\Test_Java\build.xml (The system
cannot
find the file specified)

Total time: 1 second
F:\buildtestjava>
------------------------------------------------------------------------
------------------

Contents of build-testjava.xml:
------------------------------------------------------------------------
------------------
<?xml version="1.0" ?>

<project name="build-testjava" default="build" basedir="checkout" >
	<target name="build">
		<delete dir="Test_Code" />
		<cvs cvsroot="D:\Test_Repository\"
package="Test_Code\Test_Java" />
		<ant antfile="build.xml" dir="Test_Code\Test_Java\"
target="dist" />
	</target>
</project>
------------------------------------------------------------------------
------------------

Contents of build.xml:
------------------------------------------------------------------------
------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="ant_script" default="dist" basedir=".">
    
    <property name="src.dir" value="src" />
    <property name="build.dir" value="build" />
    <property name="dist.dir" value="dist" />
    
    	<target name="init">
		<mkdir dir="${build.dir}" />
		<mkdir dir="${dist.dir}" />
	</target>


	<target name="build" depends="init" description="build
everything under
${src.dir}" >	
		<javac srcdir="${src.dir}" destdir="${build.dir}" />
	</target>


	<target name="dist" depends="build" description="generate the
distribution"
>
		<jar jarfile="${dist.dir}/testJava.jar"
basedir="${build.dir}"
includes="*.class" />
	</target>

	        <target name="clean" description="clean up">
		<delete dir="${build.dir}" />
		<delete dir="${dist.dir}" />
	</target>
    
</project>
------------------------------------------------------------------------
------------------
Can anyone please help me out?


Thanks & Regards,
Gaurav Chhabra

-- 
View this message in context:
http://www.nabble.com/Not-able-to-call-build.xml-from-another-file-build
-testjava.xml---Getting-error%3A-java.io.FileNotFoundException-tp1885366
6p18853666.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


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


Mime
View raw message