[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-712) Maven pom.xml should (in time) depend on javax.persistence:persistence-api instead of org.hibernate:ejb3-persistence

Chris Bredesen (JIRA) noreply at atlassian.com
Tue Mar 18 12:04:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29829 ] 

Chris Bredesen commented on ANN-712:
------------------------------------

> But the TCK and the APIs evolve over time to cope with TCK or Spec bugs. 

TCK isn't the issue here (at least I don't think).  If the API == persistence-api-1.0.jar then how can that change over time??  It would become 1.0.1 or some other version.  Am I missing something here?  What's in our copy that isn't in the published JSR copy?

> 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