jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 1.x Hibernate Plugin
  • Maven 1.x Hibernate Plugin
  • MPHIBERNATE-14

Support Hibernate 3.0

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.3
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    N/A
  • Number of attachments :
    2

Description

In Hibernate 3.0, currently alpha, the class structure has changed from net.sf.hibernate to org.hibernate. This means that when using this plugin the user has to change the dialect class in hibernate.cfg.xml or hibernate.properties before & after a hibernate:schema-export.

To upgrade this plugin to support 3.0 is very straightforward - just change the dependency, reorganise the imports & fix line 178 of SchemaBeanBase to support the new API method Configuration.addJar(File). There's also the 3.0 DTD's to add support for, but nothing major to get things working.

Obviously these changes will break 2.1 users, so is it worth maintaining parallel releases for both 2.1 and 3.0 Hibernate users?

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    hibernate3support.diff
    30/Mar/05 11:09 PM
    46 kB
    Dan Washusen
  2. File
    version2and3comat.diff
    29/Apr/05 6:07 PM
    87 kB
    Anthony Vito

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Felipe Leme added a comment - 09/Feb/05 11:19 PM

Mark,

Yes, if it breaks compatibility, we better have 2 branches in parallell (probably 2.0/main for the hibernate 3.0 and 1.x for the old hibernate).

– Felipe

Show
Felipe Leme added a comment - 09/Feb/05 11:19 PM Mark, Yes, if it breaks compatibility, we better have 2 branches in parallell (probably 2.0/main for the hibernate 3.0 and 1.x for the old hibernate). – Felipe
Hide
Permalink
Dan Washusen added a comment - 30/Mar/05 11:09 PM

I've modified the source to support hibernate 3.
I had to remove the code generation part as there is no hibernate extensions jar available on ibiblio. It's hasn't really been tested (other have the hibernate:schema-export goal).

The changes only took 30 minutes...

Cheers,
Dan

Show
Dan Washusen added a comment - 30/Mar/05 11:09 PM I've modified the source to support hibernate 3. I had to remove the code generation part as there is no hibernate extensions jar available on ibiblio. It's hasn't really been tested (other have the hibernate:schema-export goal). The changes only took 30 minutes... Cheers, Dan
Hide
Permalink
Felipe Leme added a comment - 31/Mar/05 10:10 PM

Dan,

Unfortunately, the fix is not that simple, as such change would cease the support to Hibernate 2.x.

In other words, we need to decide how to support both versions (Hibernate 2 and 3).

– Felipe

Show
Felipe Leme added a comment - 31/Mar/05 10:10 PM Dan, Unfortunately, the fix is not that simple, as such change would cease the support to Hibernate 2.x. In other words, we need to decide how to support both versions (Hibernate 2 and 3). – Felipe
Hide
Permalink
Dan Washusen added a comment - 31/Mar/05 11:19 PM

Maybe a hibernate3 maven plugin? I wouldn't much more will be happening with hibernate2.x...

Show
Dan Washusen added a comment - 31/Mar/05 11:19 PM Maybe a hibernate3 maven plugin? I wouldn't much more will be happening with hibernate2.x...
Hide
Permalink
Anthony Vito added a comment - 29/Apr/05 6:07 PM

This patch provides full seamless compatibility between both 2.x and 3.x versions of Hibernate. After this patch the plugin no longer has a hibernate dependency. The user of the plugin chooses the version that will be supported by placing the hibernate dependency in their project.xml file. The plugin detects the hibernate version and acts accordingly. It also fails imediately if hibernate is not found as a dependency. The one extra class I created, HibernateVersions, is a reflective bridge to detect the correct classes and deal with the minor API changes between the versions. After adjusting the dependencies of the "simpleTest" it passed fine. I also added a new test "simplev3Test", just a copy with everything updated to use version 3.0.1. It passes just fine also.(JTA is needed locally) The codeGeneration test always failed for me, even before I began working. I excluded it from the reactor in the plugin-test directory. I believe the codeGeneration in 2.X will work just fine. I think the test is not set up correctly. -Anthony Vito

Show
Anthony Vito added a comment - 29/Apr/05 6:07 PM This patch provides full seamless compatibility between both 2.x and 3.x versions of Hibernate. After this patch the plugin no longer has a hibernate dependency. The user of the plugin chooses the version that will be supported by placing the hibernate dependency in their project.xml file. The plugin detects the hibernate version and acts accordingly. It also fails imediately if hibernate is not found as a dependency. The one extra class I created, HibernateVersions, is a reflective bridge to detect the correct classes and deal with the minor API changes between the versions. After adjusting the dependencies of the "simpleTest" it passed fine. I also added a new test "simplev3Test", just a copy with everything updated to use version 3.0.1. It passes just fine also.(JTA is needed locally) The codeGeneration test always failed for me, even before I began working. I excluded it from the reactor in the plugin-test directory. I believe the codeGeneration in 2.X will work just fine. I think the test is not set up correctly. -Anthony Vito
Hide
Permalink
Todd Huss added a comment - 08/Jun/05 3:19 PM

Anyone know when a new version of the maven hibernate plugin will be release including Anthony's version 2 and 3 compatability patch?

Show
Todd Huss added a comment - 08/Jun/05 3:19 PM Anyone know when a new version of the maven hibernate plugin will be release including Anthony's version 2 and 3 compatability patch?

People

  • Assignee:
    Unassigned
    Reporter:
    Mark Hobson
Vote (7)
Watch (8)

Dates

  • Created:
    15/Dec/04 11:12 AM
    Updated:
    08/Jun/05 3:19 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.