Finally, I read the source code (should have done this way earlier) and realized the "outputFile" was never set anywhere and therefore it has to be specified in the Ant script. Sure enough, that got rid of the NullPointerException and the task was run successfully. And I am reasonably happy.
Here is how my task was defined:
<target name="schemaupdate">
<taskdef name="schemaupdate"
classname="org.hibernate.tool.
hbm2ddl.SchemaUpdateTask"
classpathref="project.class.path"/>
<schemaupdate
config="src/hibernate.cfg.xml"
text="no"
namingStrategy="org.hibernate.cfg.
DefaultNamingStrategy"
outputFile="schema-update.sql"
quiet="no">
</schemaupdate>
</task>
2 comments:
thank you!
I am really excited. I have already looked for the answer for all day. Thank for!
Post a Comment