Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMTg5Mjgz...
) / Bug (
https://hibernate.atlassian.net/browse/HSEARCH-4724?atlOrigin=eyJpIjoiMTg...
) HSEARCH-4724 (
https://hibernate.atlassian.net/browse/HSEARCH-4724?atlOrigin=eyJpIjoiMTg...
) Classpath scanning ignores classes within Spring Boot's "repackaged" JARs
(
https://hibernate.atlassian.net/browse/HSEARCH-4724?atlOrigin=eyJpIjoiMTg...
)
Change By: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
The code within {{org.hibernate.search.util.common.jar.impl.JarUtils#jarOrDirectoryPath}}
only works for “normal” JARs where the classes directory is the root of the JAR (code
source location protocol = file).
It will not work for Spring-boot’s [repackaged
JARs|https://docs.spring.io/spring-boot/docs/2.2.13.RELEASE/maven-plugin//repackage-mojo.html]
in particular, where classes are located in {{/BOOT-INF/classes}} within the JAR , or
worse, in a JAR within the JAR ( code source location protocol = in {{/BOOT-INF/lib/*. jar
}} ). Note that in that case, the {{META-INF/jandex.idx}} is still located at the root of
the JAR; only classes aren’t.
This makes the feature useless in a Spring Boot applications that rely on repackaged JARs,
which I think might be the default in JHipster in particular, and maybe others.
It’s unclear whether this affects other frameworks.
See also:
*
[
https://stackoverflow.com/questions/74149716/hibernate-search-6-projectio...]
*
[
https://github.com/anothergoodguy/spring-data-hibernate-search/pull/1|htt...]
(
https://hibernate.atlassian.net/browse/HSEARCH-4724#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4724#add-comment?atlOrigin...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:d23b292 )