在 Scala SBT 项目中导入累积库
Import Accumulo Libraries in Scala SBT project
我想了解在 SBT 项目中使用 Accumulo 或任何其他 java 库。
我使用 Intellij 自动导入库,它导入但在 Intellij 和 runtime/project 构建时出现错误:-
Cannot resolve _
。在import org.apache.accumulo.core.client.__
我使用这些步骤包括:-
File > Project Structure > Libraries(In left Pan) > Clicked
+icon located at top left in middle pan > Selected from Maven >
已搜索 Accumulo and Selected org.apache.accumulo.core.
当您在 Maven Central 中查找 Maven 依赖项时,它还会为您提供在多个构建工具中添加依赖项的语法 - 包括 SBT
例如,如果您查找 Apache Accumulo core
您会看到 SBT 用法为:libraryDependencies += "org.apache.accumulo" % "accumulo-core" % "1.8.1"
感谢 Arnon Rotem-Gal-Oz 为我指明了正确的方向。我想补充的几点如下:-
您可以将 JAR 文件添加到项目的 lib 目录中 root 目录.
我遇到问题的步骤现在也可以正常工作,但会产生重大影响。
IntelliJ 的正确步骤是:-
File -> Project Structure -> Libraries -> Click + icon in top left of second column
Chose Maven( or other if you are having jar files)
Search Your Library
Click on Download to {Project Root Directory}/lib
Press Enter or Click OK
It will take some time proportional to size of lib and number of it's dependencies. After downloading a popup will come
Press shift and click the modules in which you want to import the library.
我想了解在 SBT 项目中使用 Accumulo 或任何其他 java 库。
我使用 Intellij 自动导入库,它导入但在 Intellij 和 runtime/project 构建时出现错误:-
Cannot resolve _
。在import org.apache.accumulo.core.client.__
我使用这些步骤包括:-
File > Project Structure > Libraries(In left Pan) > Clicked
+icon located at top left in middle pan > Selected from Maven >
已搜索 Accumulo and Selected org.apache.accumulo.core.
当您在 Maven Central 中查找 Maven 依赖项时,它还会为您提供在多个构建工具中添加依赖项的语法 - 包括 SBT
例如,如果您查找 Apache Accumulo core
您会看到 SBT 用法为:libraryDependencies += "org.apache.accumulo" % "accumulo-core" % "1.8.1"
感谢 Arnon Rotem-Gal-Oz 为我指明了正确的方向。我想补充的几点如下:-
您可以将 JAR 文件添加到项目的 lib 目录中 root 目录.
我遇到问题的步骤现在也可以正常工作,但会产生重大影响。
IntelliJ 的正确步骤是:-
File -> Project Structure -> Libraries -> Click + icon in top left of second column
Chose Maven( or other if you are having jar files)
Search Your Library
Click on Download to {Project Root Directory}/lib
Press Enter or Click
OK
It will take some time proportional to size of lib and number of it's dependencies. After downloading a popup will come
Press shift and click the modules in which you want to import the library.