I have a locally-created jar file containing hibernate-annotated entities. I also have a separate project which references this jar.
I need to create a db script using hbm2ddl, but am encounting some difficulty. When I try to use the task in the jar file's build.xml, the persistence unit can't be found. When I try to use the task in the war file's build.xml, no entities are found at all.
This has to be something that's being done by others -- how do you create the SQL when the entities and EM are in different Eclipse projects built by separate build scripts?
The trick here was including the jar file in the classpath of the task which includes hbm2ddl: