I'm having a little troubling understanding, but let's assume I do :) If your hibernate project produces an artifact named domain-1.0.jar that contains your hibernate pojo's and mappings. Then you should declare it as a dependency in your project.xml for your other projects that depend on it.
You would run "maven jar:install" in your domain project to install it into your local repository, or you can publish it to your own remote repository so other developers can have access to it. Alex On 5/25/05, phillip rhodes <[EMAIL PROTECTED]> wrote: > > > I have a core project that encapsulates some domain > objects that I reuse in many of my projects. Many of > the domain objects use hibernate to be persisted. I > use the xdoclet and hibernate plugins to generate the > mapping files and create the tables in a schema. > > I reuse these core object relational mappings in many > other projects. Each project has its own schema, so I > need to create these core tables in each of the other > schemas. > > So far, I have been copying the class files and > mapping files to each of these projects using a custom > maven plugin and running the hibernate:schema-export > goal for that individual project so that all the > necessary tables are created. I need to copy the > class files over or the hibernate plugin will not > work. > > While this works, I was interested in hearing how > other folks have dealt with using the hibernate goals > for a shared set of core objects across multiple > projects? > > A couple of drawbacks is that since I copy the class > and hbm files to my new projects, I am getting > unwanted classes in my new pom jar file (i would > rather just get the class file from the core project). > Another drawback (minor) is the time required to > regenerate the ddl from the mappings when this has > already been done in the core project. > > > Interested in hearing your thoughts. > Thanks. > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >