You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by James Adams <ja...@yahoo.com> on 2005/04/29 23:41:37 UTC
Ant cannot find a file, but it's there
I am executing an Ant target which worked well a few
days ago, and now it complains that a file isn't
found. I can see the file in the directory tree so I
know it's there. Other Ant targets in the same
build.xml are working fine. I'm not sure if this is a
problem with Ant or with the task being run as part of
the target (Hibernate's SchemaExportTask). In any
event I'm pretty stumped, so I hope someone can give
me some ideas to try out to get over this hump.
I have the following target in my build.xml:
<!-- Generate the database schemas for all mapping
files in our class tree -->
<target name="schema"
depends="prepare"
description="Generate database schemas
from the O/R mapping files">
<!-- Teach Ant how to use Hibernate's schema
generation tool -->
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="project.class.path"/>
<!-- Run the schema export task -->
<schemaexport
config="${class.root}/hibernate.cfg.xml"
quiet="no"
text="no"
drop="no">
<!-- Make sure we don't overwrite the
FIRMS or TRADERS schemas -->
<fileset dir="${class.root}">
<exclude name="**/Firm.hbm.xml"/>
<exclude name="**/Trader.hbm.xml"/>
</fileset>
</schemaexport>
</target>
When I run it (within Eclipse) I get the following
output:
BUILD FAILED
C:\cvshomedir\hibernate\build.xml:109: Schema text
failed: could not find file:
target\classes\hibernate.cfg.xml
The operative variables are as such:
basedir == . (i.e. C:\cvshomedir\hibernate)
class.root == target/classes
The file is present as
C:\cvshomedir\hibernate\target\classes\hibernate.cfg.xml
The only thing I can think of is that I have updated
my Eclipse to version 3.1M6 since I last ran this
target -- I don't really think that that would have
anything to do with this, but I mention it just in
case.
Any suggestions or insight will be greatly
appreciated!
--James
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org