relative paths within Ant tasks different in IDEA from stand alone ant?

I've got an ant build file that uses Hibernate to generate the schema for persistent
objects in our project. The build file is using the SchemaExport task, which is
defined within the build file along with the class path of all the required jars.

The project directory is like:


The Hibernate configuration file hibernate.cfg.xml makes references to the
bean configuration files by using relative paths :

...
]]>


When run from the command line, the SchemaExport task has no problem
with finding these bean definition xml files. However, when run from IDEA
these files are not found for whatever reason.

Note that this does not seem to be a classpath issue as all the jars were already added to the ANT file
'additional classpath' configuration tab, but rather an issue with whatever
implementation of XML parser being used when launching the ant target -
the command line execution seems to treat the relative paths as relative
to the referencing document, but the IDEA based execution seems not to
treat these paths the same way.

Is IDEA's integration with ant the issue? Is IDEA using a different XML parsing
component (to hook onto whatever events the integration requires) than the
one that is used on the command line?

Any help will be appreciated in resolving this issue.

Cheers,

Bonny

3 comments

Are you setting basedir explicitly in this build.xml?

0

Eugene,

Yes, The base dir attribute of the project is set in all our project files. Should I do
somehting else?

Cheers,

Bonny

0

Eugene,

Any news here? Should I file a JIRA issue?

Cheers,

Bonny

0

Please sign in to leave a comment.