[hibernate-dev] On Hibernate Search and non Public API use of Core and other SNAPSHOT concerns

Sanne Grinovero sanne.grinovero at gmail.com
Fri Aug 20 04:41:55 EDT 2010

2010/8/20 Emmanuel Bernard <emmanuel at hibernate.org>:
> This is a follow up on IRC's discussion between Steve and Sanne spawned by http://in.relation.to/Bloggers/SimultaneousHibernate355And360Beta3Releases#comment16656
> Since I wasn't there and now you are all gone, I'm using email :)
> Here is my opinion
> * Hibernate Search should not depend on non public Hibernate Core APIs
> HSearch is aimed at working with other backends in the medium run (does this expression exist?). So we should isolate Hibernate Core use of public APIs and certainly not use non public APIs.
> Let's code move SoftLimitMRUCache, into HSearch codebase http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-580
> ( on a side note, SoftLimitMRUCache could be considered a public API as it is referenced in a public API JavaDoc (Environment) )
> Also the use of org.hibernate.util.StringHelper in HSearch is wrong. We have org.hibernate.annotations.common.util.StringHelper
> http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-581
> * Hibernate Search should not use third-party SNAPSHOT dependencies (including Core)
> Using snapshots makes the build non reproducible (snapshots go away) and we did lose close to a collective day of work on such issue not so long ago when HSearch was depending on Core 3.6.0-SNAPSHOT
> * what to do for Core 3.6 and HSearch
> We should release v 3.3 beta 1 (see a previous email on mine on documentation). I will spend some cycles on this.
> * How to prevent such problem in the future
> Good question.
> Follow rules above :)
> Sanne's idea of having some integration (hudson) job specifically altering Core version to the SNAPSHOT scheme in HSearch's pom seems to work if Core publishes snapshots regularly. I am not sure if this can be trivially set up though.

As the Search pom is referring to Hibernate Core version as a property
no change is needed in the current poms, you could just add a new
Hudson job which overrides the property:

mvn clean test -DhibernateVersion=3.6.0-SNAPSHOT

You could have this quick check triggered after each successful core
build to get instant feedback (option "Build other projects" in
Also using "Aggregate downstream test results" you could have the core
build flagged as "failed" if the Search build fails - not sure if that
would be brilliant but you could give it a try for an higher level of
Needless to say, the build of Core should be changed from "clean test"
(as I assume it is, but don't know) to "clean install", to make sure
the triggered Search build uses the updated core.


> Ideally, right before a final Core release (including micro points), we should test the expected HSearch version with it (for example Core 3.5.x with HSearch 3.2.x latest) but that's a manual step to add on a long list of manual steps. Not sure that's viable.
> PS: These rules are even truer (SIC) for Hibernate Validator but HV 4 has been a better citizen
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

More information about the hibernate-dev mailing list