I found a usability issue while working on a demo.
Here is my POM
{code :xml } <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target>
<version.org.hibernate.orm>5.1.2.Final</version.org.hibernate.orm> <version.org.hibernate.search>5.6.0.Beta3</version.org.hibernate.search> <slf4jVersion>1.6.4</slf4jVersion> </properties>
<dependencies> <!-- Compile --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-orm</artifactId> <version>${version.org.hibernate.search}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-elasticsearch</artifactId> <version>${version.org.hibernate.search}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>${version.org.hibernate.orm}</version> </dependency> {code}
But in the runtime logs, I see that ORM 5.1.0 is used (the version selected by Hibernate Search's POM).
{code} [2016-11-02 08:43:38,485][INFO ][org.hibernate.Version ] HHH000412: Hibernate Core {5.1.0.Final} {code}
One way out is to do
{code} <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-elasticsearch</artifactId> <version>${version.org.hibernate.search}</version> <exclusions> <exclusion> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <artifactId>hibernate-entitymanager</artifactId> </exclusion> </exclusions> </dependency> {code}
But that is not very nice for users.
Is there anything we could do? Maybe making {{ { hibernate-entitymanager}} } and {{ { hibernate-core}} } optional dependencies in {{ { hibernate-search-orm}} } ? |
|