My build.gradle file:
//Hibernate
implementation 'org.hibernate:hibernate-core:5.4.2.Final'
implementation 'org.hibernate:hibernate-entitymanager:5.4.2.Final'
//Hibernate Search
implementation 'org.hibernate:hibernate-search:5.11.1.Final'
implementation 'org.hibernate:hibernate-annotations:3.5.6-Final'
implementation 'org.apache.solr:solr-common:1.3.0'
implementation 'org.apache.solr:solr-core:7.6.0'
implementation 'org.lucee:lucene-snowball:2.9.4'
When I ran ./gradlew clean jar in IntelliJ, I've got the error:
12:40:34: Executing task 'jar'...
Task :wrapper
BUILD SUCCESSFUL in 0s 1 actionable task: 1 executed
Task :compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':compileJava'.
Could not resolve all files for configuration ':compileClasspath'. Could not find org.restlet.jee:org.restlet:2.3.0. Required by: project : > org.apache.solr:solr-core:7.6.0 Could not find org.restlet.jee:org.restlet.ext.servlet:2.3.0. Required by: project : > org.apache.solr:solr-core:7.6.0
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 3s 1 actionable task: 1 executed Could not find org.restlet.jee:org.restlet:2.3.0. Required by: project : > org.apache.solr:solr-core:7.6.0 Search in build.gradle files 12:40:38: Task execution finished 'jar'.
Solr is not necessary to use Hibernate Search. Try removing the Solr dependencies.
If you added these dependencies to use extra analyzers, you may want to know that in the past few years most analyzers were moved from Solr to Lucene, and thus you should be able to depend on Lucene jars instead: see here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.