[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-712) Maven pom.xml should (in time) depend on javax.persistence:persistence-api instead of org.hibernate:ejb3-persistence
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Tue Mar 18 11:10:33 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bernard resolved ANN-712.
----------------------------------
Resolution: Rejected
The story is more complex than that. ejb3-persistence is not a fork of javax.persistence, both evolved independently and are quite similar because the spec is the same :)
Sometimes, someone update a javax.* jar in the repo. But the TCK and the APIs evolve over time to cope with TCK or Spec bugs.
I'd rather keep ejb3-persistence as a dependency. This is the version I use to compile and the version passing the TCK for Hibernate and JBoss AS.
you should not have the javax.persistence dependency pulled if you use the pom I pushed, AFAIK
> Maven pom.xml should (in time) depend on javax.persistence:persistence-api instead of org.hibernate:ejb3-persistence
> --------------------------------------------------------------------------------------------------------------------
>
> Key: ANN-712
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-712
> Project: Hibernate Annotations
> Issue Type: Task
> Affects Versions: 3.3.1.GA
> Reporter: Geoffrey De Smet
> Priority: Minor
>
> Now it's possible to get the same classes (for example javax.persistence.Entity) twice in the classpath:
> - one from persistence-api-1.0.jar
> - and another from ejb3-persistence-1.0.1.GA.jar.
> Mix that with classloaders and you get bugs like A extends B but an A is not instance of B (because B.class is loaded twice from different jars). Otherwise you can get this too, but if the groupId:artifactId match, maven deals with it.
> In theory, replace:
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>ejb3-persistence</artifactId>
> <version>1.0.1.GA</version>
> </dependency>
> with:
> <dependency>
> <groupId>javax.persistence</groupId>
> <artifactId>persistence-api</artifactId>
> <version>1.0</version> <!-- FIXME -->
> </dependency>
> It looks like org.hibernate:ejb3-persistence is just a copy of javax.persistence:persistence-api, but with a hot-fix applied to it:
> probably because javax.persistence:persistence-api:1.0.1 isn't deployed to the central repo yet.
> So the JCP might need to be poked to put javax.persistence:persistence-api:1.0.1 on the central repo :) Which is probably not an easy thing to do...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list