Jan Galinski wrote:
We see you.


so its just that none of you knows how to combine middlegen and maven. Or wont tell if he knows.

Thanks Dmitry

It may be that the middlegen maven plugin is no longer available directly from the Middlegen site. I'm familiar with the plugin and I spent some time just now poking aroung the Middlegen site and I could not find it.


When I was using it more regularly I found that the plugin could not support my Hibernate development, so I wrote Jelly script to drive the Middlegen ant task instead. I've migrated away from Middlegen completely and have been writing Hibernate capable pojos by hand using Hibernate 3 and Hibernate Annotations. Since the Middlegen plugin wasn't capable of generating a compareTo method, there were things that I ended up having to do myself anyway.


[I'm attaching the plugin] I tried attaching the plugin, and the message never appeared on the list. If you still need a copy, send me an email and I'll send it to you directly.

Jelly script that I used to drive Middlegen appears below.


Best regards



  <goal name="middle">
    <taskdef name="middlegen"
      classname="middlegen.MiddlegenTask"
      classpathref="maven.dependency.classpath"/>


    <middlegen
      appname="restaurant"
      prefsdir="src/resources"
      gui="true"
      driver="${maven.sql.driver}"
      databaseurl="${maven.sql.url}"
      username="${maven.sql.userid}"
      password="${maven.sql.password}">


      <table name="restaurant"/>
      <table name="diner"/>
      <table name="meal_restaurant"/>
      <table name="meal_diner"/>


      <many2many>
        <tablea name="meal_restaurant"/>
        <jointable name="meal_diner" generate="false"/>
        <tableb name="diner"/>
      </many2many>


      <hibernate
        destination="src/resources"
        package="org.zrgs.restaurant.data"
        genXDocletTags="true">


        <hibernateDAO

getHibernateSession="org.zrgs.util.persistence.HibernateUtil.getSession();"
          closeHibernateSession="hibSession.close();"/>


      </hibernate>
    </middlegen>
  </goal>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to