Dan, Ron -- both good suggestions.  I think I'll try taking Dan's approach
for now; not ready to start reorganizing the projects yet.

Thanks --

dwh


On Tue, Aug 30, 2011 at 11:29 AM, Dan Tran <[email protected]> wrote:

> for my case, I would introduce another project like xxx-dbsetup where
> I unpack all subprojects with entity classes into build area, then use
> hibernate3-maven-plugin 3.0 ( still in snapshot ) to generate the
> initial schema.  After then I use dbupgade-maven-plugin's core to do
> incremental schema upgrade for delta changes after release
>
> -D
>
> On Tue, Aug 30, 2011 at 7:35 AM, Ron Wheeler
> <[email protected]> wrote:
> > This is probably more of a Hibernate question than a Maven question.
> > We use Hibernate in our portal which is built with 70+ maven projects.
> > Our approach is to have a "core" project where we provide all of the DAO
> > functionality.
> > The other modules use the classes and methods in the "core" to access the
> > data.
> >
> > We have another layer of abstraction between the data and the
> application.
> > This uses WebServices to provide functions encapsulating the business
> rules
> > and access to the database
> >
> > This works very well and separates the database from the user interface
> very
> > nicely.
> > Very robust, easy to validate and easy to partition tasks between
> > developers.
> >
> > The schema generation can then be done in the "core" module.
> >
> > I hope that this helps.
> >
> >
> > On 30/08/2011 8:50 AM, Denis Haskin wrote:
> >>
> >> This is perhaps not a maven question per se, but since I'm dealing with
> it
> >> in the context of untangling someone's existing maven project, I'll ask
> >> here...
> >>
> >> We've inherited a large project which consists actually of 2 maven
> >> projects,
> >> each of which is a multimodule project.
> >>
> >> I'm trying to put some best practices in place, and in particular trying
> >> to
> >> fix things so that a developer can get up and running quickly, using the
> >> excellent jetty, hibernate, and hsqldb plugins.
> >>
> >> I'm trying to facilitate the hibernate3:hbm2ddl plugin and running into
> >> some
> >> wrinkles.
> >>
> >> 1) At the risk of sidetracking the responses to this email, is using
> >> hbm2ddl
> >> even a good idea?  Coming (back) from the rails world, and also dabbling
> >> in
> >> the play framework, schema migrations seem a lot more comfortable than
> >> building schema directly off models.  Always made me a little
> >> uncomfortable,
> >> not sure why.
> >>
> >> 2) The main question:
> >>
> >> The models for which schema need to be generated are spread among
> multiple
> >> modules in *both* projects.  The approach I'm taking is to pick one of
> the
> >> maven parent projects and use that as the context for running hbm2ddl,
> but
> >> it's unable to find the entity classes that are defined in its
> submodules.
> >>  I think I'm missing something pretty basic here.
> >>
> >> Am I better off moving hbm2ddl into a submodule, even though to some
> >> degree
> >> I would have to arbitrarily pick one?  Or what do I need to do to get
> >> classes from submodules into the path for the parent pom?
> >>
> >> Thanks!
> >>
> >> dwh
> >>
> >
> >
> > --
> > Ron Wheeler
> > President
> > Artifact Software Inc
> > email: [email protected]
> > skype: ronaldmwheeler
> > phone: 866-970-2435, ext 102
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to