简体   繁体   English

如何使用gradle获取Hibernate Search Lucene的所有依赖项?

[英]How to get all dependencies for Hibernate Search Lucene using gradle?

My build.gradle file: 我的build.gradle文件:

//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: 当我在IntelliJ中运行./gradlew clean jar时,我遇到了错误:

12:40:34: Executing task 'jar'... 12:40:34:执行任务'jar'......

Task :wrapper 任务:包装器

BUILD SUCCESSFUL in 0s 1 actionable task: 1 executed 在0s 1可执行任务中构建成功:1执行

Task :compileJava FAILED 任务:compileJava失败

FAILURE: Build failed with an exception. FAILURE:构建因异常而失败。

  • What went wrong: Execution failed for task ':compileJava'. 出了什么问题:任务':compileJava'执行失败。

    Could not resolve all files for configuration ':compileClasspath'. 无法解析配置':compileClasspath'的所有文件。 Could not find org.restlet.jee:org.restlet:2.3.0. 找不到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. 需要:project:> org.apache.solr:solr-core:7.6.0找不到org.restlet.jee:org.restlet.ext.servlet:2.3.0。 Required by: project : > org.apache.solr:solr-core:7.6.0 要求:project:> org.apache.solr:solr-core:7.6.0

  • Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。 Run with --scan to get full insights. 使用--scan运行以获得完整的见解。

  • Get more help at https://help.gradle.org https://help.gradle.org获取更多帮助

BUILD FAILED in 3s 1 actionable task: 1 executed Could not find org.restlet.jee:org.restlet:2.3.0. 在3s中构建失败1可操作的任务:1执行无法找到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'. 需要:project:> org.apache.solr:solr-core:7.6.0在build.gradle文件中搜索12:40:38:任务执行完成'jar'。

Solr is not necessary to use Hibernate Search. Solr没有必要使用Hibernate Search。 Try removing the Solr dependencies. 尝试删除Solr依赖项。

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 如果您添加这些依赖项以使用额外的分析器,您可能想知道在过去几年中大多数分析仪都从Solr迁移到Lucene,因此您应该能够依赖Lucene jar而不是: 请参阅此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM